fix: Update tailwind.config.preset.js darkMode selector #15793
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Tailwind v 3.4.1 changed its darkMode selector behavior. The Filament tailwind.config.preset doesn't work with the base.blade.php themeing behaviour as expected.
tailwindlabs/tailwindcss#12717 notes the new 'selector' mode.
The Filament JS in base.blade.php sets a 'dark' class on the top document element, and the tailwind.config 'selector' behaviour will look for that 'dark' class to determine if dark mode variants will be used, as opposed to the system-specified preferences.
The core issue was having a system-specified 'dark model' would not allow the 'light' theme to work. This may only have affected custom themes - unsure about that.
Visual changes
None
Functional changes
composer cs
command.