Skip to content

Commit

Permalink
Adjust Sass lines manually to maintain 120 line length
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Jun 14, 2023
1 parent fb0efb9 commit ccaf200
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@
border-color: $chevron-border-colour;

@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;
$border-width-eval: "max(#{$chevron-border-min-width}, #{$chevron-border-width})";

// Ensure that the chevron never gets smaller than 16px
border-width: unquote($border-width-eval) unquote($border-width-eval) 0 0;
font-size: unquote("max(#{$font-size * 1px}, 1em)");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@
border-color: $chevron-border-colour;

@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;
$border-width-eval: "max(#{$chevron-border-min-width}, #{$chevron-border-width})";

// Ensure that the chevron never gets smaller than 16px
border-width: unquote($border-width-eval) unquote($border-width-eval) 0 0;
font-size: unquote("max(#{$font-size * 1px}, 1em)");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,7 @@
// We use two box shadows, one that restores the original focus state [1]
// and another that then applies the hover state [2].
.govuk-checkboxes__item:hover .govuk-checkboxes__input:focus + .govuk-checkboxes__label::before {
box-shadow: 0 0 0 $govuk-focus-width $govuk-focus-colour,
// 1
0 0 0 $govuk-hover-width $govuk-hover-colour; // 2
box-shadow: 0 0 0 $govuk-focus-width $govuk-focus-colour /* 1 */, 0 0 0 $govuk-hover-width $govuk-hover-colour; /* 2 */
}

// For devices that explicitly don't support hover, don't provide a hover
Expand Down
15 changes: 8 additions & 7 deletions packages/govuk-frontend/src/govuk/components/hint/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
// This adjustment will not work in browsers that do not support :not().
// Users with these browsers will see the default size margin (5px larger).

.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl) + .govuk-hint {
margin-bottom: govuk-spacing(2);
.govuk-label {
&:not(#{&}--m):not(#{&}--l):not(#{&}--xl) + .govuk-hint {
margin-bottom: govuk-spacing(2);
}
}

// Reduces margin-bottom of hint when used after the default legend (no class)
Expand All @@ -31,11 +33,10 @@
// This adjustment will not work in browsers that do not support :not().
// Users with these browsers will see the default size margin (5px larger).

.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(
.govuk-fieldset__legend--xl
)
+ .govuk-hint {
margin-bottom: govuk-spacing(2);
.govuk-fieldset__legend {
&:not(#{&}--m):not(#{&}--l):not(#{&}--xl) + .govuk-hint {
margin-bottom: govuk-spacing(2);
}
}

// Reduces visual spacing of legend when there is a hint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,8 @@
// We use two box shadows, one that restores the original focus state [1]
// and another that then applies the hover state [2].
.govuk-radios__item:hover .govuk-radios__input:focus + .govuk-radios__label::before {
box-shadow: 0 0 0 $govuk-radios-focus-width $govuk-focus-colour,
// 1
0 0 0 $govuk-hover-width $govuk-hover-colour; // 2
box-shadow: 0 0 0 $govuk-radios-focus-width $govuk-focus-colour /* 1 */,
0 0 0 $govuk-hover-width $govuk-hover-colour; /* 2 */
}

// For devices that explicitly don't support hover, don't provide a hover
Expand Down

0 comments on commit ccaf200

Please sign in to comment.