Created
December 19, 2018 09:10
-
-
Save certainlyakey/27cd1f1caf74b89799cbd26580039776 to your computer and use it in GitHub Desktop.
Component mixin example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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