2

I recently looked at the following question:

How to disable text selection highlighting using CSS?

Which nicely provided the answer to the immediate CSS problem I was facing. However, it made me wonder, how do you determine when it is safe to drop all the browser specific prefixes for CSS properties?

I know how the mechanics of this work, older browsers which require a prefix will of course always need a prefix, so I suppose the answer really depends on the browser usage statistics.

Is there a decent, simple, source of reference that can be used to determine whether all these prefixes are really required for a CSS property, e.g. if I use the user-select property without prefixes, I can guarantee 95% of browsers will interprit this correctly.

Community
  • 1
  • 1
ColinE
  • 68,894
  • 15
  • 164
  • 232

3 Answers3

1

This is an excellent summary of browser support for pretty much every CSS property.

However, I tend to use the browser-specific prefixes, as well as the non-specific rule, no matter what - it's not exactly much extra work and it will mean those few people stuck on outdated browsers still see the page as you intended.

James Allardice
  • 164,175
  • 21
  • 332
  • 312
  • Thanks for the resource you referenced. "not exactly much work" - seriously? repeating each property 5 times over! – ColinE Jun 14 '11 at 21:26
  • Well, it depends if you want to type 5 properties to potentially reach a wider audience, or risk just going with the one. It's only a small percentage of all properties that require a browser-spcific prefix, so for the ones that do, it's definitely worth the small amount of effort! – James Allardice Jun 14 '11 at 21:28
1

One good resource I've used for this sort of thing is http://caniuse.com/. In general, it is not a bad idea to have a list like, for example,

-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;

For the space of a few lines, this ensures that older browsers will get the right browser-specific rules if they require them, and that newer browsers get the standards-compliant rule.

Edit: Well, I noticed that the resource to which I linked does not have an entry on user-select. Oops!

TNi
  • 16,070
  • 3
  • 22
  • 20
0

I've found this to be the best resource for that:

http://www.w3schools.com/cssref/css3_browsersupport.asp

Ed Richards
  • 111
  • 6