css variables

Joseph Sinclair plug-discussion at stcaz.net
Thu Feb 8 08:55:24 MST 2007


The first form gathers common definitions (like colors which typically are not named because the named colors don't look very good) together near the top where it's easy to change them and keep them consistent.
For instance, one could design a school team style in CSS for a team with white/blue colors (and using a dozen or so shades thereof), then easily change it for another team with green/yellow colors without hunting through the whole document or running the risk of missing some places where the colors are defined.

keith smith wrote:
> I don't see the advantage of 
> 
> 
>>   .patrician { color: purple; }
>>   .warning { color: red; }
>>   <<Bunch of other stuff>>
>>   .patrician
>>   {
>>     font-family: PalatinoOldEnglish;
>>     font-size: 1.2em
>>     ...
>>   }
>  over 
> 
> 
> .patrician { 
>    color: purple; 
>    font-family: PalatinoOldEnglish;
>    font-size: 1.2em
>    ...
> }
>  
> I must be missing something and I'm not sure how this answers the question at hand.
> 
> Thanks in advance for your response,
> Keith 
> 
> 


More information about the PLUG-discuss mailing list