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

MDI icons wrong size and position in Safari #47

Open
slipx06 opened this issue Jul 2, 2023 · 7 comments
Open

MDI icons wrong size and position in Safari #47

slipx06 opened this issue Jul 2, 2023 · 7 comments
Labels
help wanted Extra attention is needed type/bug Something isn't working

Comments

@slipx06
Copy link
Owner

slipx06 commented Jul 2, 2023

There is an issue with the way Safari renders the foreignObject element which I use to display the mdi icons. This affects their position and size. I don't know how to fix this so for now the work around is to use another browser or use the built in icon presets.

@slipx06 slipx06 added type/bug Something isn't working help wanted Extra attention is needed labels Jul 2, 2023
@Pho3niX90
Copy link
Contributor

@slipx06 is this only happening for safari? Any other browsers like brave, firefox etc? I don't own apple products so cannot reproduce

@slipx06
Copy link
Owner Author

slipx06 commented Nov 12, 2023

@Pho3niX90
Copy link
Contributor

@slipx06 it seems this might be related to safari 16.3?
https://discussions.apple.com/thread/254680843

@Pho3niX90
Copy link
Contributor

I will see if I can maybe emulate safari

@finch6
Copy link

finch6 commented Nov 14, 2023

Im on Safari 16.6.1 and the Card looks good to me?
But maybe my config doesn't have a lot of icons for it to be a "mess"?
Screenshot 2023-11-14 at 08 12 17

Happy to try a config that someone is having an issue with and see if its fine in 16.6.1?

@slipx06
Copy link
Owner Author

slipx06 commented Nov 14, 2023

Thanks. It only becomes a problem if you are using mdi icons in the card. In other words load1_icon: mdi: example etc

I think there must be a better way of rendering the icon inside the SVG. I'll also take another look

@lamixer
Copy link

lamixer commented Dec 3, 2023

Maybe all webkit, not just Safari. I get the same problem when using the HomeAssistant 'app' on a Mac. Looks just like in Firefox, except the icon for the EV charger is small!

(screenshot from Safari)

in_safari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants