Skip to content

Select Element Dropdown Background Color on Firefox is Unset #3516

@zwubs

Description

@zwubs

Current Behavior

When utilizing a select element that only has the .select class applied, and clicking on it in Firefox the following can be observed:
Image

There's what appears to be a strange white border around all of the options.

Expected Behavior

I'd expect the background of the select element's dropdown to be the same as the select element.

Environment Information

  • System:
    • OS: Windows 11 10.0.26100
    • CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    • Memory: 4.28 GB / 15.40 GB
  • Binaries:
    • Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
    • Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    • npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
    • pnpm: 8.15.1 - ~\AppData\Roaming\npm\pnpm.CMD
  • Browsers:
    • Edge: Chromium (133.0.3065.69)
    • Internet Explorer: 11.0.26100.1882
    • Firefox: 137.0.1 (64-bit)
  • npmPackages:
    • @skeletonlabs/skeleton: ^3.1.2 => 3.1.2
    • @skeletonlabs/skeleton-svelte: ^1.2.1 => 1.2.1

Steps To Reproduce

  1. Open the latest version of Firefox
  2. Browse to the forms docs
  3. Click on the default select element

Link to Reproduction / Stackblitz

https://www.skeleton.dev/docs/tailwind/forms#select

More Information

I did some investigation into why this is happen in v3 but not in v2. It looks like in v2 the background color of the select element is defined explicitly. In v3 it looks like Firefox doesn't handle transparent colors for the select dropdown and is defaulting to white. I was able to mitigate this in my own project by explicitly declaring the background color.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions