Skip to content

Instantly share code, notes, and snippets.

@raulghm
Created November 24, 2014 18:46
Show Gist options
  • Save raulghm/38be6e1459ecabdb2c61 to your computer and use it in GitHub Desktop.
Save raulghm/38be6e1459ecabdb2c61 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com. http://sassmeister.com/gist/38be6e1459ecabdb2c61
.block
.block__element
p Lorem ipsum
.block__element--modifier
p Lorem ipsum
.block__element.block__element--modifier
p Lorem ipsum
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$module: 'block';
.#{$module} {
&__element {
color: red;
&--modifier {
color: green;
}
}
&--modifier {
.#{$module}__element {
color: blue;
}
}
}
.block__element {
color: red;
}
.block__element--modifier {
color: green;
}
.block--modifier .block__element {
color: blue;
}
<div class="block">
<div class="block__element">
<p>Lorem ipsum</p>
</div>
<div class="block__element--modifier">
<p>Lorem ipsum</p>
</div>
<div class="block__element block__element--modifier">
<p>Lorem ipsum</p>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment