Components
Status
A status word first, color second (Due, Delayed, alerts). --pill adds a tinted background.
Live example
Rendered with the real classes from /site/chitransit.css, light (left) and dark (right).
Due Delayed Scheduled
.ct-status--good · --warn · --mutedOKErrorAlert
.ct-status--pillCode
<span class="ct-status ct-status--good">Due</span> <span class="ct-status ct-status--warn">Delayed</span> <span class="ct-status ct-status--muted">Scheduled</span>
<span class="ct-status ct-status--pill ct-status--good">OK</span><span class="ct-status ct-status--pill ct-status--warn">Error</span><span class="ct-status ct-status--pill ct-status--alert">Alert</span>
Tokens
From tokens/components.tokens.json. Override one instance by setting the property without the ct- prefix.
| Custom property | Value | Alias | Resolves to |
|---|---|---|---|
--ct-status-font-weight | var(--weight-bold) | {weight.bold} | 700 |
--ct-status-pill-font-size | var(--fs-cap) | {type.cap} | 12 |
--ct-status-pill-height | var(--size-chip-height) | {size.chipHeight} | 22 pt |
--ct-status-pill-padding-x | var(--space-8) | {space.s8} | 8 pt |
--ct-status-pill-radius | var(--radius-pill) | {radius.pill} | 999 pt |
--ct-status-pill-tint | .1 |
Variants
--good (Due, OK), --warn (Delayed, errors), --alert and --muted; --pill adds a tinted background to any of them. Nothing else exists. The word carries the meaning; never a color alone.
<!-- Do -->
<span class="ct-status ct-status--warn ct-status--pill">Delayed</span>
<!-- Don't: color with no word, or the Alert glyph color on text -->
<span class="ct-status" style="color:var(--alert)">●</span>
Usage
Do
- Lead with the word: Due, Delayed, an alert. Color reinforces it.
- Use
--pillfor a tinted background in dense rows.
Don't
- Don't use color alone for status, and never a line color.
Accessibility
- The status word is the accessible text; the dot is decorative.