sass / sassc-ruby

Use libsass with Ruby!
MIT License
366 stars 156 forks source link

Empty nested selector creates repeat of parent selector #221

Open Convincible opened 3 years ago

Convincible commented 3 years ago

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?