Write the site in US English
color, center, canceled, labeled, recognize and the rest, in UI text, help text, comments, docs and names (ColorInput, QrCenter). Migration 053 renames the two Site settings color CHECKs, whose names are the messages the admin shows. Kept: events.status's stored value 'cancelled' (shown as canceled), aria-labelledby, schema.org's EventCancelled, and old migrations as they ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
38aff34c97
commit
2ad65cdc15
60 changed files with 182 additions and 148 deletions
|
|
@ -1,14 +1,14 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
COLOR
|
||||
|
||||
Two helpers for colours that arrive as data (a page's accent, an
|
||||
event's or region's colour), so they work with the theme tokens
|
||||
Two helpers for colors that arrive as data (a page's accent, an
|
||||
event's or region's color), so they work with the theme tokens
|
||||
in index.css as well as with hex.
|
||||
|
||||
withAlpha(color, 20) is that colour at 20% opacity, for tints and
|
||||
withAlpha(color, 20) is that color at 20% opacity, for tints and
|
||||
borders. It replaces `${color}33`, which only works on hex.
|
||||
|
||||
accentText(color) is that colour as text: itself in light mode,
|
||||
accentText(color) is that color as text: itself in light mode,
|
||||
mixed halfway to white in dark mode (--accent-text-mix), so an
|
||||
accent picked for a white page still reads on a dark one.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
|
@ -19,8 +19,8 @@ export const withAlpha = (color: string, percent: number): string =>
|
|||
export const accentText = (color: string): string =>
|
||||
`color-mix(in srgb, ${color} var(--accent-text-mix), #ffffff)`
|
||||
|
||||
/* Text for on top of a colour that arrives as data: white or deep
|
||||
ink, whichever has more contrast (WCAG), so a pale colour an admin
|
||||
/* Text for on top of a color that arrives as data: white or deep
|
||||
ink, whichever has more contrast (WCAG), so a pale color an admin
|
||||
picks still gets readable text. Anything that isn't #rrggbb (a
|
||||
CSS variable, say) gets white, which suits the site's own dark
|
||||
accents. */
|
||||
|
|
@ -40,8 +40,8 @@ export function readableOn(color: string): string {
|
|||
|
||||
/* ── The site's accents ──────────────────────────────────────────
|
||||
BRAND is the teal every page uses as its accent; it's the button
|
||||
token, so the admin's palette (Site settings → Colours) reaches it.
|
||||
ACCENTS are the other section colours a page may give a band, all
|
||||
token, so the admin's palette (Site settings → Colors) reaches it.
|
||||
ACCENTS are the other section colors a page may give a band, all
|
||||
from the same family and all readable as text on white and on the
|
||||
tints (5:1 or better). Use these rather than a new hex. */
|
||||
export const BRAND = 'var(--color-action)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue