1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Fix markdown card image sizing (#28449)

This commit is contained in:
karwosts
2025-12-09 04:15:12 -08:00
committed by GitHub
parent b80481b53e
commit 74b51b77fe
2 changed files with 6 additions and 3 deletions

View File

@@ -134,6 +134,7 @@ export class HaAssistChat extends LitElement {
})}" })}"
breaks breaks
cache cache
assist
.content=${message.text} .content=${message.text}
> >
</ha-markdown> </ha-markdown>

View File

@@ -70,13 +70,15 @@ export class HaMarkdown extends LitElement {
a { a {
color: var(--markdown-link-color, var(--primary-color)); color: var(--markdown-link-color, var(--primary-color));
} }
:host([assist]) img {
height: auto;
width: auto;
transition: height 0.2s ease-in-out;
}
img { img {
background-color: var(--markdown-image-background-color); background-color: var(--markdown-image-background-color);
border-radius: var(--markdown-image-border-radius); border-radius: var(--markdown-image-border-radius);
max-width: 100%; max-width: 100%;
height: auto;
width: auto;
transition: height 0.2s ease-in-out;
} }
p:first-child > img:first-child { p:first-child > img:first-child {
vertical-align: top; vertical-align: top;