Namespace the subtree theme scopes as .theme-light/.theme-dark: dark: follows the nearest scope, portalled dashboard menus and tooltips restate it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 17:42:59 +02:00
co-authored by Claude Opus 5.5
parent 58b92da8b0
commit 868a10d94b
14 changed files with 78 additions and 47 deletions
@@ -139,8 +139,9 @@ export function useDashboardBackground(
* The class that themes a dashboard's own surface, or `""` to follow the app.
*
* A class rather than the root, because inside the app shell this must not
* flip the chrome around it. `.light` and `.dark` both redefine the tokens on
* whatever carries them (`index.css`), so either direction works on a subtree.
* flip the chrome around it. `.theme-light` and `.theme-dark` both redefine the
* tokens on whatever carries them (`index.css`), and `dark:` follows the
* nearest of them, so either direction works on a subtree.
*
* A palette decides this for itself: its first colour *is* the ground, so
* whether the surface is light or dark is a fact about the palette rather than