Skip to main content

media-feature-name-disallowed-list

指定禁止的媒体功能名称列表。

¥Specify a list of disallowed media feature names.

@media (min-width: 700px) {}
/** ↑

* This media feature name */

message 次要选项 可以接受该规则的参数。

¥The message secondary option can accept the arguments of this rule.

选项

¥Options

array|string|regex["array", "of", "unprefixed", /media-features/, "regex"]|"media-feature"|"/regex/"|/regex/

鉴于:

¥Given:

["max-width", "/^my-/"]

以下模式被视为问题:

¥The following patterns are considered problems:

@media (max-width: 50em) {}
@media (my-width: 50em) {}
@media (max-width < 50em) {}
@media (10em < my-height < 50em) {}

以下模式不被视为问题:

¥The following patterns are not considered problems:

@media (min-width: 50em) {}
@media print and (min-resolution: 300dpi) {}
@media (min-width >= 50em) {}
@media (10em < width < 50em) {}