Skip to content

Instantly share code, notes, and snippets.

@lmosele
Created May 26, 2017 14:45
Show Gist options
  • Save lmosele/b533f1a67f85c02b8d0f6c3a6ae0bb93 to your computer and use it in GitHub Desktop.
Save lmosele/b533f1a67f85c02b8d0f6c3a6ae0bb93 to your computer and use it in GitHub Desktop.
Selector scoping in sass
/* $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