News for hackers. Stuff that matters.
Re:CSS Variables land in WebKit by SquareWheel on Wednesday June 13, 2012 @10:02AM (#4105948)
Oh jeez, that's going to be really cumbersome to write.

edit: I think I'll stick to PHP variables in my CSS for now:

  <?=$color1?>
Re:CSS Variables land in WebKit by btipling on Wednesday June 13, 2012 @11:48AM (#4106534)
This is a terrible idea. Do you cachebust your CSS?
Re:CSS Variables land in WebKit by SquareWheel on Wednesday June 13, 2012 @11:18PM (#4109610)
I generally make heavy use of both server-side and client-side caching. It really depends on the site. If it's just an internal company tool then I usually don't worry about intelligent caching.

I understand the danger of introducing PHP to CSS though. I won't be making database calls or anything like that from a .css file.

Re:CSS Variables land in WebKit by Hovertruck on Wednesday June 13, 2012 @10:31AM (#4106123)
You do lose the benefit of caching with that approach, though.
Re:CSS Variables land in WebKit by philfreo on Wednesday June 13, 2012 @11:36AM (#4106460)
You don't have to. You treat it like you would with LESS - executes during development and you compile it for production
Re:CSS Variables land in WebKit by Hovertruck on Wednesday June 13, 2012 @12:35PM (#4106855)
At that point you should just be using LESS/SASS/etc, though, for the other niceties they provide for working with colors and such.