10 August 2009

If It Ain't Broke, Don't Fix It

There have been literally dozens (if not hundreds) of articles on the latest CSS3 styling techniques that you can use right now to "enhance" your web designs. I have a problem with them.


(I found this one this morning and this roundup from the other week is also very good.)

Some of these articles openly state that there's a good chance that you will find these new features unsupported by a number of browsers - most notably, of course, is Microsoft's latest version of Internet Explorer as well as stable releases of Opera.

So my first problem is the lack of universal support for these shiny CSS styles. Why is this a problem? Chances are, in order to use some of the newer styles found in CSS3's draft you will have to use vendor-specific code where those vendors apply the draft.

In order to achieve a fully backwards compatible design, your stylesheet(s) will need:
  • one set of instructions as a backup (for non-supporting browsers),
  • the current draft recommendation standards compliant code (for when it goes to official recommendation), and
  • each individual browser's vendor-specific code.
All of that for each style. This results in a bloated stylesheet and to a smaller extent, breaking the DRY principal.

Then there's the obvious differences in how the browser vendors interpret the draft recommendations from W3C and even in certain cases creating options that aren't a part of the draft. It can be hard to see which way is the right way to go from a design point of view at this early stage, especially if you're like me and you don't want to have to come back and fix broken designs later on.

We've come a long way in web design. Thanks to standards support in browsers like Firefox and Safari, Internet Explorer and others have had to adapt quickly to keep up. And they have.

However we're starting to tread over old ground. In the bygone eras of the web—when Netscape and Internet Explorer vied for supremacy—each had an array of browser-specific HTML. And we hated it. For example, if you wanted the benefit of layers in Netscape and you used it to the full, IE visitors were quietly asked to leave. Or you could hack around and find a solution that made your designs cross-browser.

That's why the W3C took over the evolution of HTML and defining an open forum for standards. Those days should be over, but it seems we're heading back down that old road.

The browser vendors will always put their own code in place, but it's only when we use it in the mainstream that problems start to occur. Then we blame the vendors for dangling that chocolate-covered banana in front of us when things get out of hand.

I'm not saying you shouldn't try all these new toys out, just go easy on the less well-supported ones. You'll save yourself a lot of hassle down the line when everything changes again.

Remember: If it ain't broke, don't fix it!

No comments: