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
Custom font styling is not applied to markdown card #52
Comments
I might have this problem as well. From 110 to 111 I can no longer customise font size on markdown and all my cards now have massive font size. Easy to read but not as nice looking ^^. My code is similar to the example above. |
I have recreated this exact same issue on 3 different instances. Using the GUI doesn't fix it. |
Same here. Also after Upgrading to 111. |
Same issue on 0.111.0, rollback to 0.110.* fixes it immediately. |
Indeed. There were many changes to the frontend meant to speed up the loading, as mentioned in the release notes of version 111. |
can confirm the same. Styling no longer applies to any element targeted below ha-card and ha-markdown, I figure as others have suggested it due to the front-end changes in 0.111 |
I have the same problem after Upgrading to 0.111 |
Came here to confirm the styling CSS does not stick anymore with Markdown. When using inspect element I see different CSS stylings than I have written/applied. |
Same style within markdown is ignored. Worked in 110. |
CSS style applied to ha-icon under markdown not working anymore since 0.111 |
Hi @thomasloven is this likely to be fixable? It's the only thing stopping me updating to 0.111 If not, I guess I'll just have to find a different method of displaying a large clock using the markdown card on my homepage. |
You can style markdown by applying styles to |
No I cant. The card does not contain the Heading1 and Heading2 html tags.
|
You’re right. In your use case it wouldn’t work because you want to style date, time, etc differently. |
I guess I could split the sections into separate vertically stacked markdown cards. |
Done and pretty happy with the result.
|
Looks great, but in the end is more a workaround than it is the solution :) |
Not if the frontend changes are permanent :/ |
The markdown card now has the following structure ha-card So, you need to follow the advanced usage instructions and do something like:
That appears to work and gives me: |
Is it possible to use both ha-card and ha-markdown together? I need ha-card to remove the background of the markdown card, but when using that, ha-markdown gets ignored (pretty much like what happens to h1 now). This was my styling prior to the changes,.
When putting the font-sizes in ha-card it does work, but the sizes are different so I have to see what font-size is the same as before. But when I copy your ha-markdown, it does work but then I can't change ha-card. Using ha-card and ha-markdown seems to ignore the ha-markdown and only sees ha-card (same as now with h1). This is what I tried but seems to ignore ha-markdown (unless I remove ha-card)
|
I think it would be like this:
|
YES! That works excellent! Thanks alot, you have saved me a lot of testing and headaches! |
Works great - except for H2 headers? Seems there is some fixed styling somewhere that doesn't get overridden. I change the exact same lines to H1 (and #) and then it works, but styling h2 and using ## doesn't work. Non working code:
Change the ## to # and h2 to h1 to get a working styling. |
Thanks @gadgetchnnel - all it takes is for one person to RTFM and we're back in business, haha :) |
@tomlut @Knapoc My code looks like this:
|
Yeah, I found the offending code here: I've added that info to the (closed) issue I had created, asking Bram to review if this is as intended. |
@gadgetchnnel has the correct solution here. |
The problem with h2 can be solved by using a more specific selector than the built in one, such as ha-markdown-element:first-of-type h2 {
font-size: 50px !important;
} |
Why do this though? Why make it more complicated? |
Because it makes Home Assistant and it's core functionality work better and more pretty. |
Thanks Thomas, much appreciated. |
Just saying: You might need to change |
My Home Assistant version: 0.111.0
My lovelace configuration method (GUI or yaml): yaml
What I am doing: applying custom styling to a markdown-card
What I expected to happen: font styling is applied to element h1
What happened instead: no styling is applied. Safari reports
User Agent Style Sheet
. Issue is present in Firefox too.Minimal steps to reproduce:
Use the aforementioned yaml in a view.
Error messages from the browser console: (I don't think these are related)
By putting an X in the boxes ([ ]) below, I indicate that I:
Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
Have made sure I am using the latest version of the plugin.
Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
The text was updated successfully, but these errors were encountered: