Skip to content

Instantly share code, notes, and snippets.

@csswizardry
Created February 10, 2015 14:16
Show Gist options
  • Save csswizardry/ae8889db9b2a57d57e48 to your computer and use it in GitHub Desktop.
Save csswizardry/ae8889db9b2a57d57e48 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="box"><a href="#0" class="btn">Foo</a></div>
<p class="foo" id="foo">Lorem ipsum</p>
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
// Hack specificity up
.btn.btn {
color: red;
background: white;
}
.box {
color: white;
background: red;
}
.box a {
color: white;
}
// Hack specificity down
[id="foo"] {
color: blue;
}
.foo {
color: green;
}
.btn.btn {
color: red;
background: white;
}
.box {
color: white;
background: red;
}
.box a {
color: white;
}
[id="foo"] {
color: blue;
}
.foo {
color: green;
}
<div class="box"><a href="#0" class="btn">Foo</a></div>
<p class="foo" id="foo">Lorem ipsum</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment