Skip to main content

at-rule-no-deprecated

禁止弃用的 at 规则。

¥Disallow deprecated at-rules.

    @viewport {}
/** ↑

* At-rules like this */

此规则标记在 CSS 规范(包括编辑草稿)中被删除或弃用的 at 规则,随后:

¥This rule flags 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

  • 在某个时间点有一个 MDN 页面

    ¥had an MDN page at one point in time

fix 选项 可以自动修复此规则报告的一些问题。

¥The fix option can automatically fix some of the problems reported by this rule.

message 次要选项 接受参数。

¥The message secondary option accept arguments.

现有技术:

¥Prior art:

选项

¥Options

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

ignoreAtRules: ["/regex/", /regex/, "string"]

鉴于:

¥Given:

["/^view/", "apply"]

以下模式不被视为问题:

¥The following patterns are not considered problems:

@viewport {}
a { @apply foo; }