Skip to content

Commit

Permalink
Change back link arrow measurements to use ems
Browse files Browse the repository at this point in the history
Currently the back link is measured in pixels. This prevents the arrow from changing size when text zooming is in use.

Changing this to em units allows the arrow to scale in size with the text.

em units have been calculated by taking the previous pixel value and dividing it by the text's pixel size (16). e.g. 7px ÷ 16px = 0.4375em.
  • Loading branch information
querkmachine committed Nov 10, 2022
1 parent fefdb30 commit f14076a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/govuk/components/back-link/_index.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@include govuk-exports("govuk/component/back-link") {

// Size of chevron (excluding border)
$chevron-size: 7px;
$chevron-size: .4375em;

// Size of chevron border
$chevron-border-width: 1px;
$chevron-border-width: .0625em;

// Colour of chevron
$chevron-border-colour: $govuk-secondary-text-colour;
Expand All @@ -21,7 +21,7 @@
margin-bottom: govuk-spacing(3);

// Allow space for the arrow
padding-left: 14px;
padding-left: .875em;
}

// Prepend left pointing chevron
Expand Down

0 comments on commit f14076a

Please sign in to comment.