Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes visual bug by making the icon grey only on hover and white otherwise. #25023

Closed
wants to merge 2 commits into from

Conversation

RafaOP
Copy link

@RafaOP RafaOP commented Jan 8, 2021

As described in #24450, the icon looks off in grey but, if just changed to white, it would be a white icon on white background on hover, which I solved by making the icon grey only on hover and otherwise white.

@MorrisJobke
Copy link
Member

cc @nextcloud/designers

@MorrisJobke MorrisJobke added 3. to review Waiting for reviews papercut Annoying recurring issue with possibly simple fix. labels Jan 19, 2021
@MorrisJobke MorrisJobke added this to the Nextcloud 21 milestone Jan 19, 2021
@MorrisJobke
Copy link
Member

/backport to stable20

This was referenced Jan 21, 2021
@rullzer rullzer mentioned this pull request Jan 29, 2021
@rullzer rullzer modified the milestones: Nextcloud 21, Nextcloud 22 Feb 2, 2021
@rullzer
Copy link
Member

rullzer commented Feb 2, 2021

/backport to stable21

@MorrisJobke
Copy link
Member

I would like to get feedback from @nextcloud/designers on this one

@MorrisJobke MorrisJobke changed the title Fixes #24450 by making the icon grey only on hover and white otherwise. Fixes visual bug by making the icon grey only on hover and white otherwise. Apr 28, 2021
Comment on lines 387 to 388
.icon-file-white,
.icon-filetype-text,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! We have a dedicated function to automatically change the colours of svg.
You can use the same @include icon-color('text', 'filetypes', $color-white, 1, true); like we do here for example:

server/core/css/icons.scss

Lines 266 to 269 in 4f90766

.icon-shared-white,
.icon-share-white {
@include icon-color('share', 'actions', $color-white, 1, true);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That way you do not have to ship another white svg.

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 design-wise, thanks for the fix @RafaOP! :)

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RafaOP
Copy link
Author

RafaOP commented May 10, 2021

Sorry for the time it took, could anyone review it please?

@RafaOP RafaOP requested a review from skjnldsv May 10, 2021 21:20
@@ -0,0 +1,9 @@
<?xml version="1.0" standalone="no"?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is then also not needed anymore, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I forgot to remove the file but yes, it is not needed anymore. Should I make another change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep - just remove it. You could also use --amend to add changes to your last commit and then force push via git push --force-with-lease (this will not overwrite if there were changes on the server inbetween your last pull and your push).

This was referenced May 20, 2021
Copy link
Member

@juliushaertl juliushaertl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments in regards to the theming, which would be good to adjust before getting this in. 😉

@@ -92,7 +92,7 @@ $invert: luma($color-primary) > 0.6;
}

/* Colorized svg images */
.icon-file, .icon-filetype-text {
.icon-file, .icon-filetype-text, .icon-file-white:hover, .icon-file-white:focus {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be the right place for just the focus styling. This should only apply for the button so it should rather be part of settings.scss if even needed as the button should have a focus/hover feedback already.

Comment on lines +391 to +395
.icon-file-white,
.icon-filetype-text-white {
@include icon-color('text', 'filetypes', $color-white, 1, true);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-white is not ideal as the button will have a primary color adapted to the theming, so whenever there is a bright theme used the white fixed does not fit anymore. I'd suggest something like this:

Suggested change
.icon-file-white,
.icon-filetype-text-white {
@include icon-color('text', 'filetypes', $color-white, 1, true);
}
.icon-file-primary,
.icon-filetype-primary {
@include icon-color('text', 'filetypes', $color-primary-text, 1, true);
}

@skjnldsv skjnldsv mentioned this pull request Oct 13, 2021
@skjnldsv skjnldsv modified the milestones: Nextcloud 23, Nextcloud 24 Oct 21, 2021
@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@blizzz blizzz mentioned this pull request Mar 31, 2022
This was referenced Apr 7, 2022
@blizzz blizzz modified the milestones: Nextcloud 24, Nextcloud 25 Apr 21, 2022
This was referenced Aug 12, 2022
This was referenced Aug 24, 2022
This was referenced Sep 6, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Sep 22, 2022
@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@blizzz
Copy link
Member

blizzz commented Mar 7, 2023

closing for inactivity, does not fit to current code base either

@blizzz blizzz closed this Mar 7, 2023
@blizzz blizzz removed this from the Nextcloud 26 milestone Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress papercut Annoying recurring issue with possibly simple fix.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tiny style issue: icon in personal settings in blue button on the bottom is grey, not white
7 participants