sass-textmate-bundle icon indicating copy to clipboard operation
sass-textmate-bundle copied to clipboard

Referencing Parent Selectors: &

Open vincentVDB opened this issue 10 years ago • 1 comments
trafficstars

& must appear at the beginning of a compound selector, but it can be followed by a suffix that will be added to the parent selector. For example:

#main {
  color: black;
  &-sidebar { border: 1px solid; }
}

'-sidebar' should have the same color as 'main' colorization working properly for '&: hover'

an other mistake with '-on'

&-on {
  background-color: $myColor;
}

vincentVDB avatar Sep 08 '15 23:09 vincentVDB

This also behaves different depending on wether the selector is followed by { or ,. See example images below.

image image

alextegelid avatar Aug 09 '16 09:08 alextegelid