Skip to content

Instantly share code, notes, and snippets.

@just-be-dev
Created January 19, 2016 02:28
Show Gist options
  • Select an option

  • Save just-be-dev/7d108b45a14a19288edb to your computer and use it in GitHub Desktop.

Select an option

Save just-be-dev/7d108b45a14a19288edb to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="EditorialPromo media">
<header class="EditorialPromo media-headline">
Editorial Promo
</header>
</div>
// ----
// libsass (v3.3.2)
// ----
@mixin namespace($namespace: "") {
@at-root .#{$namespace} {
@content;
}
}
@mixin block($block) {
$namespace: #{&} + ".";
$prefix: if(#{&}, $namespace, "");
@at-root #{$prefix}#{$block} {
@content;
}
}
@mixin element($element) {
@at-root #{&}-#{$element} {
@content;
}
}
@mixin modifier($modifier) {
@at-root #{&}--#{$modifier} {
@content;
}
}
@include namespace(EditorialPromo) {
@include block(media) {
@include element(headline) {
font-weight: bold;
font-size: 36px;
}
}
}
.EditorialPromo.media-headline {
font-weight: bold;
font-size: 36px;
}
<div class="EditorialPromo media">
<header class="EditorialPromo media-headline">
Editorial Promo
</header>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment