跳到主要內容

函數不允許未知

禁止使用未知函數。

a { transform: unknown(1); }
/** ↑
* Functions like this */

此規則將 CSS 規範中定義的函數視為已知。

此規則會忽略雙破折號自訂函數,例如 --custom-function()

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

選項

true

下列模式會被視為問題

a { transform: unknown(1); }

下列模式不會被視為問題

a { transform: scale(1); }
a { transform: --custom-function(1); }

選用次要選項

ignoreFunctions: ["/regex/", /regex/, "non-regex"]

忽略指定的函數。

例如,使用 true

給定

["theme", "/^foo-/"]

下列模式不會被視為問題

a { transform: theme(1); }
a { transform: foo-func(1); }