[stable32] fix(sharing): icon color mismatch on download button in public share#61209
Draft
backportbot[bot] wants to merge 1 commit into
Draft
[stable32] fix(sharing): icon color mismatch on download button in public share#61209backportbot[bot] wants to merge 1 commit into
backportbot[bot] wants to merge 1 commit into
Conversation
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]
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.
Backport of #59175
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.