I’m trying to set the background of area cards to match other tiles (semi transparent black) in the dark iOS theme. I can edit the yaml file for the theme to set the background to fully transparent or use card-mod, however, there is always a semi-transparent white layer and a linear gradient that cannot be removed. Does anyone know how I can customize this?
hi, try this:
card_mod:
style: |
ha-card .container::before {
background: none!important;
}
:host {
ha-card .container {
background: none!important;
}
No need to split them.
card_mod:
style: |
.container::before {
background: none !important;
}
.container {
background: none !important;
}
Unfortunately, doesn’t work. You’ll see the gradient and semi-transparent white background are still there.
Your post contains a code with a wrong syntax.
This could lead beginners to wrong directions.
Besides, I wonder what is a point of discussing card-mod-related things in 100500 separate threads instead of the DEDICATED one?
Helping is very good, but wrong advices could be misleading…
We can discuss all wrong parts if you like.
But better to do it in a proper thread.
P.S. Deleting all own posts was not a good idea.
I see what you describe a the semi-transparent, but I do not see the gradient with this code. It was also not clear you were using the custom:-mod-card from your original post.
For future questions, check out this (#11) for posting and formatting your code.
The link to the dedicated card-mod thread
When you apply the mod to the area card do you get the results you want?
type: area
area: bedroom
card_mod:
style: |
.container::before {
background: none !important;
}
.container {
background: none !important;
}
This works, just not with the conditional card for some reason.