[thelist] CSS variables ?

Bojan Tesanovic btesanovic at gmail.com
Fri Apr 18 11:10:52 CDT 2008


Yeah
I thought of this way though,
Handling headers for CSS is trickier than it looks, as you need to
handle
Etags
HTTP 304: Not Modified
Last-Modified  ...
so it can be PITA

So what I am thinking of is to make, PHP handles CSS for testing
and with JS on the page I can call different params for respected CSS  
file, than tune colors until satisfied.
After that I just need to save that color scheme generate static CSS  
and thats it.
Hm this is a good idea to make an online tool with this  
functionality ....


On Apr 18, 2008, at 10:41 AM, Joost van Velzen wrote:

> 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.
>>
>>
>>
>>
>>
>>
>>
>
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

Bojan Tesanovic
http://www.carster.us/







More information about the thelist mailing list