![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Do you think CSS will ever get to the stage where we can use variables and pro grammatically set values, like: colour1:=red; colour2:=blue; colour3:=white; body {background-color:colour3; color:colour2; border: thin solid colour1} |
#3
| |||
| |||
|
|
On 2006-07-14, TreatmentPlant wrote: Do you think CSS will ever get to the stage where we can use variables and pro grammatically set values, like: colour1:=red; colour2:=blue; colour3:=white; body {background-color:colour3; color:colour2; border: thin solid colour1} Something like this, perhaps: http://cfaj.freeshell.org/www/prgcss.shtml/blue/yellow http://cfaj.freeshell.org/www/prgcss.shtml/black/red |
#4
| |||
| |||
|
|
"Chris F.A. Johnson" <cfajohnson (AT) gmail (DOT) com> wrote in message news:f70ko3-dgm.ln1 (AT) xword (DOT) teksavvy.com... On 2006-07-14, TreatmentPlant wrote: Do you think CSS will ever get to the stage where we can use variables and pro grammatically set values, like: colour1:=red; colour2:=blue; colour3:=white; body {background-color:colour3; color:colour2; border: thin solid colour1} Something like this, perhaps: http://cfaj.freeshell.org/www/prgcss.shtml/blue/yellow http://cfaj.freeshell.org/www/prgcss.shtml/black/red What would be the point? You would be just adding a line of unessacary code I will extend the example to make it more apparent: |
#5
| |||
| |||
|
|
colour1:=red; colour2:=blue; colour3:=white; body {background-color:colour3; color:colour2; border: thin solid colour1} h1 {background-color:colour2; color:colour3;} h2 {background-color:colour3; color:colour1;} etc ...you could change the entire site colour scheme more easily. ...it would save you minutes! |
#6
| |||
| |||
|
|
I will extend the example to make it more apparent: colour1:=red; colour2:=blue; colour3:=white; body {background-color:colour3; color:colour2; border: thin solid colour1} h1 {background-color:colour2; color:colour3;} h2 {background-color:colour3; color:colour1;} etc ...you could change the entire site colour scheme more easily. ...it would save you minutes! |
#7
| |||
| |||
|
|
example CSS file, "site.css.php": --------------------------------- ? header("Content-type: text/css"); $color1="red"; $color2="blue"; ? p { background-color: <?= $color1 ?>; color: <?= $color2 ?>; } --------------------------------- |
#8
| |||
| |||
|
|
Wouldn't that cause the stylesheet to be retrieved from the server again and again for every page? |
#9
| |||
| |||
|
|
Wouldn't that cause the stylesheet to be retrieved from the server again and again for every page? come again? How would that happen? |
![]() |
| Thread Tools | |
| Display Modes | |
| |