Skip to content

Commit

Permalink
Improve state and name display on state-card-display (#18207)
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya authored Oct 13, 2023
1 parent a10ec1f commit 15c67fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/components/entity/state-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ class StateInfo extends LitElement {
align-items: center;
}
state-badge {
flex: none;
}
.info {
margin-left: 8px;
display: flex;
Expand Down
6 changes: 4 additions & 2 deletions src/state-summary/state-card-display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 15c67fe

Please sign in to comment.