declaration-property-unit-disallowed-list
宣言内で許可されないプロパティと単位のペアのリストを指定します。
a { width: 100px; }
/** ↑ ↑
* These properties and these units */
message
セカンダリオプションはこのルールの引数を受け入れることができます。
オプション
object
: { "プレフィックスなしのプロパティ名": ["単位", "の", "配列"]|"単位" }
プロパティ名が "/"
で囲まれている場合 (例: "/^animation/"
)、正規表現として解釈されます。これにより、たとえば、短縮形を簡単にターゲットにできます。/^animation/
は、animation
、animation-duration
、animation-timing-function
などに一致します。
以下の場合
{
"font-size": ["em", "px"],
"/^animation/": "s"
}
次のパターンは問題とみなされます
a { font-size: 1em; }
a { animation: animation-name 5s ease; }
a { -webkit-animation: animation-name 5s ease; }
a { animation-duration: 5s; }
次のパターンは問題とはみなされません
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; }