Skip to content

Commit

Permalink
Merge pull request #3864 from alphagov/fix-sass-deprecation-warnings
Browse files Browse the repository at this point in the history
Fix some Sass deprecation warnings
  • Loading branch information
jon-kirwan authored Feb 8, 2024
2 parents 141c871 + 6d5e52b commit b6c355f
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

* Move the skip link after the cookie banner ([PR #3863](https://github.com/alphagov/govuk_publishing_components/pull/3863))
* Update border colours on email/print buttons for greater contrast ([PR #3855](https://github.com/alphagov/govuk_publishing_components/pull/3855))
* Fix some Sass deprecation warnings ([PR #3864](https://github.com/alphagov/govuk_publishing_components/pull/3864))

## 37.3.0

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/component_guide/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ $gem-guide-border-width: 1px;
h3,
h4 {
margin-top: 0;
margin-bottom: $govuk-gutter / 2;
margin-bottom: calc($govuk-gutter / 2);
}

h3 a {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
list-style-type: none;

@include govuk-media-query($from: tablet) {
padding-top: govuk-spacing(6) / 4;
padding-top: calc(govuk-spacing(6) / 4);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
@include govuk-font($size: false);
font-size: 16px;
font-size: govuk-px-to-rem(16px);
margin: 0 0 (govuk-spacing(3) / 2);
margin: 0 0 calc(govuk-spacing(3) / 2);
color: govuk-colour("dark-grey", $legacy: "grey-1");

@include govuk-media-query($from: tablet) {
Expand All @@ -196,15 +196,15 @@

.gem-c-image-card__description {
@include govuk-font($size: 19);
padding-top: (govuk-spacing(3) / 2);
padding-top: calc(govuk-spacing(3) / 2);
word-wrap: break-word;
}

.gem-c-image-card__list {
@include govuk-font($size: 19);
position: relative;
z-index: 2;
padding: (govuk-spacing(3) / 2) 0 0 0;
padding: calc(govuk-spacing(3) / 2) 0 0 0;
margin: 0;
list-style: none;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $govuk-modal-wide-breakpoint: $govuk-page-width + $govuk-modal-margin * 2 + $gov
bottom: inherit;
left: inherit;
width: auto;
max-width: $govuk-page-width * 2 / 3;
max-width: calc($govuk-page-width * (2 / 3));
height: auto;
margin: $govuk-modal-margin auto;
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ $large-input-size: 50px;

@mixin icon-positioning($container-size) {
$icon-dimension: 20px;
$icon-position: ($container-size - $icon-dimension) / 2;
$icon-position: calc(($container-size - $icon-dimension) / 2);

display: block;
pointer-events: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $share-button-height: 30px;
padding-left: ($share-button-width + govuk-spacing(2));
padding-right: govuk-spacing(2);
margin-bottom: govuk-spacing(2);
font-size: $share-button-height / 2;
font-size: calc($share-button-height / 2);
}

.gem-c-share-links__link {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

.gem-c-step-nav-related__pretitle {
margin-bottom: govuk-spacing(6) / 4;
margin-bottom: calc(govuk-spacing(6) / 4);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
z-index: 6;
bottom: 0;
left: 0;
margin-left: $number-circle-size / 4;
width: $number-circle-size / 2;
margin-left: calc($number-circle-size / 4);
width: calc($number-circle-size / 2);
height: 0;
border-bottom: solid $stroke-width govuk-colour("mid-grey", $legacy: "grey-2");
}
Expand All @@ -278,8 +278,8 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
.gem-c-step-nav--large & {
@include govuk-media-query($from: tablet) {
&::before {
margin-left: $number-circle-size-large / 4;
width: $number-circle-size-large / 2;
margin-left: calc($number-circle-size-large / 4);
width: calc($number-circle-size-large / 2);
}

&::after {
Expand Down Expand Up @@ -508,9 +508,9 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
z-index: 5;
top: .6em; // position the dot to align with the first row of text in the link
left: -(govuk-spacing(6) + govuk-spacing(3));
margin-top: -($stroke-width / 2);
margin-left: ($number-circle-size / 2);
width: $number-circle-size / 2;
margin-top: - calc($stroke-width / 2);
margin-left: calc($number-circle-size / 2);
width: calc($number-circle-size / 2);
height: $stroke-width;
background: govuk-colour("black");
}
Expand All @@ -519,7 +519,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
@include govuk-media-query($from: tablet) {
&::before {
left: -(govuk-spacing(9));
margin-left: ($number-circle-size-large / 2);
margin-left: calc($number-circle-size-large / 2);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $table-header-background-colour: govuk-colour("light-grey", $legacy: "grey-3");
$sort-link-active-colour: govuk-colour("white");
$sort-link-arrow-size: 14px;
$sort-link-arrow-size-small: 8px;
$sort-link-arrow-spacing: $sort-link-arrow-size / 2;
$sort-link-arrow-spacing: calc($sort-link-arrow-size / 2);
$table-row-hover-background-colour: rgba(43, 140, 196, .2);
$table-row-even-background-colour: govuk-colour("light-grey", $legacy: "grey-4");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
padding-left: $icon-size;

// Center the icon around the baseline
padding-top: ($icon-size - $line-height-mobile) / 2;
padding-top: calc(($icon-size - $line-height-mobile) / 2);

@include govuk-media-query($from: tablet) {
padding-top: ($icon-size - $line-height-tablet) / 2;
padding-top: calc(($icon-size - $line-height-tablet) / 2);
}

p {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@include govuk-font($size: 16);

$gutter-two-thirds: $govuk-gutter - ($govuk-gutter / 3);
$gutter-two-thirds: $govuk-gutter - calc($govuk-gutter / 3);

ol,
ul,
Expand Down

0 comments on commit b6c355f

Please sign in to comment.