Align background with tiles (#3858)

This commit is contained in:
Bram Kragten 2019-10-02 21:25:59 +02:00 committed by GitHub
parent a02bf1fd48
commit 391b2dcf6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@ import { LovelaceCard } from "../types";
import { EntityConfig } from "../entity-rows/types"; import { EntityConfig } from "../entity-rows/types";
import { processConfigEntities } from "../common/process-config-entities"; import { processConfigEntities } from "../common/process-config-entities";
import { MapCardConfig } from "./types"; import { MapCardConfig } from "./types";
import { classMap } from "lit-html/directives/class-map";
@customElement("hui-map-card") @customElement("hui-map-card")
class HuiMapCard extends LitElement implements LovelaceCard { class HuiMapCard extends LitElement implements LovelaceCard {
@ -138,7 +139,10 @@ class HuiMapCard extends LitElement implements LovelaceCard {
return html` return html`
<ha-card id="card" .header=${this._config.title}> <ha-card id="card" .header=${this._config.title}>
<div id="root"> <div id="root">
<div id="map"></div> <div
id="map"
class=${classMap({ dark: this._config.dark_mode === true })}
></div>
<paper-icon-button <paper-icon-button
@click=${this._fitMap} @click=${this._fitMap}
icon="hass:image-filter-center-focus" icon="hass:image-filter-center-focus"
@ -431,6 +435,11 @@ class HuiMapCard extends LitElement implements LovelaceCard {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #fafaf8;
}
#map.dark {
background: #090909;
} }
paper-icon-button { paper-icon-button {