Skip to main content

value-no-vendor-prefix

禁止值使用浏览器前缀。

¥Disallow vendor prefixes for values.

a { display: -webkit-flex; }
/** ↑

* This prefix */

此规则忽略 自动前缀器 未处理的非标准浏览器前缀值。

¥This rule ignores non-standard vendor-prefixed values 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 values 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:

a { display: -webkit-flex; }
a { max-width: -moz-max-content; }
a { background: -webkit-linear-gradient(bottom, #000, #fff); }

以下模式不被视为问题:

¥The following patterns are not considered problems:

a { display: flex; }
a { max-width: max-content; }
a { background: linear-gradient(bottom, #000, #fff); }

可选的辅助选项

¥Optional secondary options

ignoreValues: ["string"]

鉴于:

¥Given:

["grab", "max-content"]

以下模式不被视为问题:

¥The following patterns are not considered problems:

cursor: -webkit-grab;
.foo { max-width: -moz-max-content; }