1 | # at-rule-no-unknown
|
2 |
|
3 | Disallow unknown at-rules.
|
4 |
|
5 |
|
6 | ```css
|
7 | @unknown (max-width: 960px) {}
|
8 | /** ↑
|
9 | * At-rules like this */
|
10 | ```
|
11 |
|
12 | This rule considers at-rules defined in the CSS Specifications, up to and including Editor's Drafts, to be known.
|
13 |
|
14 | ## Options
|
15 |
|
16 | ### `true`
|
17 |
|
18 | The following patterns are considered violations:
|
19 |
|
20 |
|
21 | ```css
|
22 | @unknown {}
|
23 | ```
|
24 |
|
25 | The following patterns are _not_ considered violations:
|
26 |
|
27 |
|
28 | ```css
|
29 | @charset "UTF-8";
|
30 | ```
|
31 |
|
32 |
|
33 | ```css
|
34 | @CHARSET "UTF-8";
|
35 | ```
|
36 |
|
37 |
|
38 | ```css
|
39 | @media (max-width: 960px) {}
|
40 | ```
|
41 |
|
42 |
|
43 | ```css
|
44 | @font-feature-values Font One {
|
45 | @styleset {}
|
46 | }
|
47 | ```
|
48 |
|
49 | ## Optional secondary options
|
50 |
|
51 | ### `ignoreAtRules: ["/regex/", /regex/, "string"]`
|
52 |
|
53 | Given:
|
54 |
|
55 | ```
|
56 | ["/^my-/", "custom"]
|
57 | ```
|
58 |
|
59 | The following patterns are _not_ considered violations:
|
60 |
|
61 |
|
62 | ```css
|
63 | @my-at-rule "x.css";
|
64 | ```
|
65 |
|
66 |
|
67 | ```css
|
68 | @my-other-at-rule {}
|
69 | ```
|
70 |
|
71 |
|
72 | ```css
|
73 | @custom {}
|
74 | ```
|