Right now the color for this icon is hard-coded so it only works in light mode, see T358513 and https://gerrit.wikimedia.org/r/c/design/codex/+/1006589. We should explore ways to make this work in dark mode too.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Select: Make CSS-only icon work in dark mode | design/codex | main | +7 -2 |
Related Objects
Related Objects
Event Timeline
Comment Actions
Some ideas:
- Use background-blend-mode somehow, see T358513#9578928 and https://gerrit.wikimedia.org/r/1006946 for an initial exploration
- Change the markup of the CSS-only Select component to something like <div class="cdx-select"><select> ... </select></div>, so that we can then use :after for the icon (or add a separate <span> for the icon). Avoid a breaking change by writing the styles such that they still work for the old markup, but without night mode support.
Comment Actions
Change 1007462 had a related patch set uploaded (by Catrope; author: Catrope):
[design/codex@main] [Proof of concept] Select: Make CSS-only icon work in dark mode
Comment Actions
This introduces a second hack into the Select component code related to supporting CSS custom properties - should we capture the work to create a more sustainable solution in the future somewhere?
Comment Actions
Do we have ideas about what a more sustainable solution might be, or would the follow up work be a spike to investigate further?
Comment Actions
@CCiufo-WMF the latter; we've thrown around some ideas but are far from a solid long-term solution IMO