Skip to content

Instantly share code, notes, and snippets.

@jhogue
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhogue/169c7c2133e86daea47e to your computer and use it in GitHub Desktop.
Save jhogue/169c7c2133e86daea47e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="widget">
<h3 class="widget--title">Archives by Date</h3>
<ul class="widget--list">
<li><a class="widget--link" href="#">October 2014</a></li>
<li><a class="widget--link widget--link__selected" href="#">July 2014</a></li>
</ul>
</div>
<div class="widget widget__alt">
<h3 class="widget--title">Archives by Date Alt</h3>
<ul class="widget--list">
<li><a class="widget--link" href="#">October 2014</a></li>
<li><a class="widget--link widget--link__selected" href="#">July 2014</a></li>
</ul>
</div>
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
// BEM: Block--element__modifier
.widget {
// Elements
&--title { color: blue; }
&--list { margin-right: 0; }
&--link {
text-transform: uppercase;
color: grey;
// Modifiers
&__selected { color: red; }
}
// Top-level Modifiers
&__alt &--title { color: green; }
&__alt &--link__selected { color: green; }
}
.widget--title {
color: blue;
}
.widget--list {
margin-right: 0;
}
.widget--link {
text-transform: uppercase;
color: grey;
}
.widget--link__selected {
color: red;
}
.widget__alt .widget--title {
color: green;
}
.widget__alt .widget--link__selected {
color: green;
}
<div class="widget">
<h3 class="widget--title">Archives by Date</h3>
<ul class="widget--list">
<li><a class="widget--link" href="#">October 2014</a></li>
<li><a class="widget--link widget--link__selected" href="#">July 2014</a></li>
</ul>
</div>
<div class="widget widget__alt">
<h3 class="widget--title">Archives by Date Alt</h3>
<ul class="widget--list">
<li><a class="widget--link" href="#">October 2014</a></li>
<li><a class="widget--link widget--link__selected" href="#">July 2014</a></li>
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment