From 5e60d432777f6a8b94641e9f7d0f1c9715025cc9 Mon Sep 17 00:00:00 2001 From: 999purple999 <95696977+999purple999@users.noreply.github.com> Date: Wed, 27 May 2026 12:26:27 +0200 Subject: [PATCH] Fix non-urgent toast inline link being invisible on light theme Fixes #33494. The non-urgent toast container (`.mx_NonUrgentToastContainer_toast`) hard-codes its background to `#17191c` and its base text colour to `#fff` "in all themes" (per the existing comment). However, an inline link inside the toast (e.g. the "requests" link in the `Your server isn't responding to some requests` echo failure toast) is rendered as `AccessibleButton kind="link_inline"`, whose colour rule in `_AccessibleButton.pcss` is `var(--cpd-color-text-primary)`. That token resolves to a dark colour in light theme and a light colour in dark theme. So in light theme: the toast keeps its dark background, but the link text inherits the light theme's dark `--cpd-color-text-primary`, collapsing into the dark background and effectively becoming invisible. In dark theme there is no problem because the token resolves light. Pin the inline-link colour to `#fff` inside the container so it follows the container's intentional theme-independent styling. No behaviour change outside this container; other inline links keep their theme-aware colour. The fix is scoped to `.mx_NonUrgentToastContainer_toast .mx_AccessibleButton.mx_AccessibleButton_kind_link_inline` so it cannot leak into other toasts. --- .../res/css/structures/_NonUrgentToastContainer.pcss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/web/res/css/structures/_NonUrgentToastContainer.pcss b/apps/web/res/css/structures/_NonUrgentToastContainer.pcss index daccc88600c..7cd588a3253 100644 --- a/apps/web/res/css/structures/_NonUrgentToastContainer.pcss +++ b/apps/web/res/css/structures/_NonUrgentToastContainer.pcss @@ -23,5 +23,15 @@ Please see LICENSE files in the repository root for full details. /* in all themes. */ background-color: #17191c; color: #fff; + + /* Inline links inherit `--cpd-color-text-primary` from + * `_AccessibleButton.pcss`, which is theme-dependent — on light + * theme that is a dark colour, which is invisible against this + * container's hard-coded dark background. Pin the link colour to + * white so it stays readable in both themes, matching the + * container's intentional theme-independence noted above. */ + .mx_AccessibleButton.mx_AccessibleButton_kind_link_inline { + color: #fff; + } } }