CSS Variables Officially Proposed

Album Cover: White Blood Cells

"Every breath that is in your lungs is a tiny little gift to me."
White Stripes / Dead Leaves and the Dirty Ground

Posted on April 17, 2008 9:57 AM in Web Design
Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

Way back in '04 I lamented the lack of support for constants in CSS. Nearly two years later, I received feedback from the father of CSS himself on why constants were left out of CSS.

I'm very happy to learn today, via Daniel Glazman, that both he and Dave Hyatt have officially proposed CSS Variables.

I was curious why the "variables" terminology was chosen instead of "constants," but that is pretty obvious once you read RQ3 from the proposal:

The value of variable should be modifiable by script. Such a modification should instantaneously update the value of all properties calling the corresponding variable's value, possibly triggering changes in the rendering of the document.

I hadn't considered the dynamic possibilities when I originally envisioned using CSS constants, but these possibilities are doubtless desirable.

It's exciting to see this feature finally gaining some momentum, and I'm very much looking forward to the day that I can make use of CSS Variables in my web designs.


jhmaskho on May 15, 2017 at 5:23 AM:

Post Comments

If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.


Email Address:



Check this box if you hate spam.