mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-02 05:57:54 +00:00
reapply suggestions from code review
This commit is contained in:
parent
f0b0200932
commit
a763ad5bf1
@ -27,35 +27,36 @@ class HaEntityHumidifier extends HaEntityToggle {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResult {
|
static get styles(): CSSResult[] {
|
||||||
return css`
|
return [
|
||||||
:host {
|
super.styles,
|
||||||
display: flex;
|
css`
|
||||||
flex-direction: row;
|
:host {
|
||||||
justify-content: center;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: row;
|
||||||
}
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.target {
|
.target {
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.current {
|
.current {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.state-label {
|
.state-label {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unit {
|
.unit {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
direction: ltr;
|
direction: ltr;
|
||||||
}
|
}
|
||||||
|
`,
|
||||||
${super.styles}
|
];
|
||||||
`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,23 +138,28 @@ export class HaEntityToggle extends LitElement {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResult {
|
static get styles(): CSSResult[] {
|
||||||
return css`
|
return [
|
||||||
:host {
|
css`
|
||||||
white-space: nowrap;
|
:host {
|
||||||
min-width: 38px;
|
white-space: nowrap;
|
||||||
}
|
min-width: 38px;
|
||||||
ha-icon-button {
|
}
|
||||||
color: var(--ha-icon-button-inactive-color, var(--primary-text-color));
|
ha-icon-button {
|
||||||
transition: color 0.5s;
|
color: var(
|
||||||
}
|
--ha-icon-button-inactive-color,
|
||||||
ha-icon-button[state-active] {
|
var(--primary-text-color)
|
||||||
color: var(--ha-icon-button-active-color, var(--primary-color));
|
);
|
||||||
}
|
transition: color 0.5s;
|
||||||
ha-switch {
|
}
|
||||||
padding: 13px 5px;
|
ha-icon-button[state-active] {
|
||||||
}
|
color: var(--ha-icon-button-active-color, var(--primary-color));
|
||||||
`;
|
}
|
||||||
|
ha-switch {
|
||||||
|
padding: 13px 5px;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user