mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Ensure state is vertically centered in more-info (#12780)
This commit is contained in:
parent
5217f5c50c
commit
19d014307a
@ -155,7 +155,7 @@ class HuiGenericEntityRow extends LitElement {
|
||||
</div>`
|
||||
: html``}
|
||||
${this.catchInteraction ?? !DOMAINS_INPUT_ROW.includes(domain)
|
||||
? html` <div
|
||||
? html`<div
|
||||
class="text-content ${classMap({
|
||||
pointer,
|
||||
})}"
|
||||
@ -165,7 +165,7 @@ class HuiGenericEntityRow extends LitElement {
|
||||
hasDoubleClick: hasAction(this.config!.double_tap_action),
|
||||
})}
|
||||
>
|
||||
<slot></slot>
|
||||
<div class="state"><slot></slot></div>
|
||||
</div>`
|
||||
: html`<slot></slot>`}
|
||||
`;
|
||||
@ -230,6 +230,12 @@ class HuiGenericEntityRow extends LitElement {
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.state {
|
||||
text-align: right;
|
||||
}
|
||||
.state.rtl {
|
||||
text-align: left;
|
||||
}
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
@ -90,6 +90,8 @@ export class StateCardDisplay extends LitElement {
|
||||
text-align: right;
|
||||
flex: 0 0 auto;
|
||||
overflow-wrap: break-word;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
:host([rtl]) .state {
|
||||
margin-right: 16px;
|
||||
|
@ -24,8 +24,9 @@ class StateCardInputNumber extends mixinBehaviors(
|
||||
@apply --paper-font-body1;
|
||||
color: var(--primary-text-color);
|
||||
|
||||
text-align: right;
|
||||
line-height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
}
|
||||
.sliderstate {
|
||||
min-width: 45px;
|
||||
|
@ -23,8 +23,9 @@ class StateCardNumber extends mixinBehaviors(
|
||||
@apply --paper-font-body1;
|
||||
color: var(--primary-text-color);
|
||||
|
||||
text-align: right;
|
||||
line-height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
}
|
||||
.sliderstate {
|
||||
min-width: 45px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user