@thomasloven, iām having an issue where I am using a conditional ācardā where it only displays if the entity is on.
My issue is style doesnāt work on this so Iām using the mod-card, but i still am unable to get the height to work. Am I doing something incorrectly?
I donāt have much height on my tablet (landscape) so Iād like to remove the app-toolbar
My template is mostly the same as here Iāve tried to use the debug_cardmod option but this does not display anything in my browser console?!
EDIT: I Donāt use markdown cards but Iām using the lovelace demo to get the selector. So youād have to test it out. Either way, thereās 2 shadow roots now.
and you might have to replace div with card-header, seeing that it has a class.
H2 is currently a special case with the markdown card, btw. In order to reliably set the font-size and font-weight youāll have to use ha-markdown-element:first-of-type h2 {instead of h2 { and add !important to the properties.
See end of this github issue: https://github.com/thomasloven/lovelace-card-mod/issues/52.
Thanks for the pointers butā¦
blimey, things are getting complex!!
I wonder if I might be better off just changing to using a custom button card. Itās a pretty simple use case I have here and it means I donāt have to struggle so much with CSS.
Especially if the use of the word ācurrentlyā hereā¦
really does mean it might all change again in the future.
I have an input_boolean in an entities card, and I am trying to change the colour of the toggle switch (in the hui-toggle-entity-row) to be different from the theme. So, for example, I would want the toggle to be a colour other than blue in the sample below:
This should change every toggle on the card. Youād have to get into ha-card div#states div:nth-of-type(n) type-stylings to set the variable at the individual entity level I think.
Hi! Iām trying to change the background color of the first column in the custom layout card. This is what is not working (and this is the closest I have come):
Thank you, thank you, thank you! The hours I spent!
In case this helps someone else, what I was not understanding from the docs was how the $: thing worked (and then leaving in one extra character).
This is the thinking that worked for meā¦
Look at the path from the root of where the style is being applied down to the actual element. For example in my case (see picture in my previous post to this one):
Whenever you see a #shadow-root break up the selector substituting $: | for the #shadow-root. In my case this is the final (take out the comments or it wonāt work):
style:
"ha-card > layout-card": # Part up to #shadow-root, quoted for safety
$: | # The #shadow-root
#columns > div.column.cards { # Part after the #shadow-root then the actual style
background: blue;
}
If this explanation is not correctā¦ Iād love to see it fixed.