Weblog entry #166 for simonw

CSS sucks
Posted by simonw on Fri 27 Apr 2007 at 13:24
Tags:
Today I recognized that the stray scrollbars that appear when I closed dialog box in an application we are working on, in Firefox, is a manifestation of Firefox bug/feature 286368.

https://bugzilla.mozilla.org/show_bug.cgi?id=286368

Still Firefox is way ahead of IE, which required extra random DIVs around items to render quite a simple layout correctly, and doesn't even have outline (which is why we have a lot of transparent borders on things that need outlines).

Oh to get back to something more predictable like Quantum theory, or human psychology.

 

Comments on this Entry

Posted by Anonymous (213.164.xx.xx) on Fri 27 Apr 2007 at 15:06
How does CSS suck?

[ Parent | Reply to this comment ]

Posted by simonw (84.45.xx.xx) on Fri 27 Apr 2007 at 22:50
[ Send Message | View Weblogs ]
First an most important IE6 sucks, but a lot of people still use it.

There is no good having a standard if the largest minority of clients don't support it well. There aren't even good tools to automatically downgrade, because the task is too hideous. and it doesn't even degrade gracefully (which HTML was suppose to), it is more likely just to not render stuff, or put it somewhere it can't be read.

A good example being "Outline" which isn't supported at all in IE6 (for Windows), but I believe was supported in IE5 for MacOS, and is supported in all modern browsers (even if Firefox's version is flawed).

Next the CSS box model sucks. The basics are just about bearable, but then you discover that under some circumstances top margin collapse, and if you want a child div to position itself nicely, you have to fiddle with the parent div. It reminds me of the Java Gridbag layout manager (that Java programmers complained about bitterly - and unjustifiably in my view) but without the simplicity. Humans are not good at remembering and handling a zillion caveats and exceptions, so don't build a tool for them to use that requires they remember such, fancy special case handling shouldn't cut in automatically, but should need to be invoked with fancy special requests. Even the authors of the Acid2 test got margin collapsing wrong!

There are simple tasks that CSS should solve in simple fashions that it just doesn't hack. Vertical alignment issues are a common case, a quick search for a particular issue I had turned up a solution with three divs, that only works in non-IE browsers, this breaks the separation of content and style, and couldn't be adapted to my needs. I solved it with a single celled table.

Sure some of this is frustration at (ancient) browsers. Some of it is no doubt my own lack of knowledge, some perhaps poor choice of tools. But simply laying out boxes on a page shouldn't be more complicated and time consuming than say programming the logic of a business application.

[ Parent | Reply to this comment ]

Posted by fsateler (200.83.xx.xx) on Fri 27 Apr 2007 at 17:16
[ Send Message | View Weblogs ]
What I hate the most about CSS is the fact that there is no way of saying "fill the whole page". You can fill the view, but not the page, and then you have to implement workarounds to get that effect.
--------
Felipe Sateler

[ Parent | Reply to this comment ]

Posted by Anonymous (213.164.xx.xx) on Fri 27 Apr 2007 at 21:05
Why not set a background on "html"?

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search