zengun

weblog

20050825

serverside CSS makes baby Jesus cry

Now, I’m not the happiest webdeveloper when I have to use CSS hacks to achieve crossbrowser compability, but really, this is definitely not the way to get rid of such hacks (via), for all the reasons outlined in the comments on Stylegala’s similar piece “No More CSS Hacks”.

Browser Detection (yuck) + Dynamic Stylesheet (eek) = Headache-Inducing Waste Of Time / Effort / Money.

As a user, if I’ve had to change my browser’s UserAgent string to get into some bad (likely IE-only) website earlier in my browsing session, the last thing I want to see on the next website is a stylesheet being served as if I was really using the faked browser’s rendering engine. And as a webskivvy, what I’d really hate to maintain is a mess of serverside if/else/switch statements and string manipulations when all I want to do is change a colour or the position of some box.

…For Tim’s sake, dudes (an “Architect for MSN Web Experience” and the founder of Stylegala, of all guys!), haven’t the dark days of JavaScript browser detection taught you about checking for capabilities instead of UA strings? Is nostalgia for the 90’s taking over your sanity?


one response

  1. Those guys probably never heard of Conditional Comments. A great way to get rid of all the Internet Exploiter 5+ troubles. ;)

    First you optimize for W3C-compliant browsers (FF, Opera, KHTML), next you create a seperate CSS file just for Idiotic Exploiter users, done.

    Examples: here and here. Oh, and here, too.

    cu, w0lf.

    #1 fwolf2005/11/14 at 19:40

Your words


Required fields:
Are marked by this sign: *
XHTML:
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
On comment spam/irrelevance:
Your comment may be moderated or considered as spam by the leprechauns running this server. If you get a 412 error or a mean message, it may be that they thought it was spam: try wording the comment differently or remind me to put up a contact form so you can warn me about the problem.
Of course, once the leprechauns are done doing their magic, I reserve the right to delete any comment for any reason.