Topic Closed

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?

PolyWogg

12 years ago#252

Josh S.
2K Posts
306K Downloads
16 Themes
18 Plugins

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.

12 years ago#253

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!

PolyWogg

12 years ago#263

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Ennetb├╝rgen (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Websi...

Find out more about our Provider Spotlight

Log In

  Register