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

white-balance-sunny is not centered #6597

Closed
Mariusthvdb opened this issue May 19, 2022 · 9 comments
Closed

white-balance-sunny is not centered #6597

Mariusthvdb opened this issue May 19, 2022 · 9 comments
Assignees
Labels
Bug A bug in an icon glyph or a first-party library.

Comments

@Mariusthvdb
Copy link

Mariusthvdb commented May 19, 2022

Where are you experiencing this bug?

Somewhere else

What is the issue you are experiencing?

just posting this as a preliminary quest for perfect centered icons.

As it happens in Homeassistant we use css animation on the icons via plugin called card_mod.

a lot of mdi icons are centered nicely, some though are not while one would expect the form factor to indicate so. like weather-sunny.

I am aware this is part of a larger family of weather icons, but the -sunny being so symmetrical, feels 'buggy' because of that.

compared to the circle family icons:

b0ab588b8a24cf34f5f056c7a4f420213bf877ef

made by @Ildar_Gabdullin in https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/3179

please have a look if this is an issue you can sympathize with?
thanks!

@Mariusthvdb Mariusthvdb added the Bug A bug in an icon glyph or a first-party library. label May 19, 2022
@mririgoyen
Copy link
Sponsor Collaborator

weather-sunny definitely is centered:
weather-sunny

But white-balance-sunny, which is what is in your preview, is not:
white-balance-sunny

@mririgoyen mririgoyen changed the title weather-sunny is not centered? white-balance-sunny is not centered May 19, 2022
@Mariusthvdb
Copy link
Author

Mariusthvdb commented May 19, 2022

You're right! I typo'd... sorry bout that.

would make it even easier to fix maybe ;-) since its a loner?

@mririgoyen mririgoyen self-assigned this May 19, 2022
@mririgoyen mririgoyen added this to the Upcoming - 6.9.xx milestone May 19, 2022
@mririgoyen
Copy link
Sponsor Collaborator

It's fixed. Won't make it until the 6.9 release.

image

@Mariusthvdb
Copy link
Author

magic. thank you very much!

@ildar170975
Copy link

very fast, thank you

@Mariusthvdb
Copy link
Author

Mariusthvdb commented May 20, 2022

as a followup please this: where can we check these icon file designs, like you posted above, with the grid-lines behind them? Asking because several more icons show this:

May-20-2022 10-01-35

And I like to pinpoint it correctly: is it the icon, or is it some css issue in HA core. And raise an issue in the correct repo ;-)

@mririgoyen
Copy link
Sponsor Collaborator

Pump is perfectly aligned to the grid.
[![pump](https://materialdesignicons.com/icon/pump)](https://materialdesignicons.com/icon/pump)
pump

@Simran-B
Copy link
Collaborator

The icons are generally designed to be visually centered. In some cases, the base icon is shifted to make room for a modifier, so that the icon is recognizable and still fits on the canvas. The icons are not designed to rotate around what would be the most meaningful center based on what's depicted. For many icons, it would not even be possible to shift them so that the ideal center is at the canvas center due to the constraints of the canvas and material design guidelines, in particular the grid alignment for pixel-perfect shapes.

If you want icons to visually rotate around their semantically correct center, then determine this center and use it as rotation axis instead of the geometric canvas center. Note that this center can be off-grid.

@Mariusthvdb
Copy link
Author

Mariusthvdb commented May 22, 2022

Thanks. Aware not all icons are suited for rotating effects. Ofc. But those that are, like above, and many other circular icons, should not be positioned off center in Ha.

Somehow there are other issues at hand that cause that to happen , and I hope to select a few of those icons to create a working test setup for further analysis.

The issues also seem to differ between browsers and/or desktop vs mobile.

Ruling out icon issue by using these pixel perfect icons is really helpful and a first step in the process.

anyways, thanks for chiming in. I’ll will try to do as you suggest, because currently I wouldn’t know how (-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in an icon glyph or a first-party library.
Projects
None yet
Development

No branches or pull requests

4 participants