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

Color SVG icons #3282

Merged
merged 1 commit into from
Mar 5, 2023
Merged

Color SVG icons #3282

merged 1 commit into from
Mar 5, 2023

Conversation

mueller-ma
Copy link
Member

The keyword currentColor can be used to color SVGs. This seems to be the best solution for the "colorless" icon issue.

Closes #3204

The keyword `currentColor` can be used to color SVGs. This seems to be
the best solution for the "colorless" icon issue.

Closes openhab#3204

Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
@maniac103
Copy link
Contributor

The keyword currentColor can be used to color SVGs.

What do you mean by that? The patch doesn't contain any reference to 'currentColor'.
Besides that, LGTM.

@mueller-ma
Copy link
Member Author

That keyword seems to be part of the svg standard. It can be used as color, e.g. fill=currentColor, and so the icon can signal "please color me". Icons from the standard icon set don't have thid on purpose, because they shouldn't be tinted.

Also see openhab/openhab-webui#1743 for Basic UI.

@maniac103
Copy link
Contributor

OK, so that CSS you're setting only applies in the fill=currentColor case and not to e.g. the example icon in BigBadaboom/androidsvg#264 which doesn't provide any color?

I also assume we want don't want to mix #3289 with this and use color filters there, right?

@mueller-ma
Copy link
Member Author

OK, so that CSS you're setting only applies in the fill=currentColor case and not to e.g. the example icon in BigBadaboom/androidsvg#264 which doesn't provide any color?

Correct.

I also assume we want don't want to mix #3289 with this and use color filters there, right?

For that I'd just tint the whole bitmap. Basic UI doesn't support that for the oh icon source yet: openhab/openhab-webui#1751

@mueller-ma mueller-ma merged commit 9852e9c into openhab:main Mar 5, 2023
@mueller-ma mueller-ma deleted the 3204-svg-color branch March 5, 2023 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change color of "colorless" SVG icons dependent on design
2 participants