Last active
January 26, 2016 16:37
-
-
Save zephraph/285ffbb0f20c2b900e3e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="EditorialPromo"> | |
<header class="EditorialPromo-headline"> | |
Editorial Promo | |
</header> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.3.2) | |
// ---- | |
@mixin block($block) { | |
@at-root .#{$block} { | |
@content; | |
} | |
} | |
%module { | |
margin: 5px; | |
padding: 2px; | |
} | |
// Block alias | |
@mixin module($args...) { | |
@include block($args...) { | |
@extend %module; | |
@content; | |
}; | |
} | |
@mixin element($element) { | |
@at-root #{&}-#{$element} { | |
@content; | |
} | |
} | |
%normal-headline { | |
font-size: 32px; | |
} | |
@mixin headline($type) { | |
@include element('#{$type}-headline') { | |
@extend #{$type}-headline; | |
@content; | |
} | |
} | |
@mixin modifier($modifier) { | |
@extend &; | |
@at-root #{&}--#{$modifier} { | |
@content; | |
} | |
} | |
// Definition | |
/* | |
@include module('EditorialPromo') { | |
test: $this; | |
@include headline() { | |
type: $editorialPromo-headline; | |
} | |
} | |
*/ | |
.EditorialPromo { | |
//@extend %module; | |
test: this; | |
&-headline { | |
//@extend %normal-headline; | |
type: headline; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@include module('EditorialPromo') { | |
test: $this; | |
@include headline() { | |
type: $editorialPromo-headline; | |
} | |
} | |
*/ | |
.EditorialPromo { | |
test: this; | |
} | |
.EditorialPromo-headline { | |
type: headline; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="EditorialPromo"> | |
<header class="EditorialPromo-headline"> | |
Editorial Promo | |
</header> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment