1 | # at-rule-whitelist
|
2 |
|
3 | Specify a whitelist of allowed at-rules.
|
4 |
|
5 |
|
6 | ```css
|
7 | @keyframes name {}
|
8 | /** ↑
|
9 | * At-rules like this */
|
10 | ```
|
11 |
|
12 | ## Options
|
13 |
|
14 | `array|string`: `["array", "of", "unprefixed", "at-rules"]|"at-rule"`
|
15 |
|
16 | Given:
|
17 |
|
18 | ```
|
19 | ["extend", "keyframes"]
|
20 | ```
|
21 |
|
22 | The following patterns are considered violations:
|
23 |
|
24 |
|
25 | ```css
|
26 | @import "path/to/file.css";
|
27 | ```
|
28 |
|
29 |
|
30 | ```css
|
31 | @media screen and (max-width: 1024px) {
|
32 | a { display: none; }
|
33 | }
|
34 | ```
|
35 |
|
36 | The following patterns are _not_ considered violations:
|
37 |
|
38 |
|
39 | ```css
|
40 | a { @extend placeholder; }
|
41 | ```
|
42 |
|
43 |
|
44 | ```css
|
45 | @keyframes name {
|
46 | from { top: 10px; }
|
47 | to { top: 20px; }
|
48 | }
|
49 | ```
|
50 |
|
51 |
|
52 | ```css
|
53 | @KEYFRAMES name {
|
54 | from { top: 10px; }
|
55 | to { top: 20px; }
|
56 | }
|
57 | ```
|
58 |
|
59 |
|
60 | ```css
|
61 | @-moz-keyframes name {
|
62 | from { top: 10px; }
|
63 | to { top: 20px; }
|
64 | }
|
65 | ```
|