Alt: more-info: make long states "multilined"

This commit is contained in:
Bram Kragten 2023-08-21 14:57:10 +02:00
parent ac3e858738
commit 0768bc3e27
2 changed files with 9 additions and 12 deletions

View File

@ -95,25 +95,21 @@ class StateInfo extends LitElement {
:host {
min-width: 120px;
white-space: nowrap;
}
state-badge {
float: left;
}
:host([rtl]) state-badge {
float: right;
display: flex;
align-items: center;
}
.info {
margin-left: 56px;
margin-left: 8px;
display: flex;
flex-direction: column;
justify-content: center;
height: 100%;
min-width: 0;
}
:host([rtl]) .info {
margin-right: 56px;
margin-right: 8px;
margin-left: 0;
text-align: right;
}

View File

@ -77,7 +77,7 @@ export class StateCardDisplay extends LitElement {
haStyle,
css`
state-info {
flex: 1 1 auto;
flex: 0 1 fit-content;
min-width: 0;
}
.state {
@ -85,9 +85,10 @@ export class StateCardDisplay extends LitElement {
margin-inline-start: 16px;
margin-inline-end: initial;
text-align: var(--float-end, right);
flex: 0 0 auto;
overflow-wrap: break-word;
flex: 0 2 fit-content;
word-break: break-word;
display: flex;
justify-content: flex-end;
align-items: center;
direction: ltr;
}