Give outline reset same precedence as for focus

The CSS that cancelled outline on focus events not
fired by the :focus-visible heuristic is being
overridden by the higher precedence of the outline
style for :focus, due to its use of !important.

This adds !important to the cancelling CSS. This
brings that block up to the same level as that for
:focus, meaning the :focus-visible styles will win
because they sit lower in the stylesheet.
This commit is contained in:
Tom Byers
2021-09-03 10:55:06 +01:00
parent 7c2f4adfd5
commit c1c80802e2

View File

@@ -32,7 +32,7 @@ $zoom-button-hover-colour: govuk-shade($zoom-button-colour, 10%);
// from other sources (like clicks on child elements).
&:focus:not(:focus-visible) {
box-shadow: none;
outline: none;
outline: none !important; // sass-lint:disable-line no-important
}
}