I’ve been in an argument on a discussion list with a CSS Zealot. They’re the kind, like the Web Standards Project, or Zeldman, or even sometimes Eric Meyer who say that using W3C-approved code in a certain way is not just a superior technological or business choice, but a moral imperative. You are a Bad Person if you do not accept The Way.
Fittingly, one of the premiere sites for this sort of religous proselytizing (they make Mac advocates look like pussies, quite frankly–the only people they remotely compare to are the Stallmanesque GNU Cadres) is CSS Zen Garden, the Light and the Way.
It’s a nifty trick–some nicely structured markup, almost totally unlike anything you’d see in the real world of commercial Web development, that can be totally changed in look and feel through CSS ONLY. Oh, except for the buttload of images that no dialup connection could ever support (hmm…where’s the navigator.connectionSpeed property so I can detect that…gotta be in the docs somewhere).
But, admittedly, it’s a nifty trick, and a nice playground.
However, much as the Japanese government of 1934 had some un-Buddhist principles (or today for that matter), there are a couple of biases their rhetoric assumes you share if you are a Good and Right-Thinking Arya- I mean, Person.
Caveat and Disclaimer: The group is not monolithic, and here I publicize and sometimes even (hell, usually) exaggerate for comic effect the more extreme positions taken by the more extreme advocates. However I am trying to expose some contradictions, hidden value judgements, and distortions that the more adamant parts of the group make. I’ll leave it for someone more skilled and less pissed off than me to make the subtle, reasonable case. I’m here to blow it out of proportion so you can see the bits I’m talking about writ large–much like an actual assistive application.
Poor or Thrifty People Are Worth Less than Rich Spendthrift People
There are two rallying cries they screech, given any opportunity. To hell with old browsers, and include the handicapped and other devices. The idea is that old browsers should not be supported (some say give them a less perfect design, some say they should only get words and a grey background), but we must adjust to the limitations of people rich enough to have screen readers or techno-toys like PDAs or Web-enabled cell-phones. These, you see, are Gods, whereas clods who can’t afford to upgrade to a new machine, OS, or have a high speed connection to download a new browser are Clods, and should just get off the Web and get back to sweeping up the area around their couch at Starbucks as they impress everyone with the ability to read the same sports scores available on the newspaper on the table with their cell phone.
Seriously, not everyone is able to get a Modern Browser. If you have a Mac from before 1999, you probably can only get one browser to work without crashing every few minutes–Netscape Navigator 4. So even though it’s a trivial (and still Standards-Compliant) matter to give you a design that looks as good as Modern Browsers, tough shit. You don’t deserve to be on the Web. So if you even get text, you should be thrilled.
However, we mustn’t add any work to the designers of cell phones, and we mustn’t acknowledge the fact that most assistive devices simply enlarge the screen, regardless of what application is on there, rather than re-parsing code. Their technical limitations are Good Limitations, whereas lack of money is simply not an excuse.
Old people who are technophobic and make do with an older system that they know rather than relearning every time Bill Gates wants revenue also need not apply. They should probably just die, anyway, or become rich and purchase Assistive Devices. If black on dark grey text is hard for you to read, then you should have worked harder at the coal mine, gramps! Now, go greet me at Wal-Mart.
Slow Connections Indicate Slow Thinking
Many of the mind-bogglingly weird hacks CSS Zealots go through in their quest to remove tables (even from places tables make sense, just for good measure, say some) include positioning rather large graphics to make up for the fact that 100% height, if you are a member of the W3C, only means the hight of your current browser window, even though width means the current width of the document, not your browser window. Notice that most blogs are three column affairs or that the color behind a column stops when the content does? That’s because CSS just can’t hack it. So to make up for it, they believe that bandwidth is free, even if you’re in Africa.
But wait, say they, you won’t have to download as much code per page, and you’ll only have to download the graphics once! The second part is the same no matter what style of code you use, and the first doesn’t make up for the increased size of the graphics they’re forced to sling around.
And their designs aren’t about inclusion, but in taking advantage of modern technology. Except for applications for the blind that haven’t been updated since the mid-Nineties. Apart from that, it’s exclusive and modern. I mean inclusive and standards-based–but only a subset of standards. Oh, shit, what do they stand for again?
If You Wear Glasses, You Must Be Blind
CSS Zealots always state that their code is more Accessible. True, if you use a voice-based browser, the lighter markup, if used structurally and carefully, can indeed be much more pleasant to listen to when consuming their pages. However, they act as if
- There are tons of people with severe sight problems (true, after a fashion)
- Anybody with a sight problem can be lumped in that group to make them seem bigger than older or limited browser users (especially if you include WebTV and AOL in the ranks of old browser users)
- And all of these people use a device that takes raw, unrendered HTML and parses it by its own rules, generally to convert it to Braille or audio.
- The percentage of people on the Web with profound sight loss is pretty small, certainly smaller than the number of Netscape 4 users
- Not everybody with a vision problem, not even the free-spending, increasingly geriatric Baby Boomers they rely on for their example of the Sort of Person You Want Around, uses any assistive device or does anything more than put on a pair of glasses. This is not because of some Republican (or UN) conspiracy, but because glasses do the job just fine and are less hassle.
- Among those who do, most either:
- Increase the font size in their browser
- Reduce the resolution of their screen (640×480 on a 21″ monitor is pretty frickin’ huge)
- Use an application that can enlarge a part of the screen, no matter what application is in the foreground
- or use assistive software that depends on the browser to first render the information, and then takes that rendering as a basis of either enlarging or speaking the text
- Also, by paying just a modicum of attention, you can make those extreme devices for that tiny group happy while still using tables for some layout purposes
Dynamic Web Apps Are Inflexible
CSS Zealots act as if every purpose in the world must be served by their frickin’ XHTML. Computer-to-computer, server-to-client, mobile devices, assistive devices, and client apps other than Web browsers will always read their div-labeled content (and check the presentational class names for semantic meaning, I suppose). They seem to come from a world where only static (X)HTML exists, and content is not stored in databases or XML or any other format. And if they do, programmers are all morons who can’t structure their code to separate content from logic from presentation–though they’re smart enough to design sophisticated, logical, and clean markup from their crazed-spaghetti-code applications.
I have news for them–crap code in the application means crap markup coming out. There are very few exceptions where spaghetti-coded apps generate clean, semantic markup. If you’re smart enough to like clean code and separation of presentation and content, then you’re smart enough to provide completely different output for each use of your content. So there’s WML for cellphones, a multitude of binary and text-based formats for application-to-application programming, HTML for browsers, and RSS for aggregators.
Generally you don’t even want the exact same content to go to cellphones as to browsers as to some random application. You want something shorter (Use XSLT! Shout the Zealots, proving my point, since XSLT is just another tool for doing what I’m referring to, and only exists on the client side in…wait for it…BROWSERS (well, one, anyway, and we only care about IE, right? Oops.)). So do that logic on the server side, and provide different access points for different devices. If reliable, you can even detect them and change accordingly (however, reliability of detection isn’t assured; best to let the client go to something specifically for it).
Additionally, as structured content, XHTML is bad, and the crap the Zealots produce is worse. Most of their content is in structurally undifferentiated div tags. Other tags, such as semantic-free spans or extraneous divs, litter the page. A few headers and some paragraph and list tags ocasionally make an appearance, but as the Zen Garden demo demonstrates, having too many of those gets in the way of the Cross-Browser compatibility (minus old browsers) they offer. But they have pioneered the return of the acronym tag, so they’ve got that going for them. They may also make the trains run on time, too, I’ve heard.
We Use Semantic Structural Markup And No Excess Tags, Except Where We Don’t
Putting divs inside other divs. Putting spans with no attributes, even clases or IDs around content. Arguing that a table declaration is unsemantic while a plain div imparts great meaning.
Those are a few of the things our friends, the SS, I mean, CSS Zealots do in their markup. I’ll give them points for trying to keep it down to the minimum possible, and I’ll even admit that a table is a semantic construct that’s being repurposed for not-exact applications. Still, they act as if their farts smell like lilacs and their code has no concessions to presentation.
Were that true, most of it wouldn’t have div tags, which only say “the enclosed is grouped together in some vague way.” This particularly galls when they have the option to put a bit of text in a paragraph tag but use a div instead. There’s almost no presentational reason for it, and several semantic arguments against it. If a div can hold a single image and a group of other divs or a group of paragraphs or just plain text, then what does it tell a machine parsing the document for semantic meaning?
Earlier I said that XHTML was piss-poor for processing by other applications because it doesn’t provide enough semantic constructs, and it has no way to create new ones. Here, the CSS Zealots’ use of the markup doesn’t even rise to the standards they claim to set, or even could achieve. One acronym tag doesn’t make up for failing to use most other semantic tags from the days of HTML 2, guys.
All Web Standards Are Equal, but Some Are Right and All Others Are Wrong
So if my page validates as HTML 3.2 or HTML 4 Transitional, do I get any credit for following Web Standards?
Pffft. Dream on, silly man who isn’t out of a job and wanking off about how things should be done. Those of us who don’t code Web sites for a living but instead either collect unemployment or lecture others on how to behave simply do not approve.
CSS and XHTML will get you points. Well, really only CSS 2 and XHTML Strict. But if you were a real man you’d use CSS 3 and blame the browsers for not supporting it. ‘Cuz CSS 3 is L337. Well, mainly because otherwise they’d still support the crappy browsers that have different workarounds than the workarounds they like to support now.
Write to the Standard, Not to the Browser–Except for Mozilla
Most advocates at some point lose control and say “you can just write to the standard and let the browser makers worry about compliance.” These are generally people who are out of work or lecture for a living. They for damn sure don’t have clients who pay them for results and complain when they get crap.
Additionally, they always announce a new technique with “and it works in Mozilla.” Well, why not just code up something that SHOULD work, based on reading the spec, and let the browser makers deal with it? That’s because even in their circle-jerk world, if it doesn’t render it’s pretty useless.
Write to the Standard, Instead of Browser Hacks–Except for Our Hacks
As long as a validating parser accepts it, the advocates generally don’t mind nasty hacks that use the standard in ways it was clearly not meant to be used. Tantek’s IE box model hack is a prime example. You don’t even care about voices, but you depend on a bug in IE to get the two to agree.
Whatever happened to write to the standard and let the browser makers worry? Oh, IE happened. When they couldn’t get it to work in the browser that won the installation war, they frantically looked for ways that would honor the letter but not the spirit of the standard, while decrying others who did the same with the HTML 4 standard. They claim these hacks only happen in CSS, which is presentational, but as I mention above, they also use non-semantic tags to get around issues like IE 6 not understanding the proper rendering of margin-left: auto.
So again, their hacks and non-semantic tags are good, while yours are bad. Yet they frequently claim that you can write without them, until you bring up that you can’t. Then they quickly claim that “everybody knows” that you still have to hack, despite the fact they said the opposite earlier.
So there you have it. They value certain devices over others, and make no allowance for any circumstance that might favor a device they’ve deemed “bad.” They make exaggerated claims about the benefits and sweep the difficulties under the rug. If these weren’t their primary arguments, it would be no big deal. But as I’ve shown above, they undercut their own best arguments and leave you with nothing more than personal preference or suitability to a specific, limited set of circumstances. None of that justifies the shrill, moralistic tone they take nor the lack of understanding they display for people who have to code for a living instead of for a hobby.