Skip to content

Commit

Permalink
Use max() to enforce a minimum chevron size
Browse files Browse the repository at this point in the history
  • Loading branch information
querkmachine committed Nov 28, 2022
1 parent f09e9f4 commit f721773
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/govuk/components/back-link/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@

@supports (border-width: unquote("max(0px)")) {
border-width: unquote("max(#{$chevron-border-min-width}, #{$chevron-border-width}) max(#{$chevron-border-min-width}, #{$chevron-border-width})") 0 0;

// Ensure that the chevron never gets smaller than 16px
font-size: unquote("max(#{$font-size * 1px}, 1em)");
}

// Fall back to a less than sign for IE8
Expand Down
3 changes: 3 additions & 0 deletions src/govuk/components/breadcrumbs/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@

@supports (border-width: unquote("max(0px)")) {
border-width: unquote("max(#{$chevron-border-min-width}, #{$chevron-border-width}) max(#{$chevron-border-min-width}, #{$chevron-border-width})") 0 0;

// Ensure that the chevron never gets smaller than 16px
font-size: unquote("max(#{$font-size * 1px}, 1em)");
}

// Fall back to a greater than sign for IE8
Expand Down

0 comments on commit f721773

Please sign in to comment.