Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 875 Bytes

README.md

File metadata and controls

64 lines (48 loc) · 875 Bytes

sizes

Specify scales for sizes.

a {
  width: 400px;
}
/**      ↑
 *       This size */

This rule can automatically fix all of the problems reported.

This rule checks <length> and <percentage> values.

This rule can be paired with the declaration-property-unit-allowed-list rule in stylelint, using the RegEx:

/^((min|max)-)?(height$|width$|block-size$|inline-size$)/

Options

array of objects as {scale: [], units: []}

Given:

[
  {
    "scale": [100, 150],
    "units": ["px"]
  }
]

The following patterns are considered violations:

a {
  width: 125px;
}
a {
  max-height: 200px;
}

The following patterns are not considered violations:

a {
  width: 100px;
}
a {
  max-height: 150px;
}