src/content/docs/linter/rules/no-unknown-property.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="CSS" icon="seti:css"> ## Summary - Rule available since: `v1.8.0` - Diagnostic Category: [`lint/correctness/noUnknownProperty`](/reference/diagnostics#diagnostic-category) - This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - Sources: - Same as [`property-no-unknown`](https://github.com/stylelint/stylelint/blob/main/lib/rules/property-no-unknown/README.md){
"linter": {
"rules": {
"correctness": {
"noUnknownProperty": "error"
}
}
}
}
Disallow unknown properties.
This rule considers properties defined in the CSS Specifications and browser specific properties to be known. https://github.com/known-css/known-css-properties#source
This rule ignores:
--custom-property-moz-align-self, -webkit-align-self)a {
colr: blue;
}
a {
my-property: 1;
}
a {
color: green;
}
a {
fill: black;
}
a {
-moz-align-self: center;
}
ignoreA list of unknown property names to ignore (case-insensitive).
{
"linter": {
"rules": {
"correctness": {
"noUnknownProperty": {
"options": {
"ignore": [
"custom-property"
]
}
}
}
}
}
}
a {
custom-property: black;
}