Skip to content

Instantly share code, notes, and snippets.

@jhgaylor
Created July 31, 2014 05:48
Show Gist options
  • Save jhgaylor/fce2480d12a96b316571 to your computer and use it in GitHub Desktop.
Save jhgaylor/fce2480d12a96b316571 to your computer and use it in GitHub Desktop.
<div class="wall-full-screen-template other-class">
<ul class="foo">
<li class="bar">a</li>
<li class="bar">b</li>
<li class="bar">c</li>
<li class="bar">d</li>
<li class="bar baz">e</li>
</ul>
</div>
.wall-full-screen-template {
.foo {
// this is applied to any .foo inside of a .wall-full-screen-template (children, grandchildren, etc)
.bar {
// this is applied to any .bar inside a .foo inside a .wall-full-screen-template
&.baz {
// this is applied to any .bar.baz inside a .foo inside a .wall-full-screen-template
}
}
}
&.other-class {
//this gets applied to any element w/ both .wall-full-screen-template and other-class
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment