less / less.js

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

SyntaxError for valid CSS #3670

Closed bedax closed 2 years ago

bedax commented 2 years ago

Hello, the following works:

:where([aria-hidden="false" i][hidden]) {
  display: initial;
}

While the following does not:

:where([aria-hidden="false" i][hidden]:not(:focus)) {
  display: initial;
}

It gives the following error:

SyntaxError: expected ']' got 'i'

This is with lessc 4.1.2 (Less Compiler) [JavaScript].

Thank you!

iChenLei commented 2 years ago

less.js's current support for modern css is not very good

https://caniuse.com/?search=where https://developer.mozilla.org/en-US/docs/Web/CSS/:where [Selectors Level 4]

matthew-dean commented 2 years ago

@iChenLei The issue isn't :where, that's a standard pseudo-class; it's missing support for the i attribute modifier. Pretty sure this is a duplicate issue.

iChenLei commented 2 years ago

@matthew-dean I noticed that , sir. https://drafts.csswg.org/selectors/#attribute-case Can you give me some clues to fix this bug ? (source code position ?)

iChenLei commented 2 years ago

https://github.com/less/less.js/issues/3027 Releative issue

bedax commented 2 years ago

This seems to have been fixed by #3673. Thank you!