title: Know if the class exists with scss
body: <p><strong>Short description:</strong></p>
  
  <p>I'm using scss with compass, I need to know that the class exists or not.</p>
  
  <p><strong>Long Description:</strong></p>
  
  <p>What I'm trying to do is create a mixin for margin. We can pass the margin we need for all the dimensions and if will check dose any class exists for that dimensions if yes than it will extent it else will apply the dimension. For example:</p>
  
  <p>I already have .mr5 class which is </p>
  
  <pre><code> .mr5 { margin-right: 5px; }
  </code></pre>
  
  <p>Now if the value passed in the mixin for the right dimension is 5 than I want to check if first something like </p>
  
  <pre><code>if ( exist .mr5 ) { @extend .mr5; } else { right: $dimension; }
  </code></pre>