mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
more-info: make long states "multilined" (#17649)
* align info when a state is multiline * Enable multiline for long states * Update state-info.ts * Update state-card-display.ts
This commit is contained in:
parent
db9b16e9f5
commit
bfeee618f4
@ -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;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ export class StateCardDisplay extends LitElement {
|
||||
haStyle,
|
||||
css`
|
||||
state-info {
|
||||
flex: 1 1 auto;
|
||||
flex: 0 0 fit-content;
|
||||
min-width: 0;
|
||||
}
|
||||
.state {
|
||||
@ -78,8 +78,8 @@ 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 1 fit-content;
|
||||
word-break: break-word;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
direction: ltr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user