stylelint
Version:
A mighty, modern CSS linter.
108 lines (76 loc) • 1.16 kB
Markdown
# selector-pseudo-element-case
Specify lowercase or uppercase for pseudo-element selectors.
```css
a::before {}
/** ↑
* This pseudo-element selector */
```
The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule.
## Options
`string`: `"lower"|"upper"`
### `"lower"`
The following patterns are considered violations:
```css
a:Before {}
```
```css
a:bEfOrE {}
```
```css
a:BEFORE {}
```
```css
a::Before {}
```
```css
a::bEfOrE {}
```
```css
a::BEFORE {}
```
```css
input::-MOZ-PLACEHOLDER {}
```
The following patterns are *not* considered violations:
```css
a:before {}
```
```css
a::before {}
```
```css
input::-moz-placeholder {}
```
### `"upper"`
The following patterns are considered violations:
```css
a:Before {}
```
```css
a:bEfOrE {}
```
```css
a:BEFORE {}
```
```css
a::Before {}
```
```css
a::bEfOrE {}
```
```css
a::before {}
```
```css
input::-moz-placeholder {}
```
The following patterns are *not* considered violations:
```css
a:BEFORE {}
```
```css
a::BEFORE {}
```
```css
input::-MOZ-PLACEHOLDER {}
```