From 824a3f288d1dc677f71a3190277c5fb9c28dad72 Mon Sep 17 00:00:00 2001 From: Silas Krause Date: Tue, 2 Dec 2025 07:07:45 +0100 Subject: [PATCH] Revert custom markdown styles (#28277) --- src/components/ha-assist-chat.ts | 1 + src/components/ha-markdown.ts | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/ha-assist-chat.ts b/src/components/ha-assist-chat.ts index 22f8213bf5..1d47313e56 100644 --- a/src/components/ha-assist-chat.ts +++ b/src/components/ha-assist-chat.ts @@ -659,6 +659,7 @@ export class HaAssistChat extends LitElement { --markdown-table-border-color: var(--divider-color); --markdown-code-background-color: var(--primary-background-color); --markdown-code-text-color: var(--primary-text-color); + --markdown-list-indent: 1rem; &:not(:has(ha-markdown-element)) { min-height: 1lh; min-width: 1lh; diff --git a/src/components/ha-markdown.ts b/src/components/ha-markdown.ts index 404e24b6b9..f5627ef118 100644 --- a/src/components/ha-markdown.ts +++ b/src/components/ha-markdown.ts @@ -71,13 +71,11 @@ export class HaMarkdown extends LitElement { color: var(--markdown-link-color, var(--primary-color)); } img { - background-color: rgba(10, 10, 10, 0.15); + background-color: var(--markdown-image-background-color); border-radius: var(--markdown-image-border-radius); max-width: 100%; - min-height: 2lh; height: auto; width: auto; - text-indent: 4px; transition: height 0.2s ease-in-out; } p:first-child > img:first-child { @@ -86,9 +84,9 @@ export class HaMarkdown extends LitElement { p:first-child > img:last-child { vertical-align: top; } - ol, - ul { - padding-inline-start: 1rem; + :host > ul, + :host > ol { + padding-inline-start: var(--markdown-list-indent, revert); } li { &:has(input[type="checkbox"]) {