piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.71k stars 340 forks source link

[Bug]: Icons misaligned #1199

Closed Mikescotland closed 1 year ago

Mikescotland commented 1 year ago

Requirements

Current Behavior

Some of the icons seem to be misaligned in the circle. See screenshot (Particulare icon, Window icon). It happens ONLY in the mushroom cards, the generic cards from HA don't have this problem. Strange, it does not appear on Motion, Temperature, Humidity icons but any other is misaligned (around 10 px down than it should be). image

Here is Yaml for the card: square: false type: grid cards:

Expected Behavior

All icons should be centered

Steps To Reproduce

No response

Context

YAML state

Environment

- Browser:
- HA Version:
- Mushroom:

Anything else?

No response

piitaya commented 1 year ago

Do you have any theme? What browser do you use?

Mikescotland commented 1 year ago

I have Metro theme, however it also happens when Default HA theme. Happens regardless of a browser, Chrome, Firefox also mobile AndroidHA App.

zanix commented 1 year ago

I too have the metro theme and some of the Mushroom icons are now misaligned. However, the default theme icons are also misaligned.

Here are screenshots from the default theme.

image image

Fan icons look alright image image

I did discover something else. It looks like the ones that are misaligned have mushroom-shape-icon > ha-state-icon > ha-icon image

And the ones that look alright only have mushroom-shape-icon > ha-state-icon image

I noticed template, cover, light, media, number, and entity look wrong. Fan and climate seem to look alright.

piitaya commented 1 year ago

Can you try with the latest 3.0.2 (beta version) ? https://github.com/piitaya/lovelace-mushroom/releases/tag/v3.0.2

zanix commented 1 year ago

Tested with the following test theme using a red outline for ha-state-icon. After checking the alignment with the outline, I disabled it and rechecked again.

A Test:
  card-mod-theme: "A Test"
  card-mod-card-yaml: |
    .: |
      ha-state-icon {
        outline: 1px solid red;
      }

  modes:
    light:
    dark:

Overall, it looks good. There is some shifting of the positioning but I think that's due to a 21px icon in a 42px container (on my screen anyway).

I also tested with the Metro theme and it looks good there as well (with no shifting, as it sets the icons to 24px in a 48px container).

Animations that use clipping are aligned correctly now. image image

Mikescotland commented 1 year ago

Can confirm icons aligned pretty good now. Thank you very much

On Mon, 10 Jul 2023, 19:27 Joshua Clark, @.***> wrote:

Tested with the following test theme using a red outline for ha-state-icon . After checking the alignment with the outline, I disabled it and rechecked again.

A Test: card-mod-theme: "A Test" card-mod-card-yaml: | .: | ha-state-icon { outline: 1px solid red; } modes: light: dark:

Overall, it looks good. There is some shifting of the positioning but I think that's due to a 21px icon in a 42px container (on my screen anyway).

I also tested with the Metro theme and it looks good there as well (with no shifting, as it sets the icons to 24px in a 48px container).

Animations that use clipping are aligned correctly now. [image: image] https://user-images.githubusercontent.com/1580378/252402955-377c6dae-fb29-4a91-b405-7482d5b58574.png [image: image] https://user-images.githubusercontent.com/1580378/252402912-42f14641-4d05-4d42-80b9-07482700487b.png

— Reply to this email directly, view it on GitHub https://github.com/piitaya/lovelace-mushroom/issues/1199#issuecomment-1629483817, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMNLFK5EZOVBOQQYLNIQOXDXPRCR3ANCNFSM6AAAAAA2CXUSJY . You are receiving this because you authored the thread.Message ID: @.***>