[thelist] CSS variables ?
Joost van Velzen
joost at nr6.nl
Fri Apr 18 03:41:08 CDT 2008
As Hassan Schroeder already wrote you can generate it on the fly.
To me it looks like you are used to PHP language. Just save the css file
as a .PHP file, put in top of the file
header("Content-type: text/css");
and call it in a normal way:
<link rel="stylesheet" type="text/css" href="your-css-file.php" />
Good luck with that :-)
Cheers
Joost
Bojan Tesanovic wrote:
> Hi people,
> Wondering if there is such CSS feature like variables.
>
> What I need is to define 4 colors at the top of CSS and use those
> through out CSS.
> Here is example
>
> $color1 = darkblue;
> $color2 = blue;
> $color3 = silver;
> $color4 = lightblue;
>
> h1{color: $color1}
> .mystle{color: $color3}
> .container {color: $color1; background-color: $color4; border: 2px
> solid $color3 }
>
> etc
>
>
> so I can easily change top colors until I get nice color combination
> for site.
> If there is some other way I am happy to listen.
>
>
>
> Bojan Tesanovic
> http://www.carster.us/
>
>
>
>
More information about the thelist
mailing list