-
Notifications
You must be signed in to change notification settings - Fork 128
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
Parameter "card_margin" ignored when using grid layout #194
Comments
having the same issue. looking forward to the merged version. |
still seeing this behavior ??? has a fix been merged ? |
There is already a PR (#210) to fix this issue |
Hi, PR still not reviewed ? |
Hi, any update regarding this PR? |
Any news with this merge, or any workaround? |
just wanted to say that this issue still exists. Is it possible to review the PR/Merge? for now, as a workaround, i have added masonry-view-card-margin:2px to my theme.yaml i suspect you can change the 2px to what ever you like. |
Also still have the same bug @thomasloven. Could you please accept the PR request? Thanks! |
|
Yes but it will impact everywhere, some places it's needed the manual set of marging. |
My Home Assistant version: 2022..4.1
Layout-card version (FROM BROWSER CONSOLE): LAYOUT-CARD 2.4.2 IS INSTALLED
What I am doing: Trying to set card margins on nested grid-layouts
What I expected to happen: Margin on cards within the grid is controlled by the
card_margin
parameterWhat happened instead:
card_margin
parameter is being ignored and all cards have a marginMinimal steps to reproduce:
This appears to be caused by the
#root > *
CSS which is getting injectedIn other layouts which inherit from BaseColumnsLayout, the
--card-margin
CSS variable is set which defaults to the margin shown above, but can be overriden with thecard_margin
parameter. In the grid layout, this is statically set and cannot be overridden withcard_margin
.(grid.ts, lines 147-149)
Would it be possible to update the grid layout so that it uses the
card_margin
parameter if it is defined to correct this behavior?In some instances it is possible to wrap the grid card in a card-mod card and set the margins that way, but this is not always possible - e.g., when using auto-entities.
By putting an X in the boxes ([X]) below, I indicate that I:
The text was updated successfully, but these errors were encountered: