less.js icon indicating copy to clipboard operation
less.js copied to clipboard

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

Open matthew-dean opened this issue 1 year ago • 1 comments

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:

  • less version: 4.2.0
  • nodejs version: Current Less preview
  • operating system:

matthew-dean avatar Apr 14 '24 18:04 matthew-dean

assign this to me

prathameshkhandare avatar Oct 03 '24 18:10 prathameshkhandare

I was working on this issue in my fork and came up with a PR that passes tests: https://github.com/less/less.js/pull/4290

puckowski avatar Nov 26 '24 00:11 puckowski

Should be resolved via https://github.com/less/less.js/pull/4290 Release v4.2.2

puckowski avatar Jan 30 '25 23:01 puckowski