Tuesday, September 02

Geek

CSS Clueless

Steven Den Beste has lately been wrestling with both CSS (Cascading Stylesheets) and a new version of City Desk (his blogging software) that helpfully rewrites your HTML for you - and indeed, can't be prevented from doing so.

Being an engineer, he discusses City Desk in the context of intrusive tools. An intrusive tool is one that you are constantly aware of using. Notepad, for example, is not an intrusive tool; it sits there and you type stuff into it. Word is very much an intrusive tool, with its pop-up advice and its real-time spelling-error-generator and its fourth-grade reading-level grammarbot. I hate Word; I use Lotus WordPro for any serious writing (my book, for example) because it's not intrusive; despite having just as many bells and whistles as Word, it does exactly what you tell it to and shuts up otherwise.

I find CSS to be an intrusive tool too, not because it beeps and squawks at you (it can't), but because as soon as you try to do anything complicated, it stops working the way it should. Setting up the three-column layout was a huge pain with Internet Explorer; I tried three different ways of doing it - all of which worked fine in Mozilla - before stumbling across something that IE accepted. I don't know if the fault is with the specification or Mozilla or IE, but CSS is clearly not ready for use when it takes trial and error, and in the end, arcane trickery, to make something that really is fairly simple, work. And I ended up with two different stylesheets anyway, and JavaScript code to select the (hopefully) right one based on what browser you are using. (Try looking at the site in both Mozilla and IE - the IE stylesheet is different because I can't be bothered keeping both versions up to date.)

For the new layout I'm considering using tables instead. HTML purists will tell you that using tables for layout is a heinous crime, but I say to the purists: Go piss up a rope.* Tables do what you tell them to, where CSS does whatever the hell it feels like. I get enough of that from people; I don't feel like dealing with it in software as well.

* Where does this expression come from, anyway?**
** Never mind, I googled.***
*** Okay, okay: GO PISS UP A ROPE by 1940s: Go away and do something characteristically stupid; ="get lost", "go fly a kite". "He asked for another contribution and I told him to go piss up a rope." (Chapman’s Dictionary of American Slang)****
**** I also found an ad for "Urine Porn". Some days you're torn between "To each his own" and "Ewwww".*****
***** I'm finished now, Tiger, you can have them back.

Posted by: Pixy Misa at 10:28 AM | Comments (10) | Add Comment | Trackbacks (Suck)
Post contains 467 words, total size 3 kb.

1 How is this a problem with CSS and not with IE? They way I understand it, Gecko/Mozilla are fully compliant with CSS and the new standards, while IE is sort of hackish.

Posted by: Chris C. at Thursday, September 04 2003 09:17 AM (do/71)

2 Simple: You can't just use CSS, because it's just a spec and doesn't do anything. You have to use it as it's implemented in browsers. And given that most people use IE, that means that CSS is mostly broken.

Posted by: Pixy Misa at Thursday, September 04 2003 09:36 AM (jtW2s)

3 This is something of a semantic argument, but that means IE is broken, not CSS. That is, when browsers interpret CSS correctly, it does what it's supposed to. I realize that functionally, there's no difference, but the problem isn't in the CSS spec.

Posted by: Chris C. at Thursday, September 04 2003 11:48 AM (do/71)

4 What I'm getting at is that a browser/html engine that implements the CSS spec correctly (ie, Mozilla/Gecko, at least by their claim), everything works fine when you try to do something with CSS. The fact that an incorrect interpretation of CSS (ie, in IE) breaks doesn't make the spec any less valid. Less useful, perhaps, but not less valid and further, it doesn't mean that the spec itself isn't ready for deployment. I can write a C compiler that breaks when it reads valid ANSI C code. Does that mean ANSI C isn't ready to be deployed? For that matter, iirc, Visual C++/Visual Studio doesn't handle GNU C++ or ANSI C++ correctly in some instances. Does that mean neither of those specs is ready to be deployed?

Posted by: Chris C. at Thursday, September 04 2003 11:58 AM (do/71)

5 That's a fair comment. I found that in Mozilla, the obvious implementation or a layout generally worked; in IE, it generally was completely screwed up. I don't particularly like the CSS spec (actually, I think CSS is horrid), but I think you're right that that is not where the main problem lies. But if 90% of your audience uses non-ANSI-compliant C compilers that break on your code, ANSI C is not ready for use. Ready for implementation, yes, but not for use. And that's where we are with CSS right now. Happy day if I could get everyone in the world to switch to Mozilla...

Posted by: Pixy Misa at Thursday, September 04 2003 12:30 PM (jtW2s)

6 Yeah, I actually misspoke (mistyped?). I meant that it was ready for implementation, that it could be used and that the spec worked. It isn't ready for deployment because the major browser doesn't implement it correctly. That said, why don't you like CSS. I'm by no means well versed, but what I've seen of the theory (divorcing formatting from content) and some of the demos for Mozilla, it seems useful.

Posted by: Chris C. at Thursday, September 04 2003 12:38 PM (do/71)

7 The idea is excellent, and the things that can be achieved with it in a working implementation can be both useful and very cool. Probably "horrid" was too strong... I still have scars from my battle with IE a couple of months back. That and the spec, which is less detailed than it could be when you get into the more advanced layout functions - which made it hard to tell whether my stylesheet was at fault or IE's implementation. I don't particularly like the actual CSS language at the moment, but I'll probably get used to it...

Posted by: Pixy Misa at Thursday, September 04 2003 12:47 PM (jtW2s)

8 If you take Internet Exploder® out of the equation and design your web pages for browsers that stick to the accepted stards (e.g. Mozilla), CSS is great. It's when you have to try every sneaky little obscure trick you can think of to get IE to render a page half-assed legible that CSS is such a chore.

Posted by: Rossz at Friday, September 05 2003 09:17 PM (43SjN)

9 You're both probably right. As soon as the wounds heal, I'll give CSS another try.

Posted by: Pixy Misa at Friday, September 05 2003 10:52 PM (LBXBY)

10 Say I have two tools for making chairs. With one of the tools, the chair will collapse when some people sit in it. Which tool should I use to make a chair? There's no point in making a fancy chair that doesn't work.

Posted by: Tony at Sunday, September 07 2003 05:50 PM (CUi1V)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
52kb generated in CPU 0.0259, elapsed 0.1096 seconds.
56 queries taking 0.1003 seconds, 336 records returned.
Powered by Minx 1.1.6c-pink.