Skip to content

Instantly share code, notes, and snippets.

@kirkas
Last active August 29, 2015 14:13
Show Gist options
  • Save kirkas/0dd2cab9927568909515 to your computer and use it in GitHub Desktop.
Save kirkas/0dd2cab9927568909515 to your computer and use it in GitHub Desktop.
/*------------------------------------*\
BEM WITHOUT USE OF MIXIN
\*------------------------------------*/
.sky {
// .sky
&__cloud {
// .sky__cloud
&--rainy {
// .sky__cloud--rainy
}
}
&--clear {
// .sky--clear
.sky__cloud {
// .sky--clear .block__cloud
}
}
}
/*------------------------------------*\
BEM WITH USE OF MIXIN
\*------------------------------------*/
.sky {
// .sky
@include e("cloud") {
// .sky__cloud
@include m("rainy") {
// .block__cloud--rainy
}
}
@include m("clear") {
// .sky--clear
@include e("cloud") {
// .sky--clear .block__cloud
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment