title: Get parent attribute value in sass
body: <p>I am trying to create a top level <code>&lt;a&gt;</code> styling for the for my application using sass. Most of the links across the site are green so I have this as a style. (I'm using compass for the <code>darken</code> function)</p>
  
  <pre><code>a {
    color: green;
  
    &amp;:hover {
      color: darken(green, 10%);
    }
  }
  </code></pre>
  
  <p>However, in certain cases the links aren't green. In these cases I'll have to specify both the text color and the hover color, otherwise it will default to hovering to green. I am wondering if there is a way to do this DRYer. Ideally I would be able to get the parent classes color, like so.</p>
  
  <pre><code>a {
    color: green;
  
    &amp;:hover {
      color: darken(parent(color), 10%);
    }
  }
  </code></pre>
  
  <p>That way the hover will always default to whatever the color of the specific  is. Does this make sense? Is something like this possible? If not, what's the best way to handle this? A Mixin?</p>
  
  <p>Thanks!</p>