Skip to content

[stable33] fix(sharing): icon color mismatch on download button in public share#61210

Draft
backportbot[bot] wants to merge 1 commit into
stable33from
backport/59175/stable33
Draft

[stable33] fix(sharing): icon color mismatch on download button in public share#61210
backportbot[bot] wants to merge 1 commit into
stable33from
backport/59175/stable33

Conversation

@backportbot

@backportbot backportbot Bot commented Jun 11, 2026

Copy link
Copy Markdown

Backport of #59175

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

fix: #57282: icon color mismatch on download button in public share

The download button icon on the public share page always appeared

in the opposite color of the button text. The root cause was the

wrong CSS variable for the filter applied to the icon.

Background-image icons are dark (black) by default. In light mode,

the icon must be inverted to white when the primary color is dark,

which requires --primary-invert-if-dark. The code was incorrectly

using --primary-invert-if-bright, inverting in the wrong direction.

In dark mode, icons.css swaps the icon variables so that

--icon-download-dark resolves to the white SVG. The filter logic

must be reversed: --primary-invert-if-bright is needed to invert

the white icon to black when the primary color is bright.

Fix by using --primary-invert-if-dark in light mode and

--primary-invert-if-bright in dark mode, handling both the

prefers-color-scheme media query and the Nextcloud data-themes

attribute for explicit theme selection.

Signed-off-by: Rodrigo Mendes Correia <rodrigo.mendes.correia@tecnico.ulisboa.pt>

[skip ci]
@backportbot backportbot Bot requested review from pringelmann and susnux June 11, 2026 13:08
@backportbot backportbot Bot added bug design Design, UI, UX, etc. 3. to review Waiting for reviews feature: sharing feedback-requested community pull requests from community labels Jun 11, 2026
@backportbot backportbot Bot added this to the Nextcloud 33.0.6 milestone Jun 11, 2026
@susnux susnux removed the community pull requests from community label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants