Skip to content

Instantly share code, notes, and snippets.

@bigandy
Created March 6, 2014 22:04
Show Gist options
  • Save bigandy/9400717 to your computer and use it in GitHub Desktop.
Save bigandy/9400717 to your computer and use it in GitHub Desktop.
Sass Element and Modifier Mixins
// Mixins for element and modifier
//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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment