media-feature-name-value-no-unknown
禁止媒体特性的未知值。
¥Disallow unknown values for media features.
@media (color: red) {}
/** ↑ ↑
* feature and value pairs like these */
该规则认为 CSS 规范中定义的媒体特性的值是已知的。
¥This rule considers values for media features defined within the CSS specifications to be known.
此规则仅适用于 CSS。你不应该为类似 CSS 的语言(例如 Sass 或 Less)打开它,因为它们有自己的语法。
¥This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as Sass or Less, as they have their own syntaxes.
该规则是实验性的,存在一些误报,我们将在次要版本中修补这些漏报。
¥This rule is experimental with some false negatives that we'll patch in minor releases.
它有时与以下内容重叠:
¥It sometimes overlaps with:
如果标记了重复问题,你可以关闭相应的规则。
¥If duplicate problems are flagged, you can turn off the corresponding rule.
message
次要选项 可以接受该规则的参数。
¥The message
secondary option can accept the arguments of this rule.
选项
¥Options
true
以下模式被视为问题:
¥The following patterns are considered problems:
@media (color: red) { top: 1px; }
@media (width: 10) { top: 1px; }
@media (width: auto) { top: 1px; }
以下模式不被视为问题:
¥The following patterns are not considered problems:
@media (color: 8) { top: 1px; }
@media (width: 10px) { top: 1px; }