Change how line between map buttons is styled

There is a slight variance in how the line between
the map buttons is rendered when in forced-colors
mode and when not. This is not helped by it
alternately being rendered as either:
- a gap between buttons, showing the container
  colour
- a border-bottom on the first button

This attempts to flatten these styles so it is
only styled as a gap between the buttons so
changes to how its colour renders in different
modes can just be dealt with on the container.
This commit is contained in:
Tom Byers
2021-09-02 11:59:39 +01:00
parent 9c9e7a7c61
commit ee3e3c6c90

View File

@@ -49,6 +49,7 @@ $zoom-button-hover-colour: govuk-shade($zoom-button-colour, 10%);
// focus to mimic the 2-colour style GOVUK Frontend buttons and links have
.leaflet-bar {
border-radius: 0; // Remove rounded corners
background: #CCCCCC;
@media (forced-colors: active) {
background: canvasText;
@@ -59,6 +60,11 @@ $zoom-button-hover-colour: govuk-shade($zoom-button-colour, 10%);
// Outlines don't work because of the buttons being so close together so turn off
outline: none;
&:first-child {
border-bottom: none;
margin-bottom: 1px;
}
&:last-child {
// Allow it to contain the absolutely positioned divider bar we show between buttons
// when one is focused
@@ -93,11 +99,6 @@ $zoom-button-hover-colour: govuk-shade($zoom-button-colour, 10%);
background-color: $govuk-focus-colour;
}
// Retain the space between buttons now we're using the border in the focus style
&:first-child:focus {
margin-bottom: 1px;
}
// 3px divider between buttons as a version of the underline from the GOVUK focus style
&:last-child:focus:not(:active):not(:hover):before,
&:first-child:focus:not(:active):not(:hover) + a:before {