title: CSS: Style applied to a combination of classes?
body: <p>I'm not sure this is possible, but is there a syntax to be used in CSS when you want to style an element based on the combination of classes applied to it?</p>
  
  <p>I understand that I can check an element with jQuery or something and change it's style based on the classes it has, but is there a pure CSS way to do this?</p>
  
  <p>For example, if I have a class for bold and green:</p>
  
  <pre><code>.bold_green { color:green; font-weight:bold; }
  </code></pre>
  
  <p>And a class for bold and blue:</p>
  
  <pre><code>.bold_blue { color:blue; font-weight:bold. }
  </code></pre>
  
  <p>Now, say I am using jQuery to add and remove classes dynamically and want any element that has both classes to turn italic pink.</p>
  
  <p>Something like:</p>
  
  <pre><code>.bold_green AND .bold_blue { color:pink; font-style:italic; }
  </code></pre>
  
  <p>Or, if I want to style an element that has aclass, and is a descendant of another element that has another class?</p>
  
  <p>Something like:</p>
  
  <pre><code>.bold_green HAS_CHILD .bold_blue { color:black; background-color:yellow; }
  </code></pre>
  
  <p>Thanks!</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Thanks for all the answers.  These are pretty much what I thought (just treating the classes as regular selectors), but they don't seem to be working for me.  I will have to check my code and make sure they aren't being overridden somehow...</p>