title: Use part of class name as a css variable
body: <p>I'm using css to change the sizes of two divs so that their size represents some value that changes a few times per session.</p>
  
  <p>Is there anyway to define a css class something like:</p>
  
  <pre><code>.shiftydiv(*) {
      width:\1;
  }
  </code></pre>
  
  <p>where <code>\1</code> is whatever * matched? Then I can just add a class like <code>.shiftydiv25</code> via jquery whenever I need to change the size.</p>
  
  <p>I don't need legacy support for browsers and I'd prefer not adding any dependencies.
  If I can't do it with pure css I'll either create CSS classes dynamically or inject <code>style=</code> attributes into my code. Which would be better (less bad).</p>
  
  <p>EDIT:
  If there is  a nice way to do this with JS/jquery that would work well too.</p>
  
  <p>EDIT 2:
  So doing this with js is actually quite easy. oops</p>