|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Constants in CSS?
Hello Readers One and All
(and Seasons Greetings too...) Is it possible to define constants in a CSS so for example each time I use color = 'Grey'; It inserts #D6D7DE? I appreciate there are already defaults (and Grey is probably one of them. This isn't about overwriting those defaults, but about adding my own... Any information appreciated Thanks Tyndyll |
|
#2
|
||||
|
||||
|
no, there is no way to do that.
|
|
#3
|
||||
|
||||
|
You'd have to use some fancy code to accomplish that, like storing your value in a variable in PHP, Perl, Javascript, etc.
BTW: That's why they call them constants. ![]() |
|
#4
|
|||
|
|||
|
Cheers for the info - could set it up in PHP but probably more effort than its worth. The design department are still playing with the shades to make it look all pretty so it would have been handy just to change the constant in one place....
As an aside I think TopStyle has an option like this (from memory) but just wanted to check it out for academia's sake ![]() |
|
#5
|
||||
|
||||
|
Yes, it would need a good bit of PHP coding to get it to interpret "gray" as a # value you set.
To congregate all the tags you'd need as gray into one spot, define them all at the same time, like: a, h1, etc. {color: gray} |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Constants in CSS? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|