HighDots Forums  

Re: Defining a color variable

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: Defining a color variable in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mary Ellen Curtin
 
Posts: n/a

Default Re: Defining a color variable - 07-31-2003 , 11:07 AM






Urban wrote:
Quote:
I'd write the CSS file so that each colour combination
only occurs once and put non-colour properties in another
section of the file.
Do you mean:

/*color properties for theme */
h1, h2 { color: #b60600;}
..box { background: #b60600;}
#logo {border: #b60600;}

and then have the other properties for h1, h2, .box, #logo, etc. in
separate declarations?

Hmm. That's longer than the other suggestions, but easier to follow. It
makes particular sense in this case because the client really has a
two-color theme, where some visually important elements are rust
(above) and others are dark green -- but they could change to purple and
lime at any moment.

Mary Ellen
Doctor Science, MA




Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: Defining a color variable - 08-04-2003 , 08:04 AM






In article <BzaWa.905$5x.82451504 (AT) news (DOT) netcarrier.net>,
Mary Ellen Curtin <mecurtin (AT) NOalumni (DOT) SPAMprinceton.HEREedu> wrote:

Quote:
Do you mean:

/*color properties for theme */
h1, h2 { color: #b60600;}
.box { background: #b60600;}
#logo {border: #b60600;}

and then have the other properties for h1, h2, .box, #logo, etc. in
separate declarations?
Pretty much, yes.
I'd do
h1, h2, .box { color: #b60600; background: #e0e050; }
#logo {color: green; background: yellow; }
and so on, so that every colour combination is only
in one place instead of repeating for example rust.
--
Urban Fredriksson http://www.canit.se/%7Egriffon/
1) What is happening will continue to happen
2) Consider the obvious seriously
3) Consider the consequences - Asimov's "Three Laws of Futurics", F&SF, Oct 74


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.