We do like vendor prefixes. They give us access to bleeding edge CSS properties, and make our sites look cool. But there’s a serious problem: non-webkit vendors are giving serious consideration to implementing the
-webkitprefix to a number of CSS properties.
This is bat shit crazy, but where the web has arrived to. This is one developer’s opinion, but you need to voice your opinion now, and if you’re agreement that this is madness, you need to act now. Make your voice hear, blog about it, tweet about it: make a lot of noise.
The entire point of vendor prefixes was to allow browsers to implement experimental features without breaking things. Since browsers are clever enough to ignore any CSS they don’t understand, it’s a clean, effective and safe way for front-end developers to focus on delivering modern, cutting-edge sites without compromising the site’s content or functionality for people using other browsers.
Provided the HTML of your site is 100% standards compliant you can feel safe adding certain effects using vendor prefixes, since it could never break browsers that do not support them*. It’s the embodiment of the progressive enhancement principle! You also have perfect granular control over your styles: having different values is easy with prefixes, should there be any cross-browser issues. Compare and contrast that to all the havoc the box-model caused because one browser interpreted the standard a little differently from the rest…
By considering to support
-webkit prefixes, Mozilla, Opera and Microsoft risk breaking the web. What if Internet Explorer’s implementation of
-webkit-box-shadow causes problems, for example? Then we couldn’t use that feature anywhere anymore! Our options would be reduced to either:
- Sniffing the user’s browser or device to serve separate styles to each – BAD
- Figuring out new CSS Hacks, and turning our beautiful code into something resembling a Regular Expression – BAD
- Going back to only using stuff that’s 100% standard and universal – BORING
So, not good then. So what can be done to prevent this?
- Us web-developers have to take more care in implementing all prefixes, and not just the most popular ones, provided it makes sense for the project.
- The CSS Working Groups could speed things up and just standardize the stable parts of the spec. What’s the stable part? How about the part browser vendors are willing to implement, even at the cost of their own pride?
* And noone really cares about CSS validation, now do they?