Forums Bug Reports Thread

Hardcoded dark error/status text in inline styles across learn admin — unreadable on default dark theme

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

Area: Admin plane (audit p12) · Surface: /admin/learn/scorm/{id}, /admin/learn/courses/{id}/edit, course-block forms, paths/edit · Dimension: contrast · Severity: major

The team built a `.lrn-pill` class system precisely because hardcoded colors break in dark mode (style.css:55673-55678 comment), and added dark rescues for those classes — but the inline-style error/notice boxes are unreachable by those rescues. On the default dark admin theme, the SCORM import-failure reason, course review-gate messages, and form validation errors render dark-red/dark-amber on dark navy. A critical error message you can't read is the worst case.

Evidence

Inline styles (which no [data-theme] CSS rule can override without !important on a matching selector, and these have no selector) hardcode dark text on faint tints: scorm/show.php:23 `background: rgba(239,68,68,.14); color: #b91c1c;` (the 'Import failed:' error), scorm/show.php:27 `color: #92400e;`, courses/edit.php:156 `color: #9b1c1c;` (review-gate warning), blocks/_form.php:196 `background: rgba(251,191,36,.18); color: #92400e;` (milestone notice), paths/edit.php:60 `color: #9b1c1c;`, plus _form.php error boxes (`color:#b91c1c`) in courses/_form.php:10, pools/_form.php:7, modules/_form.php:15, lessons/_form.php:15, activities/_form.php:44. Default theme card is #161B36 (style.css:182 + stylish-black --color-bg-card).

Suggested fix. Replace inline `color:#b91c1c/#92400e/#9b1c1c` boxes with the existing `.lrn-pill--danger`/`--warn` classes (which already have dark rescues) or with semantic tokens; at minimum add a brighter dark-theme text color. These cannot be fixed via stylesheet alone because they are inline styles.

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


Patrick Bass
@mobieus

🚀 Jun 7, 2026 5:25am

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

Replaced all three hardcoded inline dark colors in /home/patrick/mobieus-io/platform/templates/learn/admin/scorm/show.php (failed-import box #b91c1c, importing box #92400e, Delete-package heading #b91c1c) with theme-aware semantic tokens var(--color-danger) and var(--color-warning). These tokens resolve to #dc2626/#d97706 in light theme and bright #FF6B6B/#FFB347 in dark/default theme, fixing the dark-on-dark contrast on every theme. Verified the tokens are defined per-theme in style.css. php -l passes.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.