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   
Jon Frechette
 
Posts: n/a

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






How about using color "classes" ?

..mainFg1 { color: #c03; }
..mainFg2 { color: #090; }
..mainBg1 { background-color: #ccc; }
..mainBg2 { background-color: #fee; }

<div class="mainFg1 mainBg1">
<h1 class="mainFg2">Lorum ipsum dolor sit amet.</h1>
<p>Lorum ipsum dolor sit amet.</p>
<blockquote class="mainBg2">Lorum ipsum dolor sit amet.</blockquote>
<p>Lorum ipsum <span class="mainFg2 ">dolor</span> sit amet.<p>
</div>

"Mary Ellen Curtin" <mecurtin (AT) NOalumni (DOT) SPAMprinceton.HEREedu> wrote in
message newsyYVa.900$tj.81755222 (AT) news (DOT) netcarrier.net...
Quote:
Suppose there's a specific "theme" color the client wants in a bunch of
different elements: h1, h2, some borders, the company name when it's
inside the text. And suppose you know that the client is going to be
trying out different theme colors, and probably altering which elements
take the theme color. Is it possible to define a variable name
("themecolor") once in a CSS, and then use that variable name
wherever you need it -- e.g. h1, h2{color: "themecolor";} .box
{background: "themecolor";} -- so that you can go from one color scheme
to another (and back) by making only a single change?

Mary Ellen
Doctor Science, MA





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.