at-rule-no-deprecated
Disallow deprecated at-rules.
@viewport {}/** ↑ * At-rules like this */Use this rule to avoid at-rules that browsers may remove at any time, e.g. @nest. Some already have, and a removed at-rule is ignored along with everything inside.
This rule reports at-rules 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 1 message argument: the deprecated at-rule.
Prior art:
Options
Section titled “Options”{ "at-rule-no-deprecated": true}The following patterns are considered problems:
@viewport {}a { @apply foo; }The following patterns are not considered problems:
@starting-style {}a { @layer {} }Optional secondary options
Section titled “Optional secondary options”ignoreAtRules
Section titled “ignoreAtRules”{ "ignoreAtRules": ["array", "of", "at-rules", "/regex/"] }Given:
{ "at-rule-no-deprecated": [true, { "ignoreAtRules": ["/^view/", "apply"] }]}The following patterns are not considered problems:
@viewport {}a { @apply foo; }