property-no-unknown
CSS / SCSS / LessCSS / SCSS / LessCSS / SCSS / Lesscorrectnessno fixdefault: warncss/stylelint-recommended
What it does
Section titled “What it does”Reports a property that no CSS specification lists. Vendor-prefixed and custom properties, descriptors of @font-face and the like, and names with interpolation or SCSS and Less variables are not reported. The option ignore lists names to leave out.
Why it matters
Section titled “Why it matters”An unknown property is almost always a typo (colour) or a property that is not yet supported, and the browser drops the declaration without an error, so the style is silently missing.
To fix, correct the name.
Example
Section titled “Example”... right: 0; g { x: y }... z: w }...}...Configuration
Section titled “Configuration”css: lint: rules: property-no-unknown: level: warn # off, warn (default), error options: ignore: []less: lint: rules: property-no-unknown: level: warn # off, warn (default), error options: ignore: []scss: lint: rules: property-no-unknown: level: warn # off, warn (default), error options: ignore: []| Option | Type | Default | Description |
|---|---|---|---|
ignore |
list | [] |
Names left out: names, or /regex/. |
Enabled by the presets: css/stylelint-recommended.
Suppress one line with sudsy-disable-next-line property-no-unknown in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | property-no-unknown |
full |
| stylelint-scss | scss/property-no-unknown |
full |