mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 10:17:42 -04:00
47 lines
422 B
Markdown
47 lines
422 B
Markdown
|
# selector-no-attribute
|
||
|
|
||
|
Disallow attribute selectors.
|
||
|
|
||
|
```css
|
||
|
[rel="external"] {}
|
||
|
/** ↑
|
||
|
* This type of selector */
|
||
|
```
|
||
|
|
||
|
## Options
|
||
|
|
||
|
### `true`
|
||
|
|
||
|
The following patterns are considered warnings:
|
||
|
|
||
|
```css
|
||
|
[foo] {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
[rel="external"] {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a,
|
||
|
[type="text"] {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
a > [foo] {}
|
||
|
```
|
||
|
|
||
|
The following patterns are *not* considered warnings:
|
||
|
|
||
|
```css
|
||
|
a {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
.foo {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
#bar {}
|
||
|
```
|