Variables in CSS?

Posted on July 1st, 2008, by Cristian in Xhtml & CSS

How long have you wanted to name colors and such in your CSS instead of having to use search and replace (which breaks if you share the same colors ?

Thanks to Daniel Glazman and David Hyatt we have a proposal .

@variables { CorporateLogoBGColor: #fe8d12; }

div.logoContainer { background-color: var(CorporateLogoBGColor ); }

I expect CSS Variables to receive a very positive feedback from community and browser vendors and get implemented in all browsers!

WebKit now has an experimental implementation of CSS variables : You can test this feature using a WebKit nightly.

2 comments

  1. » Variables in CSS? on July 1st, 2008 at 10:07 am
  2. Theo on July 8th, 2008 at 10:30 pm

Leave a comment

Comments RSS Feed

Recent Comments

  • luciano: Is there any way to fit the submenu elements to the widthest element in each one? I donĀ“t know if I make...
  • g25: I agree that Apple should implement a homescreen like this. Personally though the lock screen should be like...
  • wildspirit: C++ : http://wallpaper.wallpedia.org /24__boat_destroyer.htm
  • tom: Hello, this menue is great, but i noticed that it does not work in Opera perfectly. The “hover”...
  • medbrooro: adam ant shoes http://topcitystyle.com/dark-b rown-women-color29.html graphic designer gucci purses...