Skip to content

Instantly share code, notes, and snippets.

@syahrasi
Last active December 28, 2015 11:29
Show Gist options
  • Select an option

  • Save syahrasi/7494179 to your computer and use it in GitHub Desktop.

Select an option

Save syahrasi/7494179 to your computer and use it in GitHub Desktop.
.block {
color: red;
}
.block__element {
color: green;
}
.block__element--modifier {
color: blue;
}
// http://sassmeister.com/gist/6994632
@mixin e($name) {
@at-root #{&}__#{$name} {
@content;
}
}
@mixin m($name) {
@at-root #{&}--#{$name} {
@content;
}
}
.block {
color: red;
@include e(element) {
color: green;
@include m(modifier) {
color: blue;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment