Compare commits

...

1 Commits

Author SHA1 Message Date
Petar Petrov 41a8194a72 Wrap long logbook entries instead of truncating them 2026-07-03 12:05:08 +03:00
+11 -9
View File
@@ -864,7 +864,10 @@ class HaLogbookEntry extends LitElement {
.primary { .primary {
display: flex; display: flex;
align-items: center; /* Baseline-align so a wrapped multi-line value keeps the subject and
the trailing time on its first line, while a single-line entry
stays aligned with the text. */
align-items: baseline;
gap: var(--ha-space-2); gap: var(--ha-space-2);
color: var(--primary-text-color); color: var(--primary-text-color);
} }
@@ -876,9 +879,9 @@ class HaLogbookEntry extends LitElement {
.primary-text { .primary-text {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
white-space: nowrap; /* Wrap long entries onto multiple lines instead of truncating them to
overflow: hidden; a single line with an ellipsis. */
text-overflow: ellipsis; overflow-wrap: anywhere;
} }
.primary > .subject { .primary > .subject {
@@ -903,13 +906,12 @@ class HaLogbookEntry extends LitElement {
} }
.value { .value {
/* Don't shrink: the subject absorbs all truncation so a short state /* Don't shrink: the subject absorbs truncation so a short state stays
stays whole. max-width still caps a long one. */ whole. A long value wraps within its max-width instead of being cut
off. */
flex: 0 0 auto; flex: 0 0 auto;
max-width: 60%; max-width: 60%;
white-space: nowrap; overflow-wrap: anywhere;
overflow: hidden;
text-overflow: ellipsis;
text-align: right; text-align: right;
} }