Skip to content
GitHub
Sections

Reference · Things to avoid

Values hard-coded past the token layer

Forbidden
A raw hex colour or pixel size written in component code
Instead
Reference the token. Consume the semantic role (--color-text-strong), not the primitive (--color-neutral-900). A value that cannot be expressed as a token is a missing token — or a value that should not exist at all. Check the second before minting the first.

What this rule looks like

Forbidden
Instead

Why this rule

Deletion is a real answer and the easy one to miss, because the correction points at a token and an agent reading it literally invents one. Both times this rule fired on Jig's own documentation site the fix was removal: font-size: 0.9em on inline code, where the two faces share vertical metrics and inheriting is correct (B-105); and a min-width in em on a table column that max-content measures for free. A token minted to satisfy a detector entrenches the value it was invented for.

Kind
Rule
Section
Things to avoid
Group
Code-level
Bucket
mechanical
Severity
error
Detector
hardcoded-value
Since
v0.1.0

Read as plain text