Skip to content

property-no-deprecated

Reports a deprecated property (clip, word-wrap, grid-gap, the box-* properties of the old flexbox, …).

A deprecated property is replaced by another one, and browsers keep it working only for old pages. New code should use the replacement, which gets the fixes and new values.

To fix, use the replacement: overflow-wrap for word-wrap, gap for grid-gap, clip-path for clip.

Reported
...
a { word-wrap: break-word; clip: rect(0 0 0 0); -webkit-box-flex: 1; grid-gap: 1px }
...
css:
lint:
rules:
property-no-deprecated:
level: warn # off (default), warn, error
options:
ignore: []
less:
lint:
rules:
property-no-deprecated:
level: warn # off (default), warn, error
options:
ignore: []
scss:
lint:
rules:
property-no-deprecated:
level: warn # off (default), warn, 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-deprecated in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
stylelint property-no-deprecated partial -webkit-box-orient is not reported (stylelint reports it unless the value is vertical), and there is no fix.