From bc22c206b9839b723076f3ad09b5ac84d28d3968 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 3 Nov 2021 19:50:12 +0000 Subject: [PATCH] Make images in key of map SVGs At the moment, the icons in the key of the map showing what each type of area drawn on the map means change colour in high contrast mode. This causes a mismatch between the areas on the map and the key. These changes remake the images in SVG to prevent the colours changing in high contrast modes. They also add a white background to the icons, to make sure they match the areas they refer to in the map. --- app/assets/stylesheets/components/area-list.scss | 13 +++---------- app/templates/views/broadcast/macros/area-map.html | 8 ++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/components/area-list.scss b/app/assets/stylesheets/components/area-list.scss index 798beacc2..86b7c068b 100644 --- a/app/assets/stylesheets/components/area-list.scss +++ b/app/assets/stylesheets/components/area-list.scss @@ -137,17 +137,10 @@ padding-left: govuk-spacing(8); line-height: govuk-spacing(7); - &:before { - content: ""; - display: block; + &__icon { position: absolute; - top: 3px; - left: govuk-spacing(1); - width: govuk-spacing(6); - height: govuk-spacing(6); - box-sizing: border-box; - margin-right: govuk-spacing(1); - transform: rotate(45deg); + left: -5px; + top: -7px; } &--certain { diff --git a/app/templates/views/broadcast/macros/area-map.html b/app/templates/views/broadcast/macros/area-map.html index 06c9c67b0..2ac5e82f7 100644 --- a/app/templates/views/broadcast/macros/area-map.html +++ b/app/templates/views/broadcast/macros/area-map.html @@ -1,6 +1,10 @@ {% macro map(broadcast_message) %}

+ An area of {{ (broadcast_message.simple_polygons.estimated_area)|round_to_significant_figures(1)|format_thousands }} square miles @@ -9,6 +13,10 @@ alert

+ An extra area of {{ (broadcast_message.simple_polygons_with_bleed.estimated_area - broadcast_message.simple_polygons.estimated_area)|round_to_significant_figures(1)|format_thousands }} square miles is