Repository navigation
Select: a dark multiple select shows its selection without focus - #27
Merged
Merged
Conversation
In the dark theme a native multiple select looked as if nothing were chosen while it had no focus (recomaty-panel#663). `.dark .adm-select option` paints every option of a dark select gray-900, and in a list box that rule also covered the colour the browser gives a selected option of an unfocused box: a plain declaration in its own stylesheet (Chromium's `select:-internal-list-box option:checked`; only the focused highlight is !important). Chromium and Firefox both showed it; WebKit paints a list box's selection over the CSS and never did. - components/select.css: `.dark .adm-select[multiple] option:checked` reverts background and text colour to the browser's own, in `@layer components` beside the rule it corrects, which it outranks on specificity. Unselected options and every option of a single select keep gray-900. - tests-adminata/Visual/select.spec.js: the product list's Tags filter with "New" chosen, both themes, Chromium and Firefox (wide projects): the selected option's computed background differs from the unselected ones', and in the dark theme the unselected options and the filter's single operator select keep gray-900. Without the new rule the dark case fails in both engines. - app.css rebuilt; CHANGELOG entry under Fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bpacholek
marked this pull request as ready for review
October 26, 2026 10:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
In the dark theme a native multiple select (
<select multiple>) looked as if nothing were chosen while it had no focus. The chosen options showed up only after a click into the box. This was reported in recomaty/recomaty-panel#663. The panel first worked around it with its own override in recomaty/recomaty-panel#668. @bpacholek asked there to fix it in adminata instead and then move the panel to the new version.Cause.
.dark .adm-select option(assets/css/components/select.css) paints every option of a dark select gray-900. In a list box, that rule also covers the colour the browser gives a selected option while the box has no focus. In the browser's own stylesheet that colour is a plain declaration (Chromium:select:-internal-list-box option:checked,light-dark(#cecece, #545454)), and only the focused highlight is!important. In the light theme adminata paints no options, so the browser's grey always showed.f4a2fa8e5components/select.css: a new rule in the same@layer componentsblock,.dark .adm-select[multiple] option:checked { background-color: revert; color: revert; }. It sits beside the rule it corrects and outranks it on specificity.reverthands the selected options of a dark multiple select back to the browser, the same way the light theme always had them. Undercolor-scheme: darkthat is the browser's own unfocused selection colour, with its hover and disabled variants.[multiple]), so its options and dropdown look as before. The focused look does not change.option, not a utility, sonpm run css:layersis satisfied.app.cssis rebuilt (one rule added). Safelist, contract and controllers snapshot are unchanged.tests-adminata/Visual/select.spec.js(new): opens the product list with the Tags filter set to "New" (?filter[tags][value][]=1). That page has a nativeadm-select adm-select-multiplewith one option selected, next to the filter's single operator select. It runs in both themes in the wide Chromium and Firefox projects and checks computed styles:--color-gray-900.[Unreleased]→### Fixed: one entry.What the browsers show (demo, Tags filter, "New" selected, box not focused)
#545454, white text (as in Chromium's own dark list boxes)rgb(0, 221, 255))Contract
make check-names: clean.Gates (local)
npm run build, thengit diff: onlysrc/Resources/public/app.csschanges (the new rule). Safelist,contract.jsonand controllers snapshot are unchanged.css:layers, Prettier,check:jquery,fixture,css:contract,size, ESLint on the new spec: OK.mcr.microsoft.com/playwright:v1.63.0-noble(bin/visual.sh, demo on MySQL 8.4):select.spec.js: 4 passed (Chromium and Firefox, light and dark). With the oldapp.cssthe two dark cases fail, in Chromium and in Firefox (Expected: not "rgb(16, 24, 40)").dashboard.spec.js, all three Chromium viewports: 84 passed. Every screenshot baseline is unchanged; no demo page shows a selected option in a multiple select.Changelog
[Unreleased]→### Fixed→ "A multiple select showed what was chosen only while it had focus, in the dark theme (2026-10-26)".After merge
recomaty-panel requires
idct/adminata: dev-main. Bober then moves its lock to the merge commit and drops the panel's own override in recomaty/recomaty-panel#668.Bober's change for recomaty/recomaty-panel#663, made at Bartosz's request.
🦫 ~Bober