Skip to main content

declaration-property-value-keyword-no-deprecated

禁止在声明中的属性中使用已弃用的关键字。

¥Disallow deprecated keywords for properties within declarations.

  a { color: ThreeDDarkShadow; }
/** ↑ ↑

* property and value pairs like these */

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

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

  • 在某个时间点有一个 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.

现有技术:

¥Prior art:

选项

¥Options

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

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

鉴于:

¥Given:

["ActiveBorder", "/caption/i"]

以下模式不被视为问题:

¥The following patterns are not considered problems:

a {
color: ActiveBorder;
}
a {
color: InactiveCaptionText;
}