Hi, you're looking at the archives. Go to the homepage to see the current version of lensco.be.

CSS variables/constants0

Over at the excellent css3.info blog, there’s some discussion about the concept of CSS variables or constants. There are two rather different proposals on the table, but I’m not really in favor of the idea in general. Here’s what I wrote:

My humble opinion is that 95% of websites will never need CSS constants/variables, and the remaining 5% are made by web developers who should have the skills to implement it using one of the alternative methods mentioned above and in Bert Bos’ article. I’m sorry but if you really need CSS constants/variables in your project, you’re doing it wrong. Proper CSS for big projects is all about modularity, and combining several classes with small sets of properties.

Do the test for yourself and see if you can read and understand these code examples above without looking at the descriptions. I don’t see the point in adding this extra layer of complexity to CSS. If implementing new modules in CSS was painless and swift, I’d have no obligations at all. But we all know some the kids in class are having a very hard time keeping up. This will only burden them more.

In short, I’m not entirely against, I’d only give it a very low priority. Oh, and also:

It’s about time we leave behind the myth of 100% seperated content and presentation. CSS Zen Garden was a cool experiment, but it was exactly that, a lab experiment. No redesign ever happens without touching any HTML. Powerful site-wide adjustments are often but a find & replace away.

Comments are closed.

Latest …