跳至主要內容

屬性禁止清單

指定禁止屬性的清單。

a { text-rendering: optimizeLegibility; }
/** ↑
* This property */

message 次要選項 可以接受此規則的參數。

選項

陣列|字串|正規表示法["陣列", "of", /屬性/, "正規表示法"]|"屬性"|"/正規表示法/"|/正規表示法/

如果字串以 "/" 圍繞(例如 "/^background/"),它會被解釋為正規表示法。這允許輕鬆鎖定簡寫,例如:/^background/ 會比對 backgroundbackground-sizebackground-color 等。

給定

["text-rendering", "animation", "/^background/"]

以下模式被視為問題

a { text-rendering: optimizeLegibility; }
a {
animation: my-animation 2s;
color: pink;
}
a { -webkit-animation: my-animation 2s; }
a { background: pink; }
a { background-size: cover; }

以下模式不會被視為問題

a { color: pink; }
a { no-background: sure; }