Created
January 30, 2017 10:02
-
-
Save staeff/0db2e0c43d5ea216031c5363a2b88b4c to your computer and use it in GitHub Desktop.
Write BEM with SASS. BEM modules can be nested using the & to prefix our elements or modifiers
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
/* Sass 3.3+ w/BEM: */ | |
.object { | |
color: red; | |
&__descendant { | |
color: black; | |
} | |
} | |
/* Generates: | |
.object { | |
color: red; | |
} | |
.object__descendant { | |
color: black | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment