Skip to content

Commit a2edbce

Browse files
authored
Merge pull request #4160 from alphagov/govuk-frontend-upgrade-aug-2024
Upgrade to govuk-frontend v5.5.0
2 parents 0bf514d + def7193 commit a2edbce

File tree

13 files changed

+54
-44
lines changed

13 files changed

+54
-44
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
useful summary for people upgrading their application, not a replication
88
of the commit log.
99

10+
## Unreleased
11+
12+
* **BREAKING:** Upgrade to govuk-frontend v5.5.0 ([PR #4115](https://github.com/alphagov/govuk_publishing_components/pull/4160))
13+
1014
## 42.1.0
1115

1216
* Ensure that organisation logos always print ([PR #4162](https://github.com/alphagov/govuk_publishing_components/pull/4162))

app/assets/stylesheets/govuk_publishing_components/_all_components.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@import "govuk_publishing_components/component_support";
66

77
// Include all govuk frontend components
8-
@import "govuk/components/all";
8+
@import "govuk/components/index";
99

1010
// components
1111
@import "components/accordion";

app/assets/stylesheets/govuk_publishing_components/component_support.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// This file should be included in an application prior to specific components
22
// It provides supporting gem component helpers and mixins
33
// and everything else from govuk-frontend not included in govuk_frontend_support
4-
@import "govuk/core/all";
5-
@import "govuk/objects/all";
6-
@import "govuk/utilities/all";
7-
@import "govuk/overrides/all";
4+
@import "govuk/core/index";
5+
@import "govuk/objects/index";
6+
@import "govuk/utilities/index";
7+
@import "govuk/overrides/index";
88

99
@import "govuk_publishing_components/components/helpers/brand-colours";
1010
@import "govuk_publishing_components/components/helpers/link";

app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
}
4242

4343
.govuk-breadcrumbs__list-item::before {
44-
top: 18px;
44+
top: 20px;
4545
}
4646

4747
.govuk-breadcrumbs__link::after {

app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
table.financial-data {
7070
.numeric {
7171
text-align: right;
72-
@include govuk-font(16, $weight: regular, $tabular: true);
72+
@include govuk-font-tabular-numbers;
73+
@include govuk-font(16, $weight: regular);
7374
}
7475

7576
// make all elements inside thead look the same
@@ -82,10 +83,11 @@
8283

8384
thead th,
8485
thead td {
85-
@include govuk-font(16, $weight: bold, $tabular: true);
86+
@include govuk-font-tabular-numbers;
87+
@include govuk-font(16, $weight: bold);
8688

8789
&.numeric {
88-
@include govuk-font(16, $weight: bold, $tabular: true);
90+
@include govuk-font(16, $weight: bold);
8991
}
9092
}
9193

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
// uses govuk/all
1+
// uses govuk/index

app/assets/stylesheets/govuk_publishing_components/components/_search.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ $large-input-size: 50px;
7373
.gem-c-search__input[type="search"] { // overly specific to prevent some overrides from outside
7474
margin: 0;
7575
width: 100%;
76-
height: govuk-em(40, 16);
77-
padding: govuk-em(6, 16);
76+
height: govuk-em(40, 19);
77+
padding: govuk-em(6, 19);
7878
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
7979
background: govuk-colour("white");
8080
border-radius: 0; // otherwise iphones apply an automatic border radius
@@ -84,11 +84,6 @@ $large-input-size: 50px;
8484
appearance: none;
8585
@include govuk-font($size: 19, $line-height: calc(28 / 19));
8686

87-
@include govuk-media-query($from: tablet) {
88-
height: govuk-em(40, 19);
89-
padding: govuk-em(6, 19);
90-
}
91-
9287
// the .focus class is added by JS and ensures that the input remains above the label once clicked/filled in
9388
&:focus,
9489
&.focus {

app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// element as required by the heading component, adds 2KB to the CSS
2121
&.brand__border-color,
2222
.brand__border-color {
23-
border-color: govuk-organisation-colour($organisation, $websafe: false);
23+
border-color: govuk-organisation-colour($organisation, $contrast-safe: false);
2424
}
2525
}
2626
}
@@ -49,7 +49,7 @@
4949

5050
&.brand__border-color,
5151
.brand__border-color {
52-
border-color: govuk-organisation-colour("office-of-the-leader-of-the-house-of-commons", $websafe: false);
52+
border-color: govuk-organisation-colour("office-of-the-leader-of-the-house-of-commons", $contrast-safe: false);
5353
}
5454
}
5555
// colours for the prime ministers office are not included in the toolkit
@@ -120,3 +120,25 @@
120120
border-color: #00625e;
121121
}
122122
}
123+
124+
.brand--department-for-business-and-trade {
125+
.brand__color {
126+
color: #cf102d;
127+
128+
&:link,
129+
&:visited,
130+
&:active {
131+
color: #cf102d;
132+
}
133+
134+
&:hover,
135+
&:focus {
136+
color: $govuk-focus-text-colour;
137+
}
138+
}
139+
140+
&.brand__border-color,
141+
.brand__border-color {
142+
border-color: #cf102d;
143+
}
144+
}

app/assets/stylesheets/govuk_publishing_components/components/helpers/_govuk-frontend-settings.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313

1414
$govuk-image-url-function: "app-image-url";
1515
$govuk-font-url-function: "app-font-url";
16+
$govuk-new-typography-scale: true;
17+
$govuk-new-organisation-colours: true;

app/views/govuk_publishing_components/components/_breadcrumbs.html.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515

1616
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
1717
component_helper.add_class(classes.join(" "))
18+
component_helper.add_aria_attribute({ label: "Breadcrumb" })
1819
component_helper.add_data_attribute({ module: "ga4-link-tracker" })
1920
%>
2021

2122
<script type="application/ld+json">
2223
<%= raw JSON.pretty_generate(breadcrumb_presenter.structured_data) %>
2324
</script>
2425

25-
<%= tag.div(**component_helper.all_attributes) do %>
26+
<%= tag.nav(**component_helper.all_attributes) do %>
2627
<ol class="govuk-breadcrumbs__list">
2728
<% breadcrumbs.each_with_index do |crumb, index| %>
2829
<% breadcrumb = GovukPublishingComponents::Presenters::Breadcrumb.new(crumb, index) %>

0 commit comments

Comments
 (0)