AAAAA! My Eyes!

Published 21 years, 9 months past

Thanks to Tantek, I found out that Christine accused CSS of making her eyes bleed while at SxSW.  I can’t say that’s ever happened to me, although maybe it has to Joshua Davis.  (After all, we only have his word about the red food coloring.)  Also thanks to Tantek, I read that the subtle evilness of CSS gives Natalie headaches, and in surfing further onward I found that it apparently also makes Dave’s head explode.  I’m sure there are similarly colorful stories of CSS-inspired pain and suffering out there.  I wonder if anyone’s accused it of giving them some horrible disease.

Between amused chuckles, I feel a touch of concern.  There seems to have been a real failure to communicate with developers the benefits and perils of CSS; or at least, that’s what I assume is causing all the pain.  After all, from my point of view, it’s font tags and nested tables with three hundred shim GIFs that inspire eye-bleeding.  If there’s evil in design, it’s needing more markup than content to create a layout, as was the case for years.  Compared to all that old-school HTML design crap, CSS is like the breeze off a mountain pasture filled with blossoming wild flowers on the first warm day of spring.

It does require something of a conceptual leap to use CSS well, there’s no question.  But it seems that there’s a more important question, which is this: why do people find working with CSS to be so painful?  Is it simply because it’s new, or is there something more critical happening here?

I’ll freely admit that I’ve had times where trying to understand aspects of CSS made the veins in my forehead throb.  In fact, the worst such period was when I was trying (with a great deal of help) to decipher the line box model.  I spent a week of evenings wanting to drive my head through the monitor because it just didn’t make sense—but then, when I finally got it, everything seemed very clear.  (Not that my summary document does anything to reflect that clarity.)  I still think the line box model is flawed in certain important ways, largely because it works well to replicate legacy behaviors, and of course I’ve already complained about the deplorable state of typographic styling.

There are also certain behaviors which CSS does not make easy, although that’s more the fault of CSS still being young in terms of development than anything else.  It’s true that the box model doesn’t allow you to make an element stretch around a floated descendant, but that’s because in most cases you don’t want such stretching.  When you do, of course, it becomes very frustrating that there’s no simple solution.  There’s been a property proposed for CSS3 that would give the author the power to choose how such situations are handled.  There are also proposed properties that would let authors choose how line boxes are laid out, how element boxes are sized, and more.

That’s where my concern starts to grow into a certain species of dread.  People are already complaining that CSS is too difficult for them to grasp.  What will happen when, in the name of giving designers the layout control they want, CSS becomes so complex that nobody can learn the whole thing?  What good will it do to have a compact, human-readable styling language if nobody actually understands what it says?  I mean, it would still be an improvement over XSL:FO, which almost nobody can fully understand or read, thanks to its incredibly clumsy syntax.  But not much of an improvement; if you know all the words but can’t speak complete sentences, it’s still hard to ask for directions to the nearest coffee shop with an open wireless network and a customers-only bathroom.  If you catch my drift.

Problem is, I don’t see a way to avoid this over the long term.  It seems like any layout language will, eventually, become too complex to fully grasp.  Perhaps the best we can hope for is to have a language that humans can read, and let people specialize in different areas—Joe becomes an expert in typographic styling, Jane in element layout, Jerry in font descriptors, Jolene in selector construction, and so on.  It saddens me to think this, but there it is anyway.

In the meantime, I wonder what authors most need to know about CSS right now, and how that knowledge can be communicated to them.  How can the pain be eased, if not completely removed?


Comments are closed.