Skip to main content

property-disallowed-list

Specify a list of disallowed properties.

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

This rule ignores preprocessor variables (e.g. $sass, @less).

The message secondary option can accept the arguments of this rule.

Options

Array<string>

["array", "of", "properties", "/regex/"]

Given:

{
"property-disallowed-list": [
"text-rendering",
"animation",
"/^background/",
"--foo"
]
}

The following patterns are considered problems:

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

The following patterns are not considered problems:

a { color: red; }
a { no-background: sure; }
a {
--bar: red;
}