diff --git a/src/mapml-viewer.js b/src/mapml-viewer.js index 2557901a1..ae5168ece 100644 --- a/src/mapml-viewer.js +++ b/src/mapml-viewer.js @@ -124,6 +124,9 @@ export class MapViewer extends HTMLElement { `:host([frameborder="0"]) {` + `border-width: 0;` + `}` + + `:host([hidden]) {` + + `display: none!important;` + + `}` + `:host .mapml-contextmenu,` + `:host .leaflet-control-container {` + `visibility: hidden!important;` + // Visibility hack to improve percieved performance (mitigate FOUC) – visibility is unset in mapml.css! (https://github.com/Maps4HTML/Web-Map-Custom-Element/issues/154). diff --git a/src/web-map.js b/src/web-map.js index 886b0c339..7d6cf6c2d 100644 --- a/src/web-map.js +++ b/src/web-map.js @@ -133,6 +133,9 @@ export class WebMap extends HTMLMapElement { `[is="web-map"][frameborder="0"] {` + `border-width: 0;` + `}` + + `[is="web-map"][hidden] {` + + `display: none!important;` + + `}` + `[is="web-map"] .mapml-web-map {` + `display: contents;` + // This div doesn't have to participate in layout by generating its own box. `}`;