Skip to content

Instantly share code, notes, and snippets.

@stefanoverna
Created December 5, 2013 20:51
Show Gist options
  • Select an option

  • Save stefanoverna/7813648 to your computer and use it in GitHub Desktop.

Select an option

Save stefanoverna/7813648 to your computer and use it in GitHub Desktop.
@mixin block($name)
@at-root .#{$name}
@content
@mixin element($names...)
$selector: ()
@each $name in $names
$selector: append($selector, unquote('#{&}__#{$name}'), comma)
@at-root #{$selector}
@content
@mixin modifier($names...)
$last-scope: &
$selector: ()
@each $name in $names
$selector: append($selector, unquote('#{&}--#{$name}'), comma)
@at-root #{$selector}
@extend #{$last-scope}
@content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment