selector-no-vendor-prefix
What it does
Section titled “What it does”Reports a vendor-prefixed pseudo-class or pseudo-element that has a standard one (::-moz-selection).
Why it matters
Section titled “Why it matters”A prefixed selector was a way to try a feature before it was standardised. Browsers support the standard name now, so the prefixed one is dead weight that a build step can add where it is needed.
To fix, use the standard selector.
Example
Section titled “Example”...a::-moz-selection {}a:-moz-placeholder, a::-webkit-scrollbar {}Configuration
Section titled “Configuration”css: lint: rules: selector-no-vendor-prefix: level: warn # off (default), warn, error options: ignore: []less: lint: rules: selector-no-vendor-prefix: level: warn # off (default), warn, error options: ignore: []scss: lint: rules: selector-no-vendor-prefix: level: warn # off (default), warn, error options: ignore: []| Option | Type | Default | Description |
|---|---|---|---|
ignore |
list | [] |
Names left out: names, or /regex/. |
Enabled by the presets: css/stylelint-standard.
Suppress one line with sudsy-disable-next-line selector-no-vendor-prefix 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-no-vendor-prefix |
full |