|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
CSS "variables"???
Hello people
![]() I know it can be done with PHP but here goes anyway : .dude {color: #F43435 }; .dude2 {background-color: ******}; Is there a way to refer to .dude.color ??? Something like : .dude2 { background-color: .dude.color; } What I am trying to get is the functionality of defining a "constant" colour which then can apply to the multitude of other CSS classes I have... Any ideas? Thanks in advance, Angelos |
|
#2
|
||||
|
||||
|
no you can't do that,
but you can group the style for the diffrent element like this: by seperating them by comma , h1, p, .class1, .class2, #id1 { background:#454545; } |
|
#3
|
||||
|
||||
|
Quote:
That will not work since what is expected as a value there is either the color name, the hex value, or the RGB code. Regards, jlk |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS "variables"??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|