Created
May 26, 2017 14:45
-
-
Save lmosele/b533f1a67f85c02b8d0f6c3a6ae0bb93 to your computer and use it in GitHub Desktop.
Selector scoping in sass
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
/* $this will always target the top level selector */ | |
.filter-block { | |
$this: &; | |
&__title { | |
color: black; | |
} | |
&--expandable { | |
#{$this}__title { | |
color: blue; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment