less / less.js

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

Allow !important case-insensitive token #3732

Closed lefevre00 closed 2 years ago

lefevre00 commented 2 years ago

What: Fixes https://github.com/less/less.js/issues/3731

Why: According to https://www.w3.org/TR/css-syntax-3/#consume-declaration the token important is case-insensitive.

How: Make the regex case-insensitive

Checklist:

iChenLei commented 2 years ago

Thank you for your contribution, LGTM. But also need @matthew-dean review.

https://www.w3.org/TR/css-syntax-3/#consume-declaration

  1. If the last two non-s in the declaration’s value are a with the value "!" followed by an with a value that is an ASCII case-insensitive match for "important", remove them from the declaration’s value and set the declaration’s important flag to true.
iChenLei commented 2 years ago

closed by https://github.com/less/less.js/issues/3731#issuecomment-1158242317