Skip to content

Instantly share code, notes, and snippets.

@anselmh
Created September 9, 2014 14:39
Show Gist options
  • Save anselmh/13528273742fdbdd4ead to your computer and use it in GitHub Desktop.
Save anselmh/13528273742fdbdd4ead to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="selector">
Hello World. Should be black
<p class="test">
This should be black.
</p>
</div>
<div class="selector test">
This should be red.
</div>
// ----
// Sass (v3.4.3)
// Compass (v1.0.1)
// ----
.selector {
color: black;
&[class*="test"] {
color: red;
}
}
.selector {
color: black;
}
.selector[class*="test"] {
color: red;
}
<div class="selector">
Hello World. Should be black
<p class="test">
This should be black.
</p>
</div>
<div class="selector test">
This should be red.
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment