Select options look weird in Chrome on Windows
Package
filament/filament
Package Version
v3.0.0
Laravel Version
10.10
Livewire Version
No response
PHP Version
8.1
Problem description
Dropdowns don't have styling and appear fully white when on dark mode
Expected behavior
Them to be dark mode
Steps to reproduce
Make a dropdown on anything and it wont be styled
Reproduction repository
https://github.com/anthonyphysgun/filament-toggleissue
Relevant log output
No response
env is windows on chrome - seems to be fine on macos
@anthonyphysgun, could you share some screenshots of this? I have no idea what could be the cause of this. Also, since we're not on Windows, it's impossible for us to reproduce.
https://discord.com/channels/883083792112300104/883083792653381695/1132064814949204008
Oh you're talking about the select input. I thought you meant the dropdown component.
Pasting the image from your Discord message here as reference:
Most probably it's out of our control, as the options shown when focusing the select are just styled by the OS/browser.
Could you provide these additional details?
- Screenshot as above, but when using the Filament light theme.
- Screenshot of the options in a regular Filament select form component in light and dark theme.
- Screenshot of the unstyled HTML
selectin dark and light (e.g. from this page: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).
As I can't reproduce the issue on macOS (Safari/Firefox/Chromium), I'm going to close this issue until further evidence (as outline in the list above) proves this actually is a Filament issue (which I'm pretty sure it's not, but never say never).
Let us know! 🙂
v2 vs v3
Light Theme v3
Okay so the inset is because the select is now wrapped in an affixes component that's also used for the forms select field to ensure consistency. So not a lot we can do there I think.
The remaining major issue would be that the select options background is white in dark mode?
It's hard for me to debug as I'm not on Windows, but maybe you could try setting an actual background color on the select element?
Just a wild guess, but it might be that in v2 that select had a dark background color, whereas it's transparent in v3 since the affixes component handles the background.
In my case chrome / ubuntu In the expanded Select field in Dark Mode, only the highlighted text is visible, the rest is white on a white background. Fresh installation. The first display of the expanded Select shows the text, but when the item is selected next time text disappears
Could you try what I suggested in the comment above, @qcol?
maybe you could try setting an actual background color on the select element?
If you could share a screenshot of that, I can implement a fix.
If you mean the console test, it looks like this in the screenshot. The text is now readable, but the corners look bad, the bottom border of the dropdown list is missing.
Thanks!
The corners issue is caused by the select element overflowing the affixes component.
That's required for the searchable select, but I can possibly add the rounding to the select itself for a default HTML select.
I'd have to account for any affixes though, but I think I can make that work.
The remaining issue would then be the border. Could you look into the cause of that?
There is no bottom border in the light theme either. As far as I can see the reason is the shadow effect?
That shadow isn't applied by Filament though.
Could you check if just a plain HTML select in a simple HTML file outside Filament looks the same?
sure:
Select with ->multiple() option looks correct:
Hey, here:
chrome / Filament v3.0.0-beta10
Hey, here: chrome / Filament v3.0.0-beta10
Interesting. Windows? Mac? Linux?
options do not scale when zoomed in with ctrl+ (->multiple() scales correctly)
Ubuntu
With zoom