Skip to content

Instantly share code, notes, and snippets.

@fredyang
Created January 29, 2014 06:15
Show Gist options
  • Save fredyang/8682816 to your computer and use it in GitHub Desktop.
Save fredyang/8682816 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
//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;
}
}
.speech-bubble{
color: purple;
@include e(header){ //header element
color: orange;
}
@include e(text){ //text element
color: black;
@include m(link){ //link modifier
color: green;
}
}
}
.speech-bubble {
color: purple;
}
.speech-bubble__header {
color: orange;
}
.speech-bubble__text {
color: black;
}
.speech-bubble__text--link {
color: green;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment