-
Notifications
You must be signed in to change notification settings - Fork 252
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
v.4.0.1 Icon Size not rendered correctly #742
Comments
|
This Issue is labeled "Icon Size not rendered correctly". Anyway, good to know that the Bug regarding Icon Size exists on Mac as well! |
tbh, I am not seeing this anywhere at all... could you please try a minimal card config to show the issue and share that? |
I have the same problem after update to v4.0.1. |
Sure! Thanks for your assistance! Edit: Simplified Code
To me it looks like it is only occuring when set:
In my particular Case, the Button-Cards usually sit in a layout-card with three Cards in a Row, and the Height in each Card is set to 100%. (this might make the impact of the change more visible). Let me know if you can reproduce it! |
not sure how minimal you are looking for, but here is one that is pretty basic. Attached screenshot is yesterday pre-4.0.1 (left) and today post-4.0.1 (right). I updated to 4.0.1 late yesterday evening just before bedtime; this morning I noticed the change. The icon is much smaller.
|
I confess I only use
in a card in a 'chip' template, and nowhere else but on icons or entity_picture (which are actual elements you need to set the size for) I would Not see the use setting the card height in pixels in my own config tbh, where card size is determined by the container cards like grid or horizontal-stack (and an aspect_ratio where applicable). Have it auto resize according to those cards an it all automatic But, most importantly, an in all honesty, isn't it to be expected that when you set the card height to a fixed pixel height, it auto adjusts the icon size to that? No need to test the icon getting smaller if you set the height to 50px... And if you do, just take out other elements, to make the icon bigger, seems the only way, show less and the leftovers have more space. what I didn't find remarkable is using:
shows no icon at all, and the card is way smaller than without the 100% ;-) odd indeed |
True. I have almost nothing set to fixed px, because of what you said 😉 The Point is - with 4.0.1 the icons can't get as big as they need to. I wouldn't mind if I could just set the (relative) Icon size to 150%, if that would solve the issue. But I haven't found a way. Could you reproduce the behavior? Any idea how i could make the Icons look like they did on 3.5? |
I'll have a look at that today. There's several small CSS issues it seems. |
Sorry for OT, but this is important: Thank you Guys so much for this awesome Card, and continuing Support! Homeassistant wouldn't be as good as it is without such a flexible Card 👍 👍 👍 |
Ok, I found it... it's not a bug, it's actually how HA would do it haha. But some CSS has changed, that's true. #container.vertical div#img-cell + div,
#container.name_state div#img-cell + div {
margin-top: 8px;
} Should I revert that ? I think it's created a whole lot of problems... For the code in the first post of the issue, @dafunkydan, can you try to fix it manually with: styles:
name:
- margin-top: unset Let me know if it gets back to what you expect? |
Yes, that does the Trick! 👍😎 My two Cents - this Card is about customizing as one likes, so a forced margin is not the most nice Thing 😉 Anyway, if mentioned in the Docs, that should be okay as well. Thanks again for your awesome bunch of Code and Support, really appreciate it! 👍 |
I agree, I'll revert it :) |
🎉 This issue has been resolved in version 4.1.0-dev.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is because I've changed the way the font color is computed when |
Solved manually with this "tricks"! 🎉 |
heck, never seen any of these issues, the latest dev now introduces them in my config....
now compresses the button when on. I didnt see this before. And its quite impactful as it not only shrinks the icon, but it seems to compress the whole rest of the button.. On Desktop this would be something to live with probably, but on mobile where everything is tiny as it is (4 buttons in a grid 1/1) the effect is all the more visible. not sure what to do, add the unset to the top element in my button? and if yes, which is that, the icon, or the notification. I also tried to use |
Not sure what you are talking about @Mariusthvdb? Maybe pictures will help? |
sorry... or 2 almost identical buttons for comparison: Seems that is not necessary at all, and there is plenty if room above the icon in the 'on' state not to have to shrink or drop. |
Try to play with |
ok thanks, I will, but I am almost 100% certain I didnt see this before.. |
Well, just change the Version back (HACS -> Integrations -> Button-Card -> (ThreeDots) ReDownload -> 3.5) and see what happens. This is how i made sure :-) |
## [4.1.0](v4.0.1...v4.1.0) (2023-08-03) ### Features * **templates:** Support for one time evaluation of js templates in `triggers_update` and `entity` ([#741](#741)) ([b372642](b372642)), closes [#618](#618) [#558](#558) [#368](#368) ### Bug Fixes * Keep default background color for color_type: card when off ([41dea3f](41dea3f)), closes [#737](#737) * lock would not display on many browsers ([245441b](245441b)), closes [#740](#740) * remove margin-top on name/label/state introduced with 4.0.0 which broke many cards ([53fee75](53fee75)), closes [#742](#742) [#744](#744)
🎉 This issue has been resolved in version 4.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Checklist
Describe the bug
Icon Size 100% is no longer 100% with Version 4.x
In this particular Case, drawn Icon Size doesn't change between 20-100%.
Icon gets smaller when going lower that 20%, but not bigger.
Same behavior goes for using 'px'. Icon doesn't get bigger as in Screenshot below, though there is Space available.
Version of the card
4.0.1
To Reproduce
This is the configuration I used:
Screenshots
Expected behavior
When Size: 100%, Icon should fill the whole available Size.
Desktop (please complete the following information):
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: