mirror of
https://github.com/thangisme/notes.git
synced 2024-09-29 13:47:37 -04:00
36 lines
443 B
Markdown
36 lines
443 B
Markdown
|
# selector-root-no-composition
|
||
|
|
||
|
***Deprecated: See [CHANGELOG](../../../CHANGELOG.md).***
|
||
|
|
||
|
Disallow the composition of `:root` in selectors.
|
||
|
|
||
|
```css
|
||
|
a, :root {}
|
||
|
/** ↑ ↑
|
||
|
* This type of composite selector */
|
||
|
```
|
||
|
|
||
|
## Options
|
||
|
|
||
|
### `true`
|
||
|
|
||
|
The following patterns are considered warnings:
|
||
|
|
||
|
```css
|
||
|
a, :root {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
:root + a {}
|
||
|
```
|
||
|
|
||
|
```css
|
||
|
html:root {}
|
||
|
```
|
||
|
|
||
|
The following patterns are *not* considered warnings:
|
||
|
|
||
|
```css
|
||
|
:root {}
|
||
|
```
|