跳到主要内容

selector-no-vendor-prefix

Disallow vendor prefixes for selectors.

input::-moz-placeholder {}
/** ↑
* This prefix */

This rule ignores non-standard vendor-prefixed selectors that aren't handled by Autoprefixer.

The fix option can automatically fix all of the problems reported by this rule. However, it will not remove duplicate selectors produced when the prefixes are removed. You can use Autoprefixer itself, with the add option off and the remove option on, in these situations.

The message secondary option can accept the arguments of this rule.

Options

true

The following patterns are considered problems:

input::-moz-placeholder {}
:-webkit-full-screen a {}

The following patterns are not considered problems:

input::placeholder {}
:full-screen a {}

Optional secondary options

ignoreSelectors: ["/regex/", /regex/, "non-regex"]

Ignore vendor prefixes for selectors.

Given:

["::-webkit-input-placeholder", "/-moz-.*/"]

The following patterns are not considered problems:

input::-webkit-input-placeholder {
color: pink;
}

input::-moz-placeholder {
color: pink;
}