Skip to content

fix: Add bg-transparent to input to fix dark mode with tailwindcss/forms#18875

Merged
danharrin merged 1 commit intofilamentphp:4.xfrom
jeremylongshore:fix-dark-mode-input-bg-tailwindcss-forms
Jan 6, 2026
Merged

fix: Add bg-transparent to input to fix dark mode with tailwindcss/forms#18875
danharrin merged 1 commit intofilamentphp:4.xfrom
jeremylongshore:fix-dark-mode-input-bg-tailwindcss-forms

Conversation

@jeremylongshore
Copy link
Copy Markdown
Contributor

Summary

  • Adds bg-transparent to the input.fi-input CSS selector to fix dark mode inputs appearing white when using the @tailwindcss/forms plugin

Problem

When using the @tailwindcss/forms plugin alongside Filament, text inputs in dark mode display with white backgrounds instead of transparent backgrounds. This is because @tailwindcss/forms sets default backgrounds on form elements, and Filament wasn't explicitly overriding this.

Solution

Add bg-transparent to the base input.fi-input CSS rule. This ensures inputs inherit their background from their container rather than using the tailwindcss/forms default, regardless of whether the plugin is installed.

Test plan

  • Verify inputs display correctly in dark mode without tailwindcss/forms
  • Verify inputs display correctly in dark mode with tailwindcss/forms plugin enabled

Fixes #18874

🤖 Generated with Claude Code

When using the @tailwindcss/forms plugin, inputs get white backgrounds
by default. This caused dark mode inputs to appear white after PR filamentphp#18778
was merged.

Adding `bg-transparent` ensures the input inherits the background from
its container rather than using the tailwindcss/forms default.

Fixes filamentphp#18874

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-project-automation github-project-automation bot moved this to Todo in Roadmap Jan 5, 2026
@danharrin danharrin added the bug Something isn't working label Jan 6, 2026
@danharrin danharrin added this to the v4 milestone Jan 6, 2026
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Roadmap Jan 6, 2026
@danharrin danharrin merged commit 9d66024 into filamentphp:4.x Jan 6, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Roadmap Jan 6, 2026
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

Archived in project

Development

Successfully merging this pull request may close these issues.

Dark Mode Input Background

2 participants