Skip to content

Commit

Permalink
#305: Hide giant SVG map for mobile.
Browse files Browse the repository at this point in the history
  • Loading branch information
komejo committed Nov 25, 2024
1 parent 6404b7f commit 18d0069
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/wri_maps/src/Plugin/Block/RegionMapBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 12 additions & 0 deletions themes/custom/ts_wrin/sass/components/_region-map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 18d0069

Please sign in to comment.