跳到主要内容

declaration-property-max-values

Limit the number of values for a list of properties within declarations.

Options

object: { "unprefixed-property-name": int }

If a property name is surrounded with "/" (e.g. "/^margin/"), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: /^margin/ will match margin, margin-top, margin-inline, etc.

Given:

{
"border": 2,
"/^margin/": 1,
},

The following patterns are considered problems:

a { border: 1px solid blue; }
a { margin: 1px 2px; }
a { margin-inline: 1px 2px; }

The following patterns are not considered problems:

a { border: 1px solid; }
a { margin: 1px; }
a { margin-inline: 1px; }