Forums Bug Reports Thread

Share-to-feed modal dark-theme override is dead code (selector targets body, attribute is on html)

Patrick Bass · Jun 6 · 8 · 1 Locked
[Cosmetic] [Low Priority] [Bug Fixed] [Always Reproduces]
🚀 OP Jun 6, 2026 6:00pm

Area: Files, photos, gallery, ansi (audit p5) · Surface: /photos/album/{id} (Share to feed modal) · Dimension: law3-contrast · Severity: cosmetic

The intended dark-theme styling for the photo share modal never applies because the CSS keys off body[data-theme] while the theme attribute lives on <html>. The modal happens to stay readable in dark themes only because the inline base rules use `var(--color-bg-card, #fff)` / `var(--color-text-primary, ...)` tokens, which are themed correctly (e.g. style.css sets --color-bg-card to #0a0a0a / #1a0f00 per dark theme). So this is dead override code rather than an active dark-on-dark break, but it is misleading and should either be fixed or removed.

Evidence

platform/templates/photos/album.php:1506-1508 use `body[data-theme] .ps-modal{...}`, `body[data-theme] .ps-modal-head,...`, `body[data-theme] .ps-field input,...`. But data-theme is emitted on the html element, never body: platform/templates/layouts/base.php:25 `<html lang="en" data-theme="...">` and :56 `document.documentElement.setAttribute('data-theme',t)`. grep confirms no `<body data-theme` anywhere in templates/ or public/js/.

Suggested fix. Change the three `body[data-theme]` selectors to `[data-theme] .ps-modal` etc. (or delete them entirely and rely on the existing semantic-token fallbacks). Prefer deleting, since the token fallbacks already theme the modal.

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


Patrick Bass
@mobieus

🚀 Jun 7, 2026 5:38am

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

Deleted the three hardcoded body[data-theme] .ps-modal / .ps-modal-head/.ps-modal-foot / .ps-field input,textarea overrides (was background:#0E1228, rgba(255,255,255,.12), etc.). The base rules already use semantic-token fallbacks (--color-bg-card, --color-text-primary, --color-border, --color-bg-input), so all themes now resolve correctly instead of forcing one dark palette.

Status: fixed. Thread closed and locked.


Patrick Bass
@mobieus

Log in or register to reply to this thread.