{coyote.yaps}

I’m holding out for CSS4, myself

May 7, 2007 · No Comments

Via John Gruber comes Andy Budd’s proposal for CSS 2.2. Gruber comments in his Linked List, “It’s embarrassing how little progress the W3C has made since the CSS2 spec came out in 1998.”

Now, I don’t want to defend the W3C; they haven’t made much progress discernible to end users on anything so far this decade—about the only recommendation they’ve made is XHTML, just a reformulation of HTML in an XML-compatible format (and even that isn’t without controversy). Budd’s proposal is, in a nutshell, “backporting” from the in-gestation CSS3 specs to the CSS2 specs that are actually implemented.

What would this give us? Well, some of the things I’d really like would be generated content and automatic numbering. CSS has rules written to have styles that add content before and after element text and allow you to have headers formatted in ways that rival the best word processors. As an example from the relevant spec:

H1:before {
    content: "Chapter " counter(chapter) ". ";
    counter-increment: chapter;  /* Add 1 to chapter */
    counter-reset: section;      /* Set section to 0 */
}
H2:before {
    content: counter(chapter) "." counter(section) " ";
    counter-increment: section;
}

In addition, there’s fairly sophisticated control over printed output, including setting margins specifically for paper, page breaks before/after certain elements and even orphan/widow control. It could still stand to be improved, but it’s markedly better than what we have now.

Those of you who know CSS, though, probably know I’ve pulled a fast one here: what I’m referring to is stuff that’s in the CSS 2.1 specification that still hasn’t been implemented.

This is my only problem with Andy Budd’s proposal. It’s not that it’s a bad idea—it’s that we still haven’t gotten the browser developers, any of them, to fully implement 100% of what the current CSS spec calls for. And I don’t think that can be laid at the feet of the W3C.

Web typography in general is lousier than it needs to be; no browser has hyphenation, for instance, and not all of them even support soft hyphenation correctly—which makes fully-justified text all but useless, and ragged right text more ragged than necessary. These may be small nitpicks, but given that we’ve had good algorithms for these sorts of things for a few decades now, they’re nits that shouldn’t be there to be picked in the first place. (And why is it that oddball browser iCab is apparently the only one on any platform using ligatures?)

There are things in CSS 3 I’d like to see more widely implemented, to be sure. (Safari and FireFox both have scattershot bits and pieces, but not always the same bits, and frequently with -moz- and -webkit- prefixes that make them quasi-proprietary.) And a CSS 2.2 with a few of those features clarified and implemented would be a fine idea.

But wouldn’t implementing all of CSS 2.1 be an even better one?

Categories: Web

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment