-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
'keep: margin: false' is not respected for inserted stack #34
Comments
Probably same reason as here: |
Seems that after 2021.12 functionality of "keep: margin: xxxx" gives erratic results if one stack includes another stack. |
I am seeing this problem too, where I have two horizontal stacks contained within a vertical stack. I see this issue been open for a long time, is there a workaround or an update on the issue? Thanks for your help! |
Only by card-mod. |
Thanks @ildar170975, I thought that might be the case. I've actually started trying to fix mine using Have asked for help from the community here https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/3799, hoping someone will be able to point me in the right direction. Don't suppose you have any ideas? |
@BadgerLoaf |
Sorry @ildar170975 if I have misunderstood something, but the issue I'm seeing is where I have two horizontal stacks within a vertical stack (using custom:stack-in-card) and this causes a gap between the two horizontal cards. Looking at the inspect code below, I have identified that I need to replace Is this not the same issue you were seeing? Apologies for highjacking the thread if not. |
Thanks @ildar170975. I believe we are seeing the same issue (having a horizontal stack inside a vertical one).... though sounds like you have found an easier way to get around it, than my idea of changing that display property. Would you mind sharing your code on how you changed to the margin to get around the issue? |
Hi @ildar170975 - Would you mind sharing your code as to how you removed this border? Thanks for your help! |
Sorry, I do not understand. |
@ildar170975 Apologies, you are right, it's a margin issue, not the border. I didn't use the correct words. Like you I am seeing the margin of 4px... What was your solution to remove the offending margin? Thanks again! |
Seems that W/o card-mod fix:
With card-mod fix:
Yes, there are still ugly round corners on the internal stack. Need to be also fixed by card-mod. |
@ildar170975 - Amazing, thank you! That card mod has worked and removed the gap caused by the margin. |
Same problems with box-shadow & border. |
For anyone finding this, the solution for getting a clean no borders with this plugin and card mod is: - type: custom:stack-in-card
title: Air Conditioners
mode: vertical
card_mod:
style:
hui-vertical-stack-card $: |
div#root > * {
margin: 0px !important;
--ha-card-border-width: 0;
}
# elided the rest of the config... EDIT: Probably need to tweak the paddings to get it seamless, but you get the idea. |
Checklist:
Release with the issue:
0.2.0
Last working release (if known):
Browser and Operating System:
Chrome, Win10x64
Description of problem:
If the 'keep: margin: false' is set then the margin between card is supposed to be 0.
It works for two Entities cards:
But if the 2nd card is
stack-in-card
, then the margin is present anyway - look at the margin-top:Javascript errors shown in the web inspector (if applicable):
no
Additional information:
The text was updated successfully, but these errors were encountered: