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.
fix
选项 可以自动修复此规则报告的所有问题。但是,它不会删除删除前缀时产生的重复选择器。在这些情况下,你可以将 自动前缀器 本身与 add
选项关闭,remove
选项打开 一起使用。
¥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.
message
次要选项 可以接受该规则的参数。
¥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;
}