DEV Community

Discussion on: How necessary is to prefix css that’s not fully supported by older browsers?

Collapse
 
alohci profile image
Nicholas Stimpson

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.

Collapse
 
joe_leeson_fb93f7c693879f profile image
Joe Leeson

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.

Collapse
 
pyrsmk profile image
Aurélien Delogu

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.

Thread Thread
 
hollyw00d profile image
Matt Jennings

I'd strongly recommend that people do not support IE at all and use Edge or another browser instead because:

  • Edge browser has IE compatibility mode
  • Microsoft has stopped development on IE and will actively encourage people to use Edge, and stop using IE

See more info about migrating from IE to Edge from Microsoft here if needed.