Is it possible to "declare" a variable within a CSS? Not sure I'm asking the question correctly, but here's what I want to do in my theme...
a. At the top, I want to say "var_colour1=XXXXXX", where XXXXXX is the hex code for a specific colour. I could then assign var_colour2, var_colour3, var_colour4 etc...
b. I also want to declare a "variable" for an image -- something like "logo="/images/logo.png".
Then when I want to refer to either through out the CSS, I only have to change it in ONE place, not throughout.
Can I do that?
I wish it were possible, but CSS does not support variables. It's appears to be a topic that has been discussed quite a bit.
Well, on the bright side for me, I got the terminology right in what I was asking! I wasn't sure I was describing it properly, but your link was exactly what I was wondering if I could do...
I think my knowledge is growing exponentially with GP -- I wanted a new opening "splash page" that didn't have all the bells and whistles of my main theme -- and managed to duplicate theme, delete the sidebar and menu, widen the content field, and assign the theme to my opening page, all in about 5 minutes of deciding what I wanted to do. Much better than the 3 hours it took to figure out how to edit the background image of the header in the existing theme I was adapting about a week ago!
Find out more about our Provider Spotlight