Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.