How To Avoid Non-Standard CSS3 (And Make Great CSS Standard)
Join the DZone community and get the full member experience.Join For Free
Quite a few web devs reeled and fired back against a recent CSS Working Group meeting that seriously considered admitting WebKit prefixes as part of the CSS spec (1,2,,4). So far, so good: the developer community is supposed to respond to WG discussions, and the WG generally welcomes this kind of feedback.
If you're on board against the (supposed) threat of WebKit hegemony, you can certainly make your voice heard on the W3C mailing lists -- or you can just keep writing standards-compliant CSS3, avoiding
But vendor prefixes don't always indicate divergence from the standard. CSS3 modules are still under development, and much of the purpose of vendor prefixing is, simply and nobly, to ensure that experimental implementations themselves do not become set in browser-and-code stone.
So how can you avoid accidentally using a WebKit-only prefix, while still implementing experimental but standard CSS3 for WebKit browsers?
CSS guru Lea Verou offers some great advice: just Google it. Use quotes, and check only w3.org.
But you could have figured that out. You might not have enough CSS experience, however, to follow her more aggressive advice, on 'how to help standardize a feature', without reading her full discussion.
Three things to do, in descending order of preference:
- Reseach standards-compliant alternatives.
- If there are none, then see if the feature is already proposed.
- If it hasn't been proposed, then propose the feature.
The blogpost shows you exactly how to do each of these things (where to search, how to research, how to propose effectively -- emphasis on use-cases). A great supplement to Move the Web Forward, an essential resource for standards-refining web developers everywhere.
So check out Lea's longer discussion, and join the defense and advance of CSS3 standards today!
Opinions expressed by DZone contributors are their own.