Preflight of Tailwind take precedence on background-color of input field
Package
filament/forms
Package Version
v2.15.28
Laravel Version
v9.26.1
Livewire Version
v2.10.7
PHP Version
PHP 8.1
Problem description
I have something weird with Tailwind. First of all, all my classes are correctly generated and accessible. In a button, I affect a background color. But, the preflight of Tailwind :
button, [type='button'], [type='reset'], [type='submit'] {
-webkit-appearance: button;
background-color: transparent;
background-image: none;
}
takes precedence on my bg-red-300 for example.
If I uncheck background-color: transparent;, it works.
You can find the code in this repository https://github.com/happytodev/filament-tailwind-color-picker
Adam (@awcodes) already knows about this bug as we discussed about it on Discord.
Expected behavior
I expect that the bg-{color}-{level} applies on the input field as background color and not the bg-transparent instead
Steps to reproduce
The quickest way is to install filament demo.
Then composer require happytodev/filament-tailwind-color-picker
The version of plugin is v0.1.3
After that edit postResource.php to add a Tailwind Color Picker field :
use HappyToDev\FilamentTailwindColorPicker\Forms\Components\TailwindColorPicker;
...
TailwindColorPicker::make('textColor')
->setScope('text-'),
Load the admin and edit a post. Select a color for the field, normally the color picker button must change the background color.
With this bug it did not.
Reproduction repository
https://github.com/happytodev/filament-tailwind-color-picker
Relevant log output
No response
Sorry, we had to roll this back, since it was causing too many issues. We will address this with v3 again,
No worries. I understand.
Should we leave this issue open or close it, @pxlrbt?
It's still an issue, so I'd say leave it open, until we fix it with V3.
maybe add a v3 label?
I think this will automatically be resolved in v3 with the new asset manager.
For v2 it was fixed but reverted because it broke a lot of plugins and it was easier to revert than make all the plugins update accordingly.
Alright cool! Thanks.