Using flex as an example, I’ve come across well established sites where this isn’t prefixed at all, and others where almost every browser prefix is included.
I’m curious to get the opinion of other frontend developers on how they approach vendor prefixes?
Top comments (5)
There are a number of build tools that add the prefixed variants of properties automatically, so they appear in the final CSS almost "for free".
Because browsers have largely dropped the practice of using prefixed properties while developing their implementations in favour of hiding them behind configuration flags the value of using these prefixes is steadily diminishing.
But they are still in use in places and the alternative to adding every prefixed variant is a combination of testing, checking caniuse, and study of your server logs to see which browsers your users are actually using. From that you can determine whether a prefixed variant has any value to you.
In general, that's a stronger strategy. Remember that the prefixed variants are likely to be more buggy - so relying on their blind application involves absorbing some degree of risk, but it is substantially more work.
I’ve been piping my css through autoprefixer which uses caniuse so this seemed like a good solution. It’s also lead me to specifying which browsers I want to target using browserslist. I went with “last 40 versions” which has resulted in every prefixed variant being added where necessary. I’m not sure if this is overkill though.
Nowadays browsers are often up to date. Leaving the defaults as is seems enough to me. The exception generally comes when a client needs you to support IE.
I'd strongly recommend that people do not support IE at all and use Edge or another browser instead because:
See more info about migrating from IE to Edge from Microsoft here if needed.
I don't think it is essential any more browsers are more modernised.
Check out caniuse.com/.