3 ms·
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?>
by SquareWheel 14y ago
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?>
- Hovertruck 14y agoYou do lose the benefit of caching with that approach, though.
- philfreo 14y agoYou don't have to. You treat it like you would with LESS - executes during development and you compile it for production
- Hovertruck 14y agoAt that point you should just be using LESS/SASS/etc, though, for the other niceties they provide for working with colors and such.
- btipling 14y agoThis is a terrible idea. Do you cachebust your CSS?
- SquareWheel 14y agoI 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.