From 8d37c5612b9358a937fbb27405d94ee9f973a441 Mon Sep 17 00:00:00 2001 From: Josh McCarty Date: Thu, 16 Nov 2023 04:28:45 -0700 Subject: [PATCH] Move attribute pre styles to ha-attribute-value component (#18649) --- src/components/ha-attribute-value.ts | 5 ++++- src/components/ha-attributes.ts | 7 ------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/ha-attribute-value.ts b/src/components/ha-attribute-value.ts index 8ad861538a08..3efe39e47b5c 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 ab277ed726aa..d63b987a5683 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;