Improve state and name display on state-card-display (#18207)

This commit is contained in:
Paul Bottein 2023-10-13 10:38:19 +02:00 committed by GitHub
parent a10ec1f53c
commit 15c67fe299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -99,6 +99,10 @@ class StateInfo extends LitElement {
align-items: center;
}
state-badge {
flex: none;
}
.info {
margin-left: 8px;
display: flex;

View File

@ -70,19 +70,21 @@ export class StateCardDisplay extends LitElement {
haStyle,
css`
state-info {
flex: 0 0 fit-content;
min-width: 0;
flex: 0 1 fit-content;
min-width: 120px;
}
.state {
color: var(--primary-text-color);
margin-inline-start: 16px;
margin-inline-end: initial;
text-align: var(--float-end, right);
min-width: 50px;
flex: 0 1 fit-content;
word-break: break-word;
display: flex;
align-items: center;
direction: ltr;
justify-content: flex-end;
}
.state.has-unit_of_measurement {
white-space: nowrap;