Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes #7: make option list readable in Firefox when parent has dark b… #14
Resolves issue #7. In Firefox the option list inherits the background color of the closest ancestor that has a solid background color. If the
By setting a solid fallback of
I updated the demo to include a dark parent example. The issue can be reproduced by modifying the CSS for
referenced this pull request
Mar 15, 2016
@zachleat Thanks for picking this up!
It totally depends how you style the
As-is, the demo code doesn't produce a readable option list if used on a dark page in Firefox. You can test by modifying the
Firefox repurposes the background on the
You can short-circuit this behavior by providing a solid fallback color on the
Note: if the gradient depends on rgba() for transparency, setting a background might spoil a design that has the page background bleeding through the UI (someone's glassy skeuomorphantasy) — but having a readable option list matters more.
So the pull request updates the demo with a solid fallback color to the background gradient on
@brendanfalkowski Yes—I’m definitely on board with merging this. I wonder if it’s also worth adding one or two sentences describing the problem as a note to the readme as well? Since it’s a demo style, it’s worth documenting the problem/solution in case others run into it. Maybe even something as simple as short description and a link to the issue?
(on mobile) I added this in an earlier commit/PR to
On Thursday, July 21, 2016, Zach Leatherman firstname.lastname@example.org