title: CSS - LESS class inheritance
body: <p>I'm using the styles from <a href="http://twitter.github.com/bootstrap/components.html#labels" rel="noreferrer">twitter bootstrap</a> and have a question about inheritance.</p>
  
  <p>I'd like to make two label classes that'd inherit the label styles from bootstrap.</p>
  
  <pre><code>.label-new {
      .label; .label-important;
  }
  .label-updated {
      .label; .label-warning;
  }
  </code></pre>
  
  <p>However, the above would result in LESS parse error "NameError: .label-important is undefined" because .label-important and .label-warning are defined using the following in bootstrap:</p>
  
  <pre><code>.label,
  .badge {
    // Important (red)
    &amp;-important         { background-color: @errorText; }
    &amp;-important[href]   { background-color: darken(@errorText, 10%); }
    // Warnings (orange)
    &amp;-warning           { background-color: @orange; }
    &amp;-warning[href]     { background-color: darken(@orange, 10%); }
  }
  </code></pre>
  
  <p>Is there any special syntax to inherit the .label-important/warning?</p>
  
  <p>Thanks in advance.</p>