#declaration-property-unit-blacklist

Specify a blacklist of disallowed property and unit pairs within declarations.

指定一个在声明中禁止使用的属性和单位的黑名单。

a { width: 100px; }
/** ↑         ↑
 * These properties and these units */

#Options

object: {
  "unprefixed-property-name": ["array", "of", "units"]
}

If a property name is surrounded with "/" (e.g. "/^animation/"), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: /^animation/ will match animation, animation-duration, animation-timing-function, etc.

如果一个字符串被 "/" (如,"/^animation/") 包围,它将被解释为一个正则表达式。例如,这将允许简单地匹配简写: /^animation/ 将匹配 animationanimation-durationanimation-timing-function 等。

Given:

给出:

{
  "font-size": ["em", "px"],
  "/^animation/": ["s"]
}

The following patterns are considered warnings:

以下模式被认为是个警告:

a { font-size: 1em; }
a { animation: animation-name 5s ease; }
a { -webkit-animation: animation-name 5s ease; }
a { animation-duration: 5s; }

The following patterns are not considered warnings:

以下模式正常:

a { font-size: 1.2rem; }
a { height: 100px; }
a { animation: animation-name 500ms ease; }
a { -webkit-animation: animation-name 500ms ease; }
a { animation-duration: 500ms; }