mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 06:27:23 -04:00
74 lines
945 B
Markdown
74 lines
945 B
Markdown
|
# selector-pseudo-element-no-unknown
|
||
|
|
||
|
Disallow unknown pseudo-element selectors.
|
||
|
|
||
|
```css
|
||
|
a::before {}
|
||
|
/** ↑
|
||
|
* This pseudo-element selector */
|
||
|
```
|
||
|
|
||
|
This rule considers pseudo-element selectors defined in the CSS Specifications, up to and including Editor's Drafts, to be known.
|
||
|
|
||
|
All vendor-prefixed pseudo-element selectors are ignored.
|
||
|
|
||
|
## Options
|
||
|
|
||
|
### `true`
|
||
|
|
||
|
The following patterns are considered warnings:
|
||
|
|
||
|
```css
|
||
|
a::pseudo {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a::PSEUDO {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a::element {}
|
||
|
```
|
||
|
|
||
|
The following patterns are *not* considered warnings:
|
||
|
|
||
|
```css
|
||
|
a:before {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a::before {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
::selection {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
input::-moz-placeholder {}
|
||
|
```
|
||
|
|
||
|
## Optional secondary options
|
||
|
|
||
|
### `ignorePseudoElements: ["/regex/", "string"]`
|
||
|
|
||
|
Given:
|
||
|
|
||
|
```js
|
||
|
["/^my-/", "pseudo-element"]
|
||
|
```
|
||
|
|
||
|
The following patterns are *not* considered warnings:
|
||
|
|
||
|
```css
|
||
|
a::pseudo-element {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a::my-pseudo {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a::my-other-pseudo {}
|
||
|
```
|