Not exactly sure I understand what youāre trying to do. But take a look at the grid card.
Itāll let you put your buttons into one of the lovelace columns. You can then specify how many columns / rows you want, and itāll scale the button cards to fit. It can replicate both / either horizontal or vertical stacks, plus more. The next 3 rows are a single 2x3 grid.
The top row of this image is a 1x5 grid, if I add another button, Iād probably make it a 2x3 grid and everything will resize. Both grid cards are nested in a vertical-stack (although I could have used a 1x2 grid )
Could @Ildar_Gabdullin or anyone else help me out and point me in the right direction for adding CSS styles to the regular standard grid card.? I donāt think this is something that normally gets styled so thereās nothing really on it in the forums. Iām specifically trying to add styling to accomplish two things on the grid card.
Add styling that will change the spacing between each of the cards within the grid. Iām trying to increase the space on the side of each card in the grid because some of the cards in my smaller grids look like theyāre almost on top of each other. I found one way to do this using mod-card and it works but I want to see if there is a better way or if this is the correct way.
Add styling that will increase the top and bottom margins of the grid to create more space between the grid and the top/bottom of the cards within it. The problem Iām having is the top of the box-shadow style gets cut off on the cards in the top row of the grid. I think this is because the cards in the top row of the grid sit flush or almost flush with the edge of the grid card itself. I used the browser element inspector to increase the top-margin and that solves the problem but Iām lost as to how to correctly add the styling to the grid card. Shadow roots and all of that still confuse me.
Iāve searched and searched and cannot find an answer.
Is it possible with card_mod to remove the background and shadow from an entities card within an auto-entities card?
Iām not able to set the height of a state-switchesā div to 100% to have the same height like the other containers without a state switch. I tried a lot of things, but it still doesnāt work.
The div#root has to be set to 100%, but Iām struggling with the solution.
1st post ā link at the bottom ā styles for media-player
And next time please post your failed attempts w/o any excessive code which is not related to the issue.
Same is about using jinjia templates. First achieve a desired result w/o templates ā then add templates.
Beside, that this is idea is wrong at all, because there is of course a iif, instead of guessing, Michele should always have a first look at the examples from Ildar and then have a look in the html dom, and try there changes in the browser. And you will directly see, that the background CSS attribute in ha-card is not related to the background to change.
Good morning Ildar and thanks for the suggestions. I had completely missed all those examples you posted on the discussion, now I will certainly have less problems to configure my lovelace. Thanks again, and thanks for the tips on how to post, Iāll treasure it.
Edit: Iāve seen your posts, and used for my case this code
my question is simple: itās possible to add an IF for choose background color according to the state of the media? E.g. Iāve a PS4, itās in IDLE status, but I see only cyan, and when itās turned off I canāt choose the color. @Ildar_Gabdullin please can you help me?
What is āOFFā? Means - the āmedia_playerā is āunavailableā?
If yes - then the color is greyish (in a default light theme), then a different selector (not ābackground.no-imageā) must be used.
That way has limitations:
ā card-mod could not be applied to a ābigā Logbook page (even in card-mod-theme);
ā also it does not work inside āconfig-template-cardā (yes, I do have plenty of ālogbookā cards inside āconfig-template-cardā with adjustable āhours_to_showā).
There is a way of defining a style for all logbooks - at least for square images.
The initial idea was proposed by @kulmegil in this post related to Map card.
Place this js code into āwwwā folder (or better create a special folder) and then add as a frontend module:
The solution seems to work fine in Win+Chrome, iOS Companion App.
Anyway, need some more time for testing (is the style stable, is CPU usage same, ā¦).
W/o checking other things - this code is wrong in part of syntax.
Check other examples in the thread āaccessing shadowRoot + ha-cardā.
Also , you cannot use # for comments inside strings.