diff --git a/src/App.css b/src/App.css index 4ca4446..6e2784c 100644 --- a/src/App.css +++ b/src/App.css @@ -28,20 +28,10 @@ a { position: absolute; top: 0; left: 0; - z-index: 2; } .FilterPane--hidden { - z-index: -1; - } - - .mapboxgl-map { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100dvh; - z-index: 1; + display: none; } } diff --git a/src/components/Attribution.js b/src/components/Attribution.js index 84dfcb2..8364268 100644 --- a/src/components/Attribution.js +++ b/src/components/Attribution.js @@ -36,6 +36,10 @@ const Attribution = () => { {" "} by Adrien Coquet + {/* + Colors c/o Kevin Blake + https://github.com/kevinsblake/NatParksPalettes + */} ); }; diff --git a/src/components/Map.css b/src/components/Map.css index d98f574..428a9c8 100644 --- a/src/components/Map.css +++ b/src/components/Map.css @@ -1,3 +1,7 @@ +.Map { + width: 100%; +} + .Map-circle { cursor: pointer; width: 10px; @@ -25,14 +29,35 @@ border-radius: 50%; top: 1rem; left: 1rem; - z-index: 3; + z-index: 2; background: #faf3ce; justify-content: center; align-items: center; cursor: pointer; } +.mapboxgl-map { + width: 100%; + height: 100dvh; +} + @media (max-width: 700px) { + .Map { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100dvh; + } + + .Map--hidden { + /* + If you use `display: none` instead, then the Mapbox GL JS map will not + render at full height + */ + visibility: hidden; + } + .Map-Logo-Backing--active { display: flex; } diff --git a/src/components/Map.js b/src/components/Map.js index 3a171cc..f5e6bff 100644 --- a/src/components/Map.js +++ b/src/components/Map.js @@ -32,10 +32,8 @@ class Map extends Component { }; render() { - console.log(this.props); - return ( - <> +
} - +
); } }