#9471·stylelint

Fix `declaration-property-value-no-unknown` problem message clarity for registered custom properties

Author: jeddy3Created Aug 31, 2026Updated Sep 3, 2026
Labelsstatus: needs discussion

What minimal example or steps are needed to reproduce the bug?

css
@property --foo {
  syntax: "<color>";
}

html {
  --foo: 1px;
}

What minimal configuration is needed to reproduce the bug?

javascript
export default {
  rules: {
    "declaration-property-value-no-unknown": true
  }
};

How did you run Stylelint?

Demo

Which Stylelint-related dependencies are you using?

json
{
  "stylelint": "17.14.1",
  "stylelint-config-standard": "40.0.0"
}

What did you expect to happen?

A clear problem message.

What actually happened?

Got:

6:10-13 error Unknown value "1px" for property "--foo" (declaration-property-value-no-unknown)

Do you have a proposal to fix the bug?

Append , registered as "${type}" supplementary context to the problem message, e.g.:

6:10-13 error Unknown value "1px" for property "--foo", registered as "<color>"  (declaration-property-value-no-unknown)

We'll be introducing the via ${customProperty supplementary context in:

These supplementary contexts can stack, e.g.:

css
@property --foo, --bar {
  syntax: "<color>";
}

html {
  --foo: 1px;
}

a {
  --bar: var(--foo);
}
11:10-13 error Unknown value "1px" for property "--bar", registered as "<color>", via "var(--foo)"  (declaration-property-value-no-unknown)

(I'd forgotten that declaration-property-value-no-unknown had the capability to check registered custom properties. I was only reminded of it by https://github.com/stylelint/stylelint/issues/9468). The new proposals are aligned with this direction of linting custom properties and their types.)