News for hackers. Stuff that matters.
Re:CSS Variables land in WebKit by chao- on Wednesday June 13, 2012 @10:20AM (#4106042)
I would welcome this if I hadn't finally just gotten on board the SASS train. All I see this doing (for some ill-defined span known as "the present"), is adding another layer of headache into the browser compatibility game. Furthermore, I agree with VMG that there's something to be desired in the chosen syntax.
Re:CSS Variables land in WebKit by ch0wn on Wednesday June 13, 2012 @10:30AM (#4106115)
There's more to it than what Sass, Less and co. can provide. It simplifies dynamically changing a bunch of CSS properties from JavaScript a lot. Instead of changing all the elements using a particular style, you could now change just the variable instead. This gets even more interesting when properties are composed of variables, like gradient colors.

Also, this is a pretty high-level addition. I wouldn't be surprised if someone came up with a polyfill for this soon.

Re:CSS Variables land in WebKit by chao- on Wednesday June 13, 2012 @10:33AM (#4106136)
That's the biggest draw that I currently see. I would love to reference other features that SASS and LESS still bring to the table, but the idea of JavaScript fiddling with CSS variables is mouth-watering indeed.
Re:CSS Variables land in WebKit by pdeuchler on Wednesday June 13, 2012 @10:44AM (#4106192)
To me it seems a logical progression would be for webkit to include SASS/LESS in the tool chain, instead of trying to re-invent the wheel.

Possibly some sort of solution where the browser receives SASS/LESS files and compiles them into CSS on the fly?

Re:CSS Variables land in WebKit by huskyr on Wednesday June 13, 2012 @10:30AM (#4106117)
I can imagine you could create one stylesheet for browsers that support CSS variables, and one for browser that don't.
Re:CSS Variables land in WebKit by cleverjake on Wednesday June 13, 2012 @10:27AM (#4106097)
Wouldn't that 'headache' be prevented with SASS until it is supported across the board?
Re:CSS Variables land in WebKit by chao- on Wednesday June 13, 2012 @10:31AM (#4106122)
Oh definitely. I just mean to express that I'm not as excited as I otherwise would be. I'm not fortunate enough to be working on the types of projects where that can say to our market "You can take your IE7 and hit the road!" Thus while I wouldn't have been using these variables anyway, I would still have been very excited.