跳至主要內容

at-rule-property-required-list

為 at 規則指定所需屬性清單。

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

訊息次要選項可以接受此規則的參數。

選項

物件{ "at 規則名稱": ["陣列", "of", "屬性"]|"屬性" }

已提供

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