Mila petrol theme tokens, contrast-safe variants and the new button API #602
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
local-it/mitgliederverwaltung#602
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation
The theme still uses the Phoenix generator's orange as primary (and
priv/static/images/logo.svgis the Phoenix logo, not Mila's). In dark mode primary has two hues (orange buttons, purple badges) and the secondary is louder than the primary. Contrast is patched per component (~150 lines of overrides, a parallel.text-*-aapalette), and solid alerts stay below AA.<.button>defaults toprimary, which renders Cancel buttons as primary, and itsvariantmixes style and color, so call sites injectbtn-primarythroughclass. DESIGN_GUIDELINES §1.6 and §5.2 define the target.Visible improvement
Mila's own petrol instead of the generator orange; a calm, readable dark mode where the main action is clearly the main action; no more primary Cancel buttons.
Scope (ordered steps,
just ci-devgreen after each)@plugin "daisyui-theme"blocks set primary to Mila petrol (guide#007980, white content), add--color-primary-ink(light = primary, dark guide#46c6cd), accent slate blue (#346180, plus a lighter dark variant chosen and measured here), secondary muted slate in both themes, status colors contrast-safe. Orange remains only aswarning.btn-soft/btn-ghost/btn-outline+btn-primary,badge-soft/badge-outline+badge-primary,link-primary,text-primary,toggle-primaryand the focus ring fromprimary-ink. Checkbox exception: checkedcheckbox-primarykeeps dark petrol + white check in both themes, with a 1pxprimary-inkborder in dark (WCAG 1.4.11).[data-theme]token overrides into the plugin blocks; delete per-component badge/link overrides and the.text-*-aautilities; replace their uses with tokens. For each remaining recolor patch (e.g. the.labelopacity override), decide: remove it through tokens, or keep it as a documented exception with its reason in DESIGN_GUIDELINES §1.5./85and/70againstbase-100andbase-200in both themes (≥ 4.5:1; raise/70if needed); migrate all other text opacities; align<.header>'s subtitle (today/70) with DESIGN_GUIDELINES §3.<.button>gets separate color and style axes (DESIGN_GUIDELINES §5.2), no implicit primary,classfor layout only. Decide here: required color vs.neutraldefault, and the final attribute names (shared with<.badge>); the namestyleshadows the global HTMLstyleattribute, so decide whether to keep it or rename the axis on both components.<.button>and rawbtnusage in views, incl. the primary Cancel buttons, the hidden primary “Regenerate cycles”, and the 7btn-primaryinjections. Apply the label scheme of DESIGN_GUIDELINES §5.7 on the touched buttons.<.segmented>replacing the three hand-built variants (filter builder, fees tab). Decide the ARIA model (radio group or pressed buttons) and the selected-state color.priv/static/images/logo.svgif still unused.Out of scope
Acceptance criteria
-contentpair and every derived variant in both themes, all ≥ 4.5:1 (text) / ≥ 3:1 (non-text), is attached to the PR.<.button>without an explicit color renders as primary; no view passesbtn-*throughclass.just ci-devgreen after every step.Dependencies
Anchors (verified against
main@d9093a1f, re-check before filing)assets/css/app.css:24-92; dark overrides that make secondary louder:assets/css/app.css:576-584(see also:569-585)-aautilities:assets/css/app.css:125-255,:600-617lib/mv_web/components/core_components.ex:143lib/mv_web/live/membership_fee_type_live/form.ex:146,lib/mv_web/live/import_live/components.ex:242lib/mv_web/live/member_live/show/membership_fees_component.ex:156lib/mv_web/components/add_filter_builder_component.ex(filter modes),lib/mv_web/live/member_live/show/membership_fees_component.ex(cycle status)Caution