Link Details

Link 101092 thumbnail
User 247828 avatar

By jawngee
via w3.org
Published: Aug 05 2008 / 07:08

Bert Bos ruminates on why "variables" in CSS are no good.
  • 9
  • 4
  • 1216
  • 428

Comments

Add your comment
User 239201 avatar

amphi replied ago:

1 votes Vote down Vote up Reply

CSS is a semi-failure. It's alright for defining the look of items, but positioning of elements (the rough layout) is very fiddly. Just take a look at all those 3 column tutorials written by CSS experts. All of those come with different strings attached and all of them look like a hack... well, to tell the truth they are hacks. Things like that should be straightforward. Ironically that stuff is really easy with any real programming language. Why is it so damn fiddly with something as specialized as CSS?

For a typical 3 column layout with a fluid middle column, backgrounds which go all the way down to the bottom, and some margins you need quite a bit of math. Want to change the width of one of the sidebars? Uh uh... I hope you wrote lots of comments. If you did, you can just redo all the math yourself all over again.

CSS variables try to address at least this issue. It's tiresome and error prone. Letting a machine do a machine's job is only logical.

User 297517 avatar

WebmasterNeal replied ago:

0 votes Vote down Vote up Reply

Most of the problems with CSS are related to the lowest common denominator which is IE and it's poor support for CSS.

User 273110 avatar

isnoop replied ago:

0 votes Vote down Vote up Reply

The author makes some strange leaps of logic and I'm not entirely sure that they're not just flailing for reasons to decry this proposal from an emotional standpoint.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (4)