Add `value-no-invalid`
Author: jeddy3Created Aug 29, 2026Updated Sep 9, 2026
Labelsstatus: wipsubtype: new rule
It would handle the parse errors and invalid math expressions from declaration-property-value-no-unknown.
- Name:
value-no-invalid - Primary option:
true - Secondary options: None.
- Autofixable: No
- Message:
Invalid value "${value}", ${reason} - Description: "Disallow invalid values"
- Section: "Avoid errors" -> "Invalid"
- Config: Yes, recommended in Stylelint 18.
We can set the csstree context to value, and mirror the structure of selector-no-invalid, e.g. surfacing csstree's message in the reason part of our problem message.
Ref: https://github.com/stylelint/stylelint/issues/9464#issuecomment-5456705372 & https://github.com/stylelint/stylelint/issues/9465#issuecomment-5464076285
Source: stylelint/stylelint