UNPKG

1.11 kBMarkdownView Raw
1# at-rule-property-requirelist
2
3**_Deprecated: Instead use the [`at-rule-property-required-list`](../at-rule-property-required-list/README.md) rule._**
4
5Specify a list of required properties for an at-rule.
6
7<!-- prettier-ignore -->
8```css
9 @font-face { font-display: swap; font-family: 'foo'; }
10/** ↑ ↑ ↑
11 * At-rule and required property names */
12```
13
14## Options
15
16`object`: `{ "at-rule-name": ["array", "of", "properties"] }`
17
18Given:
19
20```
21{
22 "font-face": ["font-display", "font-family", "font-style"]
23}
24```
25
26The following patterns are considered violations:
27
28<!-- prettier-ignore -->
29```css
30@font-face {
31 font-family: 'foo';
32 src: url('./fonts/foo.woff2') format('woff2');
33}
34```
35
36<!-- prettier-ignore -->
37```css
38@font-face {
39 font-family: 'foo';
40 font-style: normal;
41 src: url('./fonts/foo.woff2') format('woff2');
42}
43```
44
45The following patterns are _not_ considered violations:
46
47<!-- prettier-ignore -->
48```css
49@font-face {
50 font-display: swap;
51 font-family: 'foo';
52 font-style: normal;
53 src: url('./fonts/foo.woff2') format('woff2');
54}
55```