Page MenuHomePhabricator

CSS-only Select icons are broken in night mode
Open, Needs TriagePublic2 Estimated Story PointsBUG REPORT

Description

Right now the color for this icon is hard-coded so it only works in day mode, see T358513 and https://gerrit.wikimedia.org/r/c/design/codex/+/1006589. We should explore ways to make this work in night mode too.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

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.

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

https://gerrit.wikimedia.org/r/1007462

CCiufo-WMF moved this task from Inbox to Up Next on the Design-System-Team board.
CCiufo-WMF renamed this task from Make Select CSS-only icon work in night mode to Make Select CSS-only Select icon work in night mode.Feb 29 2024, 8:44 PM
CCiufo-WMF renamed this task from Make Select CSS-only Select icon work in night mode to Make CSS-only Select icon work in night mode.

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?

Do we have ideas about what a more sustainable solution might be, or would the follow up work be a spike to investigate further?

@CCiufo-WMF the latter; we've thrown around some ideas but are far from a solid long-term solution IMO

Ok, thanks! I'd suggest we create a future spike in the backlog to revisit this. @AnneT or @Catrope could one of you create the task with the context of why the approaches taken so far are hacks?

CCiufo-WMF renamed this task from Make CSS-only Select icon work in night mode to CSS-only Select icons are broken in night mode.Mar 18 2024, 4:49 PM
CCiufo-WMF lowered the priority of this task from High to Low.
CCiufo-WMF raised the priority of this task from Low to Needs Triage.
CCiufo-WMF changed the subtype of this task from "Task" to "Bug Report".