value-no-vendor-prefix
禁止值使用浏览器前缀。
¥Disallow vendor prefixes for values.
a { display: -webkit-flex; }
/** ↑
* This prefix */
此规则不会修复 自动前缀器 版本 10.2.5 未处理的浏览器前缀值。可根据具体情况添加例外情况。
¥This rule does not fix vendor-prefixed values that weren't handled by Autoprefixer version 10.2.5. Exceptions may be added on a case by case basis.
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: ["/regex/", /regex/, "string"]
鉴于:
¥Given:
["grab", "max-content", "/^-moz-all$/"]
以下模式不被视为问题:
¥The following patterns are not considered problems:
a { cursor: -webkit-grab; }
a { max-width: -moz-max-content; }
a { -moz-user-select: -moz-all; }
[!WARNING] 在下一个主要版本中,将对非正则表达式字符串执行精确匹配比较。如果你想保留旧行为,请考虑改用正则表达式。例如。
[/^(-webkit-|-moz-)?max-content$/]
。¥[!WARNING] An exact match comparison will be performed for non-regex strings in the next major version. If you want to keep the legacy behavior, please consider using a regex instead. E.g.
[/^(-webkit-|-moz-)?max-content$/]
.