UNPKG

1.05 kBMarkdownView Raw
1# at-rule-no-unknown
2
3Disallow unknown at-rules.
4
5<!-- prettier-ignore -->
6```css
7 @unknown (max-width: 960px) {}
8/** ↑
9 * At-rules like this */
10```
11
12This 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
18The following patterns are considered violations:
19
20<!-- prettier-ignore -->
21```css
22@unknown {}
23```
24
25The following patterns are _not_ considered violations:
26
27<!-- prettier-ignore -->
28```css
29@charset "UTF-8";
30```
31
32<!-- prettier-ignore -->
33```css
34@CHARSET "UTF-8";
35```
36
37<!-- prettier-ignore -->
38```css
39@media (max-width: 960px) {}
40```
41
42<!-- prettier-ignore -->
43```css
44@font-feature-values Font One {
45 @styleset {}
46}
47```
48
49## Optional secondary options
50
51### `ignoreAtRules: ["/regex/", /regex/, "string"]`
52
53Given:
54
55```
56["/^my-/", "custom"]
57```
58
59The following patterns are _not_ considered violations:
60
61<!-- prettier-ignore -->
62```css
63@my-at-rule "x.css";
64```
65
66<!-- prettier-ignore -->
67```css
68@my-other-at-rule {}
69```
70
71<!-- prettier-ignore -->
72```css
73@custom {}
74```