This month’s edition of A List Apart covers how to manage multiple browser vendors and their varying support for html5 and css3 1. We’re all aware of the different uses of border-radius in both FireFox and Webkit. And being able to not fork the code in making rounded corners by simply writing standard css3 is tempting. In fact, it’s ideal. Having it managed with javascript is actually very clever, and… cool!
But I would propose something different entirely. Instead of using a js library to help browsers properly render a soundly constructed html5/css5 webpage, short of making sure it doesn’t look like “total ass” on IE, just let the page render as it lay.
By now, web designers are largely aware of the rendering quirks of various browsers. Little things like not adding margins to floating divs for IE’s sake, or not applying –webkit gradients to divs that contain text fields, are a part of mental mine field map that goes into our work.
Using a javascript library to get around this isn’t the answer. Remember that script that lets IE6 properly render PNG transparency? It might have been relevant to a couple of years ago when there were still a vast majority of users that used IE6, but most web designers have abandoned even trying to support the browser, much less trying to make every pixel line up properly or make every image look decent. At some point (if our bosses let us), we move on.
Sadly, we moved onto other scripts that do what html5 is supposed to do already.
Here’s my advice. Write your site to work just fine without any javascript (or css for that matter) needed. If you can still use the site, you’re good to go. Using ajax history to browse back and forth with the browser chrome? Make sure it works without javascript and move on. If you’ve got some killer CSS mojo for your site, just write it. Write that widget that does that thing with the stuff, but to say that we have to cover every contingency is unreasonable.
When did we go from saying “to hell with bad browsers” to using libraries to keep these browsers on “the same page?”
Older browsers won’t go away (I still see Netscape occasionally show up on Google Analytics), but the support we give them can.
I like to look at these barbaric browsers like the Klingons in Star Trek XI. Their survival was in jeopardy and Kirk was having none of it. Eventually, he came around and now we’re stuck with the Klingons and their foreheads forever.
Don’t let this happen to bad browsers. Let them die.