From 2251ca3e25e6fea360e0b24c8efd94085418f048 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Tue, 26 Jan 2021 17:45:53 +0000 Subject: [PATCH] Popup restyling - Add max height and make scrollable - Move close button outside of popup to allow padding reduction and make room for possible scrollbar --- src/scss/leaflet/_popups.scss | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/scss/leaflet/_popups.scss b/src/scss/leaflet/_popups.scss index 449c078..489ad9c 100644 --- a/src/scss/leaflet/_popups.scss +++ b/src/scss/leaflet/_popups.scss @@ -21,11 +21,14 @@ } .leaflet-popup-content-wrapper { + max-height: 50vh; + display: flex; border-radius: $global-border-radius; } .leaflet-popup-content { - margin: 1.5rem; + margin: 1rem; + overflow: auto; word-break: break-word; } @@ -37,6 +40,20 @@ } } + @at-root { + .leaflet-container a.leaflet-popup-close-button { + background-color: $global-background; + border-radius: $global-border-radius; + width: 2rem; + height: 2rem; + top: -1rem; + right: -1rem; + text-align: center; + padding: 0; + line-height: 2rem; + } + } + @media print { display: none; }