Fix #55: toggle switch disappearing

The icon seems to shrink to the available space (could be from the `ha-icon` component itself). Reserving the space for it prevents this.
This commit is contained in:
Nik Rolls 2019-08-02 13:49:04 +12:00 committed by Thomas Lovén
parent e3f585601f
commit 71d759a8a1

View File

@ -125,15 +125,17 @@ class FoldEntityRow extends LitElement {
static get styles() { static get styles() {
return css` return css`
#head { #head {
--toggle-icon-width: 40px;
display: flex; display: flex;
cursor: pointer; cursor: pointer;
align-items: center; align-items: center;
} }
#head entity-row-maker { #head entity-row-maker {
flex-grow: 1; flex-grow: 1;
max-width: calc(100% - var(--toggle-icon-width));
} }
#head ha-icon { #head ha-icon {
width: 40px; width: var(--toggle-icon-width);
cursor: pointer cursor: pointer
} }