From 18d00696872bc166af6ccd8a837220f37bf0fd3c Mon Sep 17 00:00:00 2001 From: komejo Date: Mon, 25 Nov 2024 12:11:20 -0800 Subject: [PATCH] #305: Hide giant SVG map for mobile. --- modules/wri_maps/src/Plugin/Block/RegionMapBlock.php | 1 + .../custom/ts_wrin/sass/components/_region-map.scss | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/wri_maps/src/Plugin/Block/RegionMapBlock.php b/modules/wri_maps/src/Plugin/Block/RegionMapBlock.php index c555677b8..577d477de 100644 --- a/modules/wri_maps/src/Plugin/Block/RegionMapBlock.php +++ b/modules/wri_maps/src/Plugin/Block/RegionMapBlock.php @@ -147,6 +147,7 @@ public function build() { $attributes = new Attribute(); $attributes->addClass('wri-region-map'); + $attributes->addClass('hidden'); $attributes->addClass($map_style); $build['#attributes']['class'][] = $map_style; diff --git a/themes/custom/ts_wrin/sass/components/_region-map.scss b/themes/custom/ts_wrin/sass/components/_region-map.scss index e2157107e..809675562 100644 --- a/themes/custom/ts_wrin/sass/components/_region-map.scss +++ b/themes/custom/ts_wrin/sass/components/_region-map.scss @@ -16,6 +16,12 @@ /* line text up with border. */ margin-top: -0.5rem; + &.margin-bottom-md { + @media (max-width: rem(767)) { + margin-bottom: 0; + } + } + @include mq($ph) { @include center-columns($grid-columns, $grid-columns); } @@ -53,6 +59,12 @@ @include center-columns($grid-columns, $grid-columns); } + @include mq($md) { + &.hidden { + display: block; + } + } + svg > g.region, svg > g.international_office { outline: 0;