メインコンテンツにスキップ

at-rule-property-required-list

@規則に必要なプロパティのリストを指定します。

    @font-face { font-display: swap; font-family: 'foo'; }
/** ↑ ↑ ↑
* At-rule and required property names */

message セカンダリオプションは、このルールの引数を受け入れることができます。

オプション

object: { "at-rule-name": ["array", "of", "properties"]|"property" }

指定された場合

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

次のパターンは問題とみなされます

@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');
}

次のパターンは問題とはみなされません

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