fix: keep compact trend icons aligned beside room values
This commit is contained in:
1 parent
cfc77787a0
commit
2bf5f4a60a
10 files changed
+238
-157
No files matched your search
@@ -27,10 +27,10 @@ class NfTrendButton extends LitElement {
|
||||
if (!loggedEntities(this.hass, this.ids).length) return nothing;
|
||||
const title = this.label ? `Trend anzeigen: ${this.label}` : "Trend anzeigen";
|
||||
return html`<button type="button" title=${title} aria-label=${title} aria-haspopup="dialog" ?disabled=${this.busy} @pointerdown=${(e: Event) => e.stopPropagation()} @click=${(e: Event) => void this.open(e)}>
|
||||
<svg width="15" height="15" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 2v15h15M5 13l4-5 4 2 4-6"/></svg>
|
||||
<svg width="12" height="12" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 2v15h15M5 13l4-5 4 2 4-6"/></svg>
|
||||
</button>${this.error ? html`<span role="alert">${this.error}</span>` : nothing}`;
|
||||
}
|
||||
static styles = css`:host{display:inline-flex;vertical-align:middle;margin-left:4px;font-weight:normal}button{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;padding:3px;border:1px solid currentColor;border-radius:6px;background:transparent;color:var(--nf-accent,#40c8ff);opacity:.8;cursor:pointer}button:hover,button:focus-visible{opacity:1;background:#40c8ff18}button:disabled{opacity:.4}span{font:12px system-ui;color:#ff9b9b;max-width:180px}`;
|
||||
static styles = css`:host{position:relative;display:inline-flex;flex:0 0 18px;width:18px;height:18px;vertical-align:middle;margin-left:3px;font-weight:normal;line-height:0}button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;padding:2px;border:0;border-radius:3px;background:transparent;color:var(--nf-accent,#40c8ff);opacity:.8;cursor:pointer}svg{display:block;flex-shrink:0}button:hover,button:focus-visible{opacity:1;background:#40c8ff18}button:focus-visible{outline:1px solid currentColor;outline-offset:1px}button:disabled{opacity:.4}span{position:absolute;right:0;top:22px;z-index:10;box-sizing:border-box;width:200px;padding:8px;border:1px solid #ff9b9b50;border-radius:6px;background:var(--nf-chrome-solid,#1c1c1c);font:12px/1.4 system-ui;color:#ff9b9b;white-space:normal}`;
|
||||
}
|
||||
if (!customElements.get("nf-trend-button")) customElements.define("nf-trend-button", NfTrendButton);
|
||||
|
||||
|
||||
Reference in new issue
Block a user