Stylelint rules

Stylelint rules that flag raw values where a design token exists.

Planned. The plugin is not published yet; this page describes the rules it will ship.

Rules

Rule Flags
beehexa/no-raw-color Hex, rgb() and named colors. Use a --bh-color-* token.
beehexa/no-color-scale Scale, brand and static colour tokens (--bh-color-graphite-9, --bh-color-brand-yellow). Use a role token.
beehexa/no-state-opacity opacity, filter, color-mix() or a raw translucent colour on :hover, :active or :disabled. Use the state’s colour token; for an element with no fill at rest, that token is itself translucent.
beehexa/no-raw-spacing Pixel and rem values in margin, padding and gap. Use --bh-space-*.
beehexa/no-raw-radius Raw values in border-radius. Use --bh-radius-*.
beehexa/known-tokens --bh-* properties that do not exist.