css variables

Craig White craigwhite at azapple.com
Thu Feb 8 08:58:58 MST 2007


On Thu, 2007-02-08 at 08:55 -0700, Joseph Sinclair wrote:
> 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.
----
that's why he's da man - bingo
----
> 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.
----
I have a lot (27 currently, soon to be more) of models, each with it's
own css file which is the virtually the same but each model does have a
different color scheme. Basically, each model has 3 different
shades/saturations of a single color and this may be in background,
tabs, tables, buttons, etc.

If I can have the colors defined at the top, I don't have to play hide
and seek. Joshua is probably accurate that I could probably do some more
clever aggregation of the styles to lessen the number of places that I
am defining the colors but that isn't going to completely solve the fact
that each of these css files is several hundred lines and if I can
simply define the changeable item, the colors at the top of the file, I
won't have to play hide and seek. I am relatively unconvinced that
saving 10 lines of code by cleverly aggregating the styles isn't worth
the difficulty of working backwards through the styles to figure out
which definition is making it happen in favor of a single style
definition that makes it obvious.

Clearly Joseph's been down this road before, seems as though he's been
down all of these roads before and I am incredibly jealous not only of
his knowledge but also his retention. Evidently he is not a child of the
60's

Craig
----
> 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 
> > 
> > 
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss



More information about the PLUG-discuss mailing list