Perhaps I'm just too old

15:08, Wednesday April 16th, 2003 • feeling insensed

Somehow I doubt it (I'm 24). What I increasingly resent in HTML development is being forced to relearn stuff I've known forever and watching new and progressively uglier bits of CSS move into my lexicon.

Today I adopted the phrase "line-height:0px; font-size:0px;". The authors of the CSS2 specification in their infinite wisdom decided to flesh out the specifics of laying out inline elements within block elements with respect to baselines and such. What they decided has a big vague patch where images are concerned. Traditionally if I put a single pixel image into a table cell the dimensions of that table cell should also be 1x1. Not any more. The new standard implies that the image should be placed on the font baseline rather than at the bottom of the block and that the minimum height of the cell is that of the line-height value (almost always inherited from the page fonts you're using). This is retarded. Worse still, it's vague enough to allow the Microsoft implementers (Tantek Çelik in particular) to argue that the desired behaviour is actually that exhibited by older browsers and for the Moz team (championed by Hixie) and evidently the Safari team to go the other way. Read this discussion to see what I mean.

I haven't gone to the depths of employing the box model hack. That is a nasty piece of work that should not be used IMHO.

The whole point of CSS is to make to easier to develop pages and yet with things like the line-height and box model hacks the pages just become more and more browser specific again. With line-height it's not too bad because older browsers don't even consult that value on cells without text, which are the only ones it should be employed on.

I don't think the layouts I'm trying to build with HTML are particularly revolutionary, in fact, the opposite is true. The layouts I build are exactly the same as thousands of others that can be seen all over the web. Most of these layouts still rely on the state of play at HTML 4, with the odd bit of cunning CSS creeping in on sites like Wired. The thing is it seems to actually be getting harder to build a nice layout with the content divided up by designerly borders and stuff. OK, I can understand why they would want to make it harder to use tables for layout, but why haven't they provided the tools to build the sites everybody wants to build?

Examples: a scaling block of text with a red 2px border with 10px cut corners; a multi-column layout; a login box that is centred in the middle of the browser. All of these things are just about possible in CSS but they are pain and involve things like the box model hack. Why? These are three extremely common tasks. For evidence of this see Amazon, Yahoo or Lycos, all of which are members of the top 10 most popular sites on the internet.

A while a go I got annoyed enough about this to email Bert Bos about the column specification that might be in the pipeline for CSS3. I don't think I actually got a reply, but from all the discussion stuff I read around the subject it seemed to me that their reasoning for hamstringing CSS was that it is a system for marking up documents. Like HTML. Which is just crap, "we're going to tell you not to do what you're doing, but we're not going to give you any alternative, plus, how dare you claim that it is our responsibility to do so" or something similar.

Well, that's BS, the W3C is about finding solutions to the problems of real people both using and creating the web. If it doesn't do that it is irrelevant. 90% of the time it does a very good job (overlooking for a moment that whole SOAP malarky) including in the area of developing the CSS specifications. I just wish it would think a bit more practically and less conceptually on the issue of interfaces vs. documents. I guess I'm going to have to join the w3-style mailing list. Nuts.

Mat says...

time: 19:18, Thursday April 17th, 2003

I've used the box model hack. You have to if you want css column layouts to have any kind of chance to work properly, cross browser. My personal preference is to design around the problems, but I'm not always the designer - plus sometimes you just can't get round IE's stupidity, no matter how hard you try.

I think (hope) it'll all work out in the usual kind of hacked together compromise kind of way, hopefully to the point that we can produce at least mostly degradable/scaleable/acessible/useable pages, to cover most design styles, without having to resort to sickening things like this

I'm not proud   : )

Permanent link

If you would like to link to this entry, it will always be available at http://aftnn.org/journal/257.

aftnn.orgafternoon's journal → entry 257