While customizing a CMS for a client, I was forced to confront an old enemy of mine: CSS.
“What”, you say, “but surely you must be convinced that CSS is the latest and greatest in the separation of style from content?”
Well, latest, yes. Greatest? Far from it.
The good points: CSS is the only standardized tool that lets you separate content. The cascading model is well-designed and most often well-implemented. The set of selectors and attributes is as well.
But now let’s face two glaring problems of CSS. And no, cross-browser compatibility hacks are not among them.
- dynamic layout: show me a CSS multi-column layout without at least one column fixed in width. With the scourge called
I can specify percentages and they work nicely, adapting themselves to the screen estate of the client. Why this omission? It feels like stone age in a world full of handheld devices and lots of different resolutions.Most web designers seem fine with specifying pixels all around. But then again a lot of web designers have Macromedia Dreamweaver, Adobe Illustrator and Adobe Photoshop among their favourite tools. I’m always tempted to use tables instead, which gives me the additional boon of a working vertical alignment.
- arithmetic expressions: it’s not possible to do even the most simple of calculations like 2em + 50px. Also, wouldn’t it be badly needed to be able to say: 2em + (SCREEN-WIDTH / 2), especially with absolute positioning? In this case, I can actually see why CSS don’t has this, though: Microsoft Internet Explorer often messes up even with only one value.
What makes it really bad is that CSS3 doesn’t attempt to solve those, to my knowledge. But let’s see whether HTML5 with its semantic additions can help here.
What are your experiences with CSS?