Files
DeviceManager/node_modules/stylelint/lib/rules/declaration-property-max-values
..
2023-11-18 14:38:06 +01:00
2023-11-18 14:38:06 +01:00

declaration-property-max-values

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

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

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; }