#1875 fixed theme resolution for stxConfirm/stxAlert. toast has the same bug and was not covered.
addToast, signals.ts:5721:
var isDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
var bg = isDark ? '#1f2937' : '#ffffff';_createDialog, signals.ts:5839 — what #1875 changed it to:
// Resolve dark from what the APP decided, not only from the OS. stx's own
// color-mode boot writes a class (default 'dark') and/or an attribute
// (e.g. data-theme) onto <html>, so an app pinned to light on a dark OS used
// to get a dark dialog over a light page. An explicit opts.dark wins over
// both, and the media query stays as the last resort. See #1875.
var _root = document.documentElement;
var _attrTheme = _root.getAttribute('data-theme') || _root.getAttribute('data-color-mode');
var isDark = opts.dark != null
? !!opts.dark
: _root.classList.contains('dark')
? true
: _attrTheme === 'dark'
? true
: _attrTheme === 'light'
? false
: !!(window.matchMedia && ...);The failure is the one #1875 describes, verbatim: an app pinned to light on a dark OS gets a dark toast over a light page. Apps that offer a light | dark | system setting — the common case, and what stx's own color-mode boot writes — are affected on every toast.
Toast also has no opts.dark escape hatch, so there is no way to correct it from the call site.
Fix
Same resolution as _createDialog. Worth lifting the ~10 lines into one helper both call, so the next surface that needs a theme cannot drift again — toast drifted precisely because the fix was applied at the two dialog call sites rather than in something shared.