Skip to content

Instantly share code, notes, and snippets.

@heavymery
Created November 26, 2015 08:16
Show Gist options
  • Save heavymery/e0315607c1c11351e3a9 to your computer and use it in GitHub Desktop.
Save heavymery/e0315607c1c11351e3a9 to your computer and use it in GitHub Desktop.
/// Block Element
/// @access public
/// @param {String} $element - Element's name
@mixin element($element) {
&__#{$element} {
@content;
}
}
/// Block Modifier
/// @access public
/// @param {String} $modifier - Modifier's name
@mixin modifier($modifier) {
&--#{$modifier} {
@content;
}
}
/// @alias element
@mixin e($element) {
@include element($element) {
@content;
}
}
/// @alias modifier
@mixin m($modifier) {
@include modifier($modifier) {
@content;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment