title: Variablize a CSS class?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/30170/avoiding-repeated-constants-in-css">Avoiding repeated constants in CSS</a>  </p>
  </blockquote>
  
  
  
  <p>I want to include a class within a class - sort of like variablizing a class - so that I can define something once and use it throughout the sheet.  If I change the color, it changes everything.</p>
  
  <pre><code>.myFontColor{color:blue;}
  .myTitle{font-size:large; myFontColor}
  .myHeader{font-weight:bold; myFontColor}
  </code></pre>
  
  <p>The only way I see to do this is. To include every class name in the definition, but if I have 20 or 30 items in the sheet referring to that color, it's going to get ugly really fast.</p>
  
  <pre><code>.myFontColor, .myTitle, .myHeader{color:blue;}
  .myTitle{font-size:large;}
  .myHeader{font-weight:bold;}
  </code></pre>
  
  <p>or to list a each class when I create an element, which gets a little messy too.</p>
  
  <pre><code>&lt;div class="myFontColor myTitle myHeader"&gt;
  </code></pre>
  
  <p>Thanks for your help.</p>