Is there a way to Declare a color value at the beginning of my CSS file in a variable and then use that variable name when a color is called for in the code.
Not with pure CSS. You can, however, create your own color-classes since elements can have tons of classes at once (but only one ID, since it’s unique).
The final spec for CSS3 might make this possible, but not yet.
Couple of ways to handle it though:’
http://css-tricks.com/set-up-variables- … rs-in-css/
The Search and replace method is what I have used in the past but I figured there must be a more professional way of doing it.
Chris, I swear I will remember this time to define the colors in a comments block like you suggested.
Have a nice weekend.
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".