Skip to content

Instantly share code, notes, and snippets.

@staeff
Created January 30, 2017 10:02
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 staeff/0db2e0c43d5ea216031c5363a2b88b4c to your computer and use it in GitHub Desktop.
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
/* 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