Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/mapml-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export class MapViewer extends HTMLElement {
let mapDefaultCSS = document.createElement('style');
mapDefaultCSS.innerHTML =
`:host {` +
`all: initial;` + // Reset properties inheritable from html/body, as some inherited styles may cause unexpected issues with the map element's components (https://github.com/Maps4HTML/Web-Map-Custom-Element/issues/140).
`contain: content;` + // Contain layout and paint calculations within the map element.
`display: inline-block;` + // This together with dimension properties is required so that Leaflet isn't working with a height=0 box by default.
`overflow: hidden;` + // Make the map element behave and look more like a native element.
Expand Down
1 change: 1 addition & 0 deletions src/web-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export class WebMap extends HTMLMapElement {
let mapDefaultCSS = document.createElement('style');
mapDefaultCSS.innerHTML =
`map[is="web-map"] {` +
`all: initial;` + // Reset properties inheritable from html/body, as some inherited styles may cause unexpected issues with the map element's components (https://github.com/Maps4HTML/Web-Map-Custom-Element/issues/140).
`contain: content;` + // Contain layout and paint calculations within the map element.
`display: inline-block;` + // This together with dimension properties is required so that Leaflet isn't working with a height=0 box by default.
`overflow: hidden;` + // Make the map element behave and look more like a native element.
Expand Down