CSS is not an amoral monster.
Tim Bray, for whom I have oodles of respect — and who encourages me by likewise missing the fact that browsers are finally soft-breaking on long dashes — offered the following:
Liking the look of Stylus. All these tantalizing alternatives when what we really want is to take the ship up and nuke CSS from orbit.
For those youngsters who might be missing the pop culture nod (NSFW soundtrack):
At this moment I’m wondering if I should take umbrage at the sentiment, in no small part because I’m hip-deep in instructional copy on the subject. Months of asking myself daily how best to explain CSS to n00bs should make me sympathetic thereto.
I’m leaning toward umbrage at the moment, but only for one reason: I’ve tried to think of a better approach that meets all the basic requirements of web tech, and I… can’t. I suspect that the guys at Microsoft who came up with this approach — and a number of unsung folks also far smarter than me — likewise attempted and failed.
There is this awful, horrifying tendency to think of a web page as an artifact that shows up on a backlit display within a particular footprint, and never anywhere else.
The web was never meant to be that platform; PostScript, Flash, and PDF were.
Yes, genuinely good CSS that makes the fullest use of its power is hard. Don’t like it? Deal with it:
If you are in fact willing to deal, I have three recommendations that might make it easier to do so.
Quit thinking of pages as static, box-like things.
Hell, if you can, stop thinking in terms of pages, and instead think in terms of content. Unlike a memo or a broadcast, web media allow you to present things in whatever context you damned well please. If you want to split one page into twenty as circumstances might dictate, you can make something that does that. Those of you who like jelly beans might get this with particular ease.
Consider that selectors can apply to one childless document node, or hundreds. It’s up to you.
I agree completely that the requirement to grasp the Document Object Model steepens the learning curve, and poorly suits a lot of people. That’s why I just told you to quit thinking of web content as some monolithic thing that fits in some box.
Write your content in plaintext. No, really. Then start adding elements as you need them. The better your hang of selectors, the fewer elements you’ll need. End of story.
In any event, the idea of the web as something you can just wave a wand at and make work magically… is, to put it directly, bullshit.
- jimray likes this
- jonprins reblogged this from journo-geekery
- livelymind likes this
- journo-geekery reblogged this from tiffehr and added:
- saila likes this
- thinkdrastic likes this
- algorithmgirl likes this
- davesparks likes this
- tiffehr reblogged this from undercaffeinated
- undercaffeinated posted this