-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Description
Environment
- Phoenix version (mix deps): 1.8.0
Actual behavior
Using the dark
prefix doesn't work when the selected theme is system
. Selecting dark
adds the data-theme="dark"
attribute to the document and
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
applies it. When the system switches to dark mode and the selected theme is not dark
, Tailwind doesn't apply the variant as it doesn't know the color mode has changed:
Now instead of dark:* utilities being applied based on prefers-color-scheme, they will be applied whenever the dark class is present earlier in the HTML tree
Expected behavior
Using the system
theme should pick up dark mode.
Metadata
Metadata
Assignees
Labels
No labels