Skip to content

noUnknownProperty (CSS)

Language CSS
biome.json
{
"linter": {
"rules": {
"correctness": {
"noUnknownProperty": "error"
}
}
}
}

Disallow unrecognized CSS properties.

The known-property list includes standard and browser-specific properties from known-css-properties. Custom properties such as --custom-property and vendor-prefixed properties such as -moz-align-self or -webkit-align-self are allowed.

a {
colr: blue;
}
code-block.css:2:3 lint/correctness/noUnknownProperty ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ Unknown property is not allowed.

1 │ a {
> 2 │ colr: blue;
│ ^^^^
3 │ }
4 │

ℹ See CSS Specifications and browser specific properties for more details.

ℹ To resolve this issue, replace the unknown property with a valid CSS property.

a {
my-property: 1;
}
code-block.css:2:3 lint/correctness/noUnknownProperty ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ Unknown property is not allowed.

1 │ a {
> 2 │ my-property: 1;
│ ^^^^^^^^^^^
3 │ }
4 │

ℹ See CSS Specifications and browser specific properties for more details.

ℹ To resolve this issue, replace the unknown property with a valid CSS property.

a {
color: green;
}
a {
fill: black;
}
a {
-moz-align-self: center;
}

Lists additional property names to allow, without regard to letter case. Defaults to an empty list.

biome.json
{
"linter": {
"rules": {
"correctness": {
"noUnknownProperty": {
"level": "on",
"options": {
"ignore": [
"custom-property"
]
}
}
}
}
}
}
a {
custom-property: black;
}