This Must Not Happen!

When I opened my inbox this morning, I nearly fell over. According to Daniel Glazman, co-chair of the CSS Working Group at the W3C, browser makers are considering supporting the WebKit vendor prefix (-webkit-*) because the web development community can’t be bothered to use the equivalent experimental properties for other browsers:

WebKit, the rendering engine at the heart of Safari and Chrome, living in iPhones, iPads and Android devices, is now the over-dominant browser on the mobile Web and technically, the mobile Web is full of works-only-in-WebKit web sites while other browsers and their users are crying. Many sites are sniffing the browser’s User-Agent string and filtering out non-WebKit browsers. As in the past with IE6, it’s not a question of innovation but a question of hardware market dominance and software bundled with hardware. But there is an aspect of the problem we did not have during the IE6 era: these web sites are also WebKit-specific because they use only “experimental” CSS properties prefixed with -webkit-* and not their Mozilla, Microsoft or Opera counterparts. So even if the browser sniffing goes away, web sites will remain broken for non-WebKit browsers…

In many if not most cases, the -webkit-* properties WebKit-specific web sites are using do have -moz-*, -ms-*, -o-* equivalents. Gradients, Transforms, Transitions, Animations, border-radius, all interoperable enough to be browser-agnostic. Their web authors need only a few minutes to make the site compatible with Mozilla, Microsoft or Opera. But they never did it.

Without your help, without a strong reaction, this can lead to one thing only and we’re dangerously not far from there: other browsers will start supporting/implementing themselves the -webkit-* prefix, turning one single implementation into a new world-wide standard. It will turn a market share into a de facto standard, a single implementation into a world-wide monopoly. Again. It will kill our standardization process. That’s not a question of if, that’s a question of when.

This idea has been floated in conversations for a few years, but this portion of Dan’s post represents an official discussion at the CSS Working Group. An official discussion that Adobe, Apple, Disruptive Innovations, Google, HP, Microsoft, Mozilla, Opera and the W3C were all participating in.

While it is true that writing them all out is tedious, vendor-specific prefixes serve a very valuable purpose: they allow a browser manufacturer to experiment with a property before it becomes an official part of the spec. And during that experimental phase, the syntax can (and often does) change. If you use vendor-specific prefixes, you do so at your own risk. That’s not to say you shouldn’t use them, but it is to say that you should be careful about when and how you use them.

The value of vendor-specific prefixes is not really in question here though; they are not the problem. We are. We are apparently too lazy to implement CSS in a consistent cross-browser fashion. WTF?!

Please, I beg you: Take 10 minutes out of your day today and update every site you can to use the other vendor-specific prefixes (and non-prefixed) versions of each -webkit-* property you find, even if you’re not sure it exists yet. And if you need help, ask.

UPDATE: If you want to scan your server for files that might need adjustment, try this from the command line:

find /var/www -type f -name "*.css" -exec grep -il "webkit" {} \;

If you want to run it locally on a Mac, you should change the folder to ~/Sites.

UPDATE #2: I created a petition and a pledge:

  1. Tell Microsoft, Mozilla, and Opera not to implement the -webkit-* vendor prefix, and
  2. Pledge to update every site you can to use the other vendor-specific prefixed (and non-prefixed) versions of each -webkit-* property you find, even if you’re not sure it exists yet

Sign the petition “Don’t make -webkit- prefixes a de facto standard” on Change.org.

Like it? Share it

Share on LinkedIn

Share on Google Plus

View comments on this entry