Disallow unknown properties.
禁止使用未知属性。
a { heigth: 100%; }
/** ↑
* These properties */
This rule considers properties defined in the CSS Specifications and browser specific properties to be known.
该规则参考CSS规范和浏览器特定属性中定义的属性。
This rule ignores variables ($sass
, @less
, --custom-property
).
该规则忽略变量 ($sass
,@less
,--custom-property
)。
This rule ignores vendor-prefixed properties (e.g., -moz-align-self
, -webkit-align-self
).
Use option checkPrefixed
described below to turn on checking of vendor-prefixed properties.
该规则忽略浏览器引擎前缀属性 (如,-moz-align-self
,-webkit-align-self
)。使用下面描述的 checkPrefixed
选项开启对浏览器引擎前缀属性的检查。
true
The following patterns are considered warnings:
以下模式被认为是个警告:
a {
colr: blue;
}
a {
my-property: 1;
}
The following patterns are not considered warnings:
以下模式正常:
a {
color: green;
}
a {
fill: black;
}
a {
-moz-align-self: center;
}
a {
-webkit-align-self: center;
}
a {
align-self: center;
}
ignoreProperties: ["/regex/", "string"]
Given:
给出:
["/^my-/", "custom"]
The following patterns are not considered warnings:
以下模式正常:
a {
my-property: 10px;
}
a {
my-other-property: 10px;
}
a {
custom: 10px;
}
checkPrefixed: true | false
(default: false
)If true
, this rule will check vendor-prefixed properties.
如果为 true
,该规则将坚持浏览器引擎前缀属性。
For example with true
:
比如,在 true
选项下:
The following patterns are considered warnings:
以下模式被认为是个警告:
a {
-moz-align-self: center;
}
a {
-moz-overflow-scrolling: center;
}
The following patterns are not considered warnings:
以下模式正常:
a {
-webkit-overflow-scrolling: auto;
}
a {
-moz-box-flex: 0;
}