Skip to content

selector-no-vendor-prefix

Reports a vendor-prefixed pseudo-class or pseudo-element that has a standard one (::-moz-selection).

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.

Reported
...
a::-moz-selection {}
a:-moz-placeholder, a::-webkit-scrollbar {}
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.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
stylelint selector-no-vendor-prefix full