less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
16.99k stars 3.41k forks source link

Nested pseudo-selectors that take selectors eport missing a closing ')' when separated by commas #4268

Open matthew-dean opened 2 months ago

matthew-dean commented 2 months ago

To reproduce:

a:is(.b, :is(.c)) {
  color: blue;
}

Current behavior:

Reports Missing closing ')' even though parentheses are balanced. This is true for :is(), :where(), and :not() which all can accept selector lists, meaning those selector lists may also have :is(), :where(), and :not(). It's possible that those pseudo-selectors are not parsing their contents as selectors.

Expected behavior:

Selectors should support nesting of selectors within pseudo-selectors that take relative selector lists as input

Environment information: