With the latest update to 0.111, my markdown cards lost the ability to style the h2 headers with card-mod. Cant get any styling applied to the h2 tag.
To style the h2 headers with custom css using card-mod.
I've added a markdown card as listed below, using card-mod. Works in 0.110.4, breaks in 0.111.0
Styling is also not applied when loading though the HA Android app.
n/a
- type: markdown
content: |
## In een oogopslag...
style: |
ha-card {
margin: 0px 14px -5px 14px;
box-shadow: none;
--paper-card-background-color: rgba(0, 0, 0, 0.0)
}
h2 {
font-size: 18px;
font-weight: 400;
padding-left: 10px;
border-left: 3px solid rgba(81, 134, 236);
}
None observed
Rollback to 0.110.4 gave expected result, after browser refresh.
Same here.
I can apply any other styling but h1 is impossible.
This is a custom card, please report this at the lovelace-card-mod repo.
@bramkragten we did, but based on the symptoms I have reason to believe it is a HA frontend issue that prevents the card from being styled. The markdown card is standard Lovelace.
We don't support styling of the markdown content... That functionality comes from the mod.
Fair enough.
@bramkragten Just to get back on this a little - the issue (even though not supported, fully understood) rises because of the use of !important in the markdown card h2 styling - which effectively prevents further styling.
Q: is the use of !important intended? It also overrides any styling a theme may apply...
(FYI; the issue where no styling was applied at all anymore was fixed by correctly stepping through the shadow-root (or: better define the styling), but the h2 styling just won't get overriden).
@ludeeus can probably tell you why the !important was needed?
Most helpful comment
Same here.