mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Align background with tiles (#3858)
This commit is contained in:
parent
a02bf1fd48
commit
391b2dcf6a
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user