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.
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.
edit: I think I'll stick to PHP variables in my CSS for now: