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

View profile: clock icon for last seen is not clearly visible in dark mode #3329

Closed
Simon-Laux opened this issue Jul 22, 2023 · 3 comments · Fixed by #3331
Closed

View profile: clock icon for last seen is not clearly visible in dark mode #3329

Simon-Laux opened this issue Jul 22, 2023 · 3 comments · Fixed by #3331
Assignees
Labels
bug Something isn't working good first issue Good for newcomers ui/ux UI/UX related issues

Comments

@Simon-Laux
Copy link
Member

Bildschirmfoto 2023-07-22 um 20 13 13

I think it should become white or inverted in darkmode. maybe there is a way to just give it the text color (the css variable which gets set by the theme).

@Simon-Laux Simon-Laux added bug Something isn't working good first issue Good for newcomers ui/ux UI/UX related issues labels Jul 22, 2023
@Duesenberg
Copy link

Hello,

Would it be viable to use an @if statement in the _icons.scss file?

Example, using the condition for the dark theme when lightness is less than 50. If condition is fulfilled invert the icon:

@if lightness(var(--bgPrimary)) < 50 {
img.material-icon {
filter: #{"invert()"};
}
}

If this is a good suggestion, can I add this contribution?

@Simon-Laux
Copy link
Member Author

would not work, because this is run at compile time on the base styles. the themes are css files that basically set css vars, so maybe it could work inside of _themebase.scss instead.

But since it is a svg file there could be a better way to set the fill color via css, which would be more flexible, but maybe then it needs to be displayed as background with the svg as mask instead. _status-icon.scss uses this technique, although it might need additional code changes I think it would be worth it to set the color instead of inverting it.

@r10s
Copy link
Member

r10s commented Jul 23, 2023

svg has "currentcolor" for that, https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/color

we're using that in practise in the calendar, https://codeberg.org/webxdc/calendar/src/branch/main/index.html

@farooqkz farooqkz self-assigned this Jul 24, 2023
Simon-Laux added a commit that referenced this issue Jul 27, 2023
* make clock icon in viewprofile a css mask

* style for the previous commit

* clock icon in viewprofile follows colour of global text. fixes #3329

* pretty code!

* update CHANGELOG

* per Simon's suggestion

* per Simon's suggestion for reusability

* fix vertical align of material icon

* Update scss/_icons.scss

Co-authored-by: Simon Laux <Simon-Laux@users.noreply.github.com>

---------

Co-authored-by: Simon Laux <Simon-Laux@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers ui/ux UI/UX related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants