Commit 35d4220
committed
fix: enable class-based dark mode in Tailwind v4
Tailwind v4 defaults to media-query-based dark mode, so `dark:` utilities
only respond to `prefers-color-scheme`. Our useTheme hook toggles the `.dark`
class on <html>, which requires the selector strategy.
Add `@custom-variant dark` to globals.css so both Tailwind utilities (dark:bg-*)
and custom CSS selectors (.dark .cept-*) work with the class toggle.
https://claude.ai/code/session_01QddASAFJgFoPPTDS88nkq21 parent 12cf365 commit 35d4220
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
0 commit comments