Page MenuHomePhabricator

Use @color-inverted-fixed instead of @color-inverted for progressive/destructive button icons (CSS)
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • I'm using a CSS only, progressive button w/ icon.
  • I'm specifying the classes cdx-button cdx-button--weight-primary cdx-button--action-progressive.
  • I'm using dark mode

What happens?:

  • The icon is black next to the white button text on progressive blue background
  • .cdx-button:enabled.cdx-button--weight-primary.cdx-button--action-progressive .cdx-button__icon, .cdx-button.cdx-button--fake-button--enabled.cdx-button--weight-primary.cdx-button--action-progressive .cdx-button__icon applies and sets background-color: var(--color-inverted,#fff)

What should have happened instead?:

  • The icon should be white as the button text
  • background-color: var(--color-inverted-fixed) should be applied instead

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia): Codex 1.5.0

Other information (browser name/version, screenshots, etc.):

Screen Shot 2024-05-05 at 00.12.40.png (88×298 px, 5 KB)

Workaround: specify notheme class on the icon.

Event Timeline

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

Change #1027250 had a related patch set uploaded (by Simon04; author: Simon04):

[mediawiki/extensions/MultimediaViewer@master] Fix Codex icon on progressive buttons in dark mode

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

For now, as a a workaround we're adding the notheme class to these buttons - but it doesn't seem like the best solution. Would be great for someone in DST to look at the fix here and suggest a better long term fix. Thanks in advance!

Change #1027250 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@master] Fix Codex icon on progressive buttons in dark mode

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

Change #1028385 had a related patch set uploaded (by TheDJ; author: TheDJ):

[design/codex@main] Dark mode: prog/dest prim buttons should not invert icons

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

CCiufo-WMF subscribed.

@TheDJ thanks for the Codex patch! @egardner is out right now so I'll see if someone else can review.

Change #1028585 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/extensions/MultimediaViewer@master] Revert "Fix Codex icon on progressive buttons in dark mode"

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

Change #1028385 merged by jenkins-bot:

[design/codex@main] styles: prog/dest prim buttons should not invert icons in dark mode

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

Change #1032095 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update Codex from 1.5.0 to 1.6.0

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

Change #1032095 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from 1.5.0 to 1.6.0

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

Volker_E removed a project: Patch-For-Review.
Volker_E set the point value for this task to 1.

Change #1028585 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@master] Revert "Fix Codex icon on progressive buttons in dark mode"

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