Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 866 Bytes

File metadata and controls

60 lines (45 loc) · 866 Bytes

word-spacings

Specify scales for word spacings.

a {
  word-spacing: 0.1rem;
}
/**               ↑
 *                This word spacing */

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.

Options

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

Given:

[
  {
    "scale": [-0.1, 0.2],
    "units": ["rem"]
  }
]

The following patterns are considered violations:

a {
  word-spacing: 0.1rem;
}
a {
  word-spacing: 0.5rem;
}

The following patterns are not considered violations:

a {
  word-spacing: -0.1rem;
}
a {
  word-spacing: 0.2rem;
}