CSS constants using PHP
A neat trick by Tyler Hall
I often find myself wishing CSS had constants like most programming languages. For example, at work, we have a specific shade of orange we use all the time. We call it Tricycle Orange. It’s #F33500. We also have a magical shade of blue called CM Blue #346FB7.
So, anytime I write a CSS file which uses those colors, I have to type #F33500 or #346FB7. Just between you and me, I already have enough hex numbers floating through my head without having to remember these. Also, what would happen if our designer suddenly decided Tricycle Orange needed to be a few shades darker? I’d have to go through the style-sheets and change every occurence to its new value. Not very fun. Is there a solution?

