title: LESS condition based on CSS class to set a LESS variable
body: <p>I need to set a Less variable to match the website's active theme, ie, each theme has a different color.</p>
  
  <p>I'd like to set @themeColor to the right color, based on the HTML's body CSS class that defines the theme.</p>
  
  <p>For example:</p>
  
  <pre><code>body.themeBlue { @themeColor: blue; }
  body.themeRed { @themeColor: red; }
  </code></pre>
  
  <p>This way I'd only need to use the @themeColor variable inside the other Less files.</p>
  
  <p>Can anyone help?
  According to this (<a href="http://www.lesscss.org/#-scope" rel="noreferrer">http://www.lesscss.org/#-scope</a>) it is possible to do something like that, but I can't make it work. what is going on here?</p>