selector-pseudo-element-colon-notation
What it does
Section titled “What it does”Reports :before, :after, :first-line or :first-letter written with one colon.
Why it matters
Section titled “Why it matters”CSS3 separated pseudo-elements from pseudo-classes with two colons so the reader can tell them apart. The single colon is kept only for old browsers, and a file that mixes both is inconsistent.
To fix, write ::before.
Example
Section titled “Example”a:before, a::after, a:hover {}...a:before, a::after, a:hover {}...Configuration
Section titled “Configuration”css: lint: rules: selector-pseudo-element-colon-notation: warn # off (default), warn, errorless: lint: rules: selector-pseudo-element-colon-notation: warn # off (default), warn, errorscss: lint: rules: selector-pseudo-element-colon-notation: warn # off (default), warn, errorEnabled by the presets: css/stylelint-standard.
Suppress one line with sudsy-disable-next-line selector-pseudo-element-colon-notation in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | selector-pseudo-element-colon-notation |
full |