at-rule-property-required-list
Specify a list of required properties (or descriptors) for an at-rule.
@font-face { font-display: swap; font-family: 'foo'; }/** ↑ ↑ ↑ * At-rule and required descriptor names */Use this rule to enforce a convention. For example, require font-display in every @font-face, so that text shows while fonts load.
This rule supports 2 message arguments: the at-rule and the required property.
Options
Section titled “Options”Array<string>
Section titled “Array<string>”{ "at-rule-name": ["array", "of", "properties", "or", "descriptors"] }Given:
{ "at-rule-property-required-list": { "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');}