From 0f449087e8479cce4f36011b19dfc67795a0de3d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 29 Apr 2019 14:59:50 +0100 Subject: [PATCH] Increase hit area of back link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The GOV.UK Design System back link component is sized (roughly) to the contain the text and icon. Presumably this is so it’s safe to use in various contexts. Since we have control over the context is which it’s used, we can get away with making the click area larger – in accordance with Fitt’s law – without risking overlapping other page elements. --- .../components/vendor/govuk-back-link.scss | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/assets/stylesheets/components/vendor/govuk-back-link.scss b/app/assets/stylesheets/components/vendor/govuk-back-link.scss index 6e89b55a4..f76ebdc63 100644 --- a/app/assets/stylesheets/components/vendor/govuk-back-link.scss +++ b/app/assets/stylesheets/components/vendor/govuk-back-link.scss @@ -32,4 +32,22 @@ left: 0; margin: auto; } + + &:after { + content: ""; + position: absolute; + top: -$gutter-half; + left: -3px; + width: 100%; + height: 100%; + border-style: solid; + border-width: $gutter-half $gutter $gutter-half 3px; + border-color: transparent; + } + + &:focus { + &:after { + border-color: $yellow + } + } }