sassc-ruby icon indicating copy to clipboard operation
sassc-ruby copied to clipboard

Empty nested selector creates repeat of parent selector

Open Convincible opened this issue 4 years ago • 0 comments

In sassc 2.4.0 the following code with a stray comma:

.parent {
   .child1, .child2, {
      font: Serif;
   }
}

will output:

.parent .child1, .parent .child2, .parent { font: Serif }

Note the repetition of .parent on its own. This behaviour is different to sass 2.2.0 in which the errant comma would be ignored, leading to the output:

.parent .child1, .parent .child2 { font: Serif }

As this is a breaking change between 2.2.0 and 2.4.0 (I was unable to test 2.3.0) this probably ought to be noted somewhere?

Convincible avatar Mar 12 '21 14:03 Convincible