Forums Bug Reports Thread

Status pills/badges hardcode dark text that is illegible in the dark default theme (Law 3)

Patrick Bass · Jun 6 · 11 · 1 Locked
[Major] [High Priority] [Bug Fixed] [Always Reproduces]
🚀 OP Jun 6, 2026 6:45pm

Area: mobieusLearn (audit p8) · Surface: mobieusLearn admin + learner surfaces (enrollments, questions, badges, my-dashboard, courses/edit version badge, cert verify, xapi-outbound, scim/show) · Dimension: contrast · Severity: major

These pills are dark-text-on-light-background designs that only work in the light theme. The platform default is the dark `stylish-black` theme (CLAUDE.md / style.css), plus crt-amber/crt-green/c64/vt100. In all of those the hardcoded dark forest-green (#15803d), dark brown (#92400e) and dark slate (#374151) sit on near-black cards and become unreadable. This is the exact failure feedback_theme_contrast_check.md warns about: use semantic tokens, not raw colors.

Evidence

Default theme tokens: style.css:101 `--bg-3:#161B36` (=--color-bg-card), :119 `--green:#00FF88`, :120 `--amber:#FFB347`, :121 `--red:#FF6B6B`, with semantic aliases :197/:199/:201 `--color-danger/-success/-warning`. The learn templates ignore these and hardcode dark text: my-dashboard.php:58-61 `.lrnmy-pill.ok{color:#15803d}`, `.warn{color:#92400e}`, `.neutral{background:rgba(107,114,128,.18);color:#374151}`; questions/index.php:62-68 difficulty `#15803d/#92400e/#b91c1c/#374151`; enrollments/index.php:20-23 `.pill.complete{color:#1f7d4f}` etc.; badges/index.php:32-60 `#1f7d4f/#9b1c1c`; courses/edit.php:18-20 version badge `#374151`. On dark card #161B36 the .neutral pill (#374151 over rgba(107,114,128,.18)) is dark-grey-on-dark-grey — well under 3:1. The platform already ships a theme-safe pattern, .cm-status-badge (style.css:23257-23259), that uses var(--color-warning/-success/-danger) which resolve to #00FF88/#FFB347/#FF6B6B in dark and #16a34a/#dc2626 in light.

Suggested fix. Replace the hardcoded hex text colors in the learn status pills with the existing semantic tokens var(--color-success), var(--color-warning), var(--color-danger), var(--color-text-muted) for neutral — mirroring the .cm-status-badge pattern at style.css:23233-23259. Keep the rgba tinted backgrounds (they read fine over both themes) but let the text color follow the theme.

Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.


Patrick Bass
@mobieus

🚀 Jun 7, 2026 5:15am

Resolved — fixed and deployed. Commit e23a8fec596a, shipped dev-first then to all tenants on 2026-06-06.

Replaced the four hardcoded hex text colors in the learn status pills (.pill.complete/active/revoked/expired) with semantic tokens var(--color-success)/var(--color-primary)/var(--color-danger)/var(--color-warning), keeping the existing rgba tinted backgrounds; mirrors the .cm-status-badge pattern. Tokens confirmed theme-aware in style.css. php -l passes.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.