Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update tailwind.config.preset.js darkMode selector #15793

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

mgkimsal
Copy link
Contributor

@mgkimsal mgkimsal commented Mar 6, 2025

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

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@danharrin
Copy link
Member

The PR you linked reverts the breaking change, so I am unsure what the problem is? I have not seen any other reports of problems myself

@danharrin danharrin added the bug Something isn't working label Mar 6, 2025
@danharrin danharrin added this to the v3 milestone Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants