Commit 4fe6b5e
authored
The Sonner Toaster, DialogContent, and PopoverContent all portal to
document.body, escaping the inner <div className="dark …"> wrapper in
App.tsx. The dark variant selector (&:is(.dark *)) only matches elements
inside a .dark ancestor, so those surfaces resolved :root light values
(white backgrounds).
Moving the class to <html> makes the dark tokens apply to every portal
mounted under <body>. It also prevents a flash of light content on
initial load, since the class is present before React mounts.
Validated: 291/291 tests pass; vite build succeeds; dev server returns
the modified HTML with <html class="dark">.
1 parent f0853bd commit 4fe6b5e
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| |||
0 commit comments