Skip to content

Instantly share code, notes, and snippets.

@dmitry dmitry/bem.scss
Created Apr 6, 2014

Embed
What would you like to do?
BEM shortcuts for SASS >= 3.3.0
// elements get appended with "__" and the $name
@mixin e($name) {
@at-root #{&}__#{$name} {
@content;
}
}
// modifiers get appended with "--" and the $name
@mixin m($name) {
@at-root #{&}--#{$name} {
@content;
}
}
// shortcut for @extend %name
@mixin x($name) {
@extend %#{$name} !optional;
}
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.