declaration-property-value-keyword-no-deprecated
Disallow deprecated keywords for properties within declarations.
a { color: ThreeDDarkShadow; }/** ↑ ↑ * property and value pairs like these */Use this rule to avoid keywords that browsers may remove at any time, e.g. the deprecated system colors. Some already have, and a removed keyword invalidates the whole declaration.
This rule reports keywords that were removed or deprecated after being in the CSS specifications, including editor drafts, and were subsequently either:
- shipped in a stable version of a browser
- shipped by a developer channel/edition browser
- shipped but behind experimental flags
- polyfilled with some adoption before any browser actually shipped
- had an MDN page at one point in time
The fix option can automatically fix some of the problems reported by this rule.
This rule supports 2 message arguments: the property name and the deprecated keyword.
Prior art:
Options
Section titled “Options”{ "declaration-property-value-keyword-no-deprecated": true}The following patterns are considered problems:
a { overflow: overlay; }a { text-justify: distribute; }The following patterns are not considered problems:
a { overflow: auto; }a { text-justify: inter-character; }Optional secondary options
Section titled “Optional secondary options”ignoreKeywords
Section titled “ignoreKeywords”{ "ignoreKeywords": ["array", "of", "keywords", "/regex/"] }Given:
{ "declaration-property-value-keyword-no-deprecated": [ true, { "ignoreKeywords": ["ActiveBorder", "/caption/i"] } ]}The following patterns are not considered problems:
a { color: ActiveBorder;}a { color: InactiveCaptionText;}