Skip to content

Instantly share code, notes, and snippets.

@certainlyakey
Created December 19, 2018 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save certainlyakey/27cd1f1caf74b89799cbd26580039776 to your computer and use it in GitHub Desktop.
Save certainlyakey/27cd1f1caf74b89799cbd26580039776 to your computer and use it in GitHub Desktop.
Component mixin example
@mixin c-component-a($base_class: &) {
// styling for the root tag
color:gray;
// styling for elements and modifiers
// it is contained within @at-root directive to lower specificity
@at-root {
#{$base}__element-a {
width:400px;
}
#{$base}--some-modifier {
color:red;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment