Skip to main content

at-rule-property-required-list

为 at-rule 指定所需描述符列表(以前标记为属性)。

¥Specify a list of required descriptors (previously labelled as properties) for an at-rule.

    @font-face { font-display: swap; font-family: 'foo'; }
/** ↑ ↑ ↑

* At-rule and required descriptor names */

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

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

选项

¥Options

object{ "at-rule-name": ["array", "of", "descriptors"]|"descriptor" }

鉴于:

¥Given:

{
"font-face": ["font-display", "font-family", "font-style"]
}

以下模式被视为问题:

¥The following patterns are considered problems:

@font-face {
font-family: 'foo';
src: url('./fonts/foo.woff2') format('woff2');
}
@font-face {
font-family: 'foo';
font-style: normal;
src: url('./fonts/foo.woff2') format('woff2');
}

以下模式不被视为问题:

¥The following patterns are not considered problems:

@font-face {
font-display: swap;
font-family: 'foo';
font-style: normal;
src: url('./fonts/foo.woff2') format('woff2');
}