-
-
Save mfd/74c8e0f5a8a396a213f7bb612f1d180f to your computer and use it in GitHub Desktop.
Less/Scss trick to generate BEM-styled selectors
This file contains 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
Less css trick to generate BEM-styled selectors, by Max Shirsin, http://noteskeeper.ru/1139 + Scss version | |
@block: ~".dm-import-feed"; | |
@{block} { | |
&_step_2 { | |
@{block}__page_step_2 { | |
display: block; | |
} | |
} | |
} |
This file contains 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
Scss variant of this hack | |
$block: #{".dm-import-feed"}; | |
#{$block} { | |
&_step_2 { | |
#{$block}__page_step_2 { | |
display: block; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment