Skip to content

Instantly share code, notes, and snippets.

@csswizardry
Created December 1, 2015 11:00
Show Gist options
  • Save csswizardry/327ba6f08cd47460804c to your computer and use it in GitHub Desktop.
Save csswizardry/327ba6f08cd47460804c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="header">
<a href="#0">Link</a>
<a href="#0" class="btn foo">Button</a>
</div>
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
@mixin bump() {
/**
* Increase specificity of `#{&}`.
*/
&#{&} {
@content;
}
}
.header {
background: red;
}
.header a {
color: white;
}
.btn {
background: white;
@include bump() {
color: red;
}
}
.header {
background: red;
}
.header a {
color: white;
}
.btn {
background: white;
/**
* Increase specificity of `.btn`.
*/
}
.btn.btn {
color: red;
}
<div class="header">
<a href="#0">Link</a>
<a href="#0" class="btn foo">Button</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment