mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 06:37:17 -04:00
66 lines
817 B
Markdown
66 lines
817 B
Markdown
# at-rule-no-unknown
|
|
|
|
Disallow unknown at-rules.
|
|
|
|
```css
|
|
@unknown (max-width: 960px) {}
|
|
/** ↑
|
|
* At-rules like this */
|
|
```
|
|
|
|
This rule considers at-rules defined in the CSS Specifications, up to and including Editor's Drafts, to be known.
|
|
|
|
## Options
|
|
|
|
### `true`
|
|
|
|
The following patterns are considered warnings:
|
|
|
|
```css
|
|
@unknown {}
|
|
```
|
|
|
|
The following patterns are *not* considered warnings:
|
|
|
|
```css
|
|
@charset "UTF-8";
|
|
```
|
|
|
|
```css
|
|
@CHARSET "UTF-8";
|
|
```
|
|
|
|
```css
|
|
@media (max-width: 960px) {}
|
|
```
|
|
|
|
```css
|
|
@font-feature-values Font One {
|
|
@styleset {}
|
|
}
|
|
```
|
|
|
|
## Optional secondary options
|
|
|
|
### `ignoreAtRules: ["/regex/", "string"]`
|
|
|
|
Given:
|
|
|
|
```js
|
|
["/^my-/", "custom"]
|
|
```
|
|
|
|
The following patterns are *not* considered warnings:
|
|
|
|
```css
|
|
@my-at-rule "x.css";
|
|
```
|
|
|
|
```css
|
|
@my-other-at-rule {}
|
|
```
|
|
|
|
```css
|
|
@custom {}
|
|
```
|