fix: make filter dropdown option values visible in Firefox (fixes #40) #48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fern-oss-17523/v2-web:fix/filter-dropdown-option-colors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Fixes #40 — filter dropdown values are invisible in Firefox (reported on Firefox 136 / Windows 10), while the same Category and Android version selects look fine in Chromium-based browsers.
Root cause
The Category and Android version filters in
src/components/AppFooter.vueare native<select class="... uk-select">elements, inside abody.uk-lightlayout whose:rootdeclarescolor-scheme: dark(src/index.html).The CSS cascade affecting the open dropdown list is:
.uk-select:not([multiple]):not([size]) option { color: #666 }— and never sets an option background.<select>control is styled dark by.uk-light .uk-select { background-color: rgba(255,255,255,.1); color: rgba(255,255,255,.7) }, but that rule does not reach the options.color-scheme: darkfor the native dropdown popup and paints it on a dark surface, so the dark-gray#666option values become invisible.#666remains visible — matching the reporter's observation.Verified computed styles in headless Chromium before any change:
optioncolorrgb(102,102,102)with backgroundrgba(0,0,0,0)(transparent → Firefox dark popup),selectcontrolrgba(255,255,255,0.1)/rgba(255,255,255,0.7).Solution
On the two filter selects'
optionelements, pin an explicit light surface alongside the existing#666text color, which is the original light UIkit option design:color-scheme, so the values are readable.<select>elements in the app).Validation
yarn build— Vite production build succeeds; the new rule is present in the bundled assets CSS (...FilterContainer__Filter__Input option{color:#666;background-color:#fff}).yarn start— Vite dev server serves/,/index.jsand/components/AppFooter.vuewith HTTP 200.background-color: rgba(0,0,0,0),color: rgb(102,102,102)background-color: rgb(255,255,255),color: rgb(102,102,102)#666on#fffis 5.74:1 (passes AA for normal text).Note: no unit test suite exists in this project (only
start/buildscripts). A real Firefox re-check on a desktop build is recommended as final confirmation, but the fix targets the exact CSS cascade that differentiates the two engines.Impact / risk
Unreleased / Fixed.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.