diff --git a/src/components/ha-attribute-value.ts b/src/components/ha-attribute-value.ts index 8ad861538a..3efe39e47b 100644 --- a/src/components/ha-attribute-value.ts +++ b/src/components/ha-attribute-value.ts @@ -62,8 +62,11 @@ class HaAttributeValue extends LitElement { static styles = css` pre { + font-family: inherit; + font-size: inherit; margin: 0; - white-space: pre-wrap; + overflow-wrap: break-word; + white-space: pre-line; } `; } diff --git a/src/components/ha-attributes.ts b/src/components/ha-attributes.ts index ab277ed726..d63b987a56 100644 --- a/src/components/ha-attributes.ts +++ b/src/components/ha-attributes.ts @@ -125,13 +125,6 @@ class HaAttributes extends LitElement { text-align: center; margin-top: 16px; } - pre { - font-family: inherit; - font-size: inherit; - margin: 0px; - overflow-wrap: break-word; - white-space: pre-line; - } hr { border-color: var(--divider-color); border-bottom: none;