Update dependency govuk-frontend to v5.13.0 - autoclosed - #1041
Closed
renovate[bot] wants to merge 1 commit into
Closed
Update dependency govuk-frontend to v5.13.0 - autoclosed#1041renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
13 times, most recently
from
March 5, 2025 13:48
bd2b24c to
bcdcb54
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
March 11, 2025 15:41
bcdcb54 to
60d83b6
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
3 times, most recently
from
March 18, 2025 10:18
f0c181a to
6c3a5dc
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
8 times, most recently
from
March 25, 2025 21:28
611ceec to
0a8bb53
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
April 8, 2025 15:08
0a8bb53 to
884547f
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
April 16, 2025 11:28
884547f to
fa5584a
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
2 times, most recently
from
May 22, 2025 14:37
228c7bf to
1e1999b
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
2 times, most recently
from
May 23, 2025 14:10
af4620e to
a7c18be
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
June 5, 2025 13:06
a7c18be to
3ef89d9
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
July 1, 2025 18:34
3ef89d9 to
243f6da
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
July 7, 2025 15:16
243f6da to
40e185d
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
July 24, 2025 18:27
40e185d to
a8adc84
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
August 8, 2025 13:31
a8adc84 to
b19cb3b
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
August 31, 2025 11:56
b19cb3b to
d8039e5
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
2 times, most recently
from
September 8, 2025 10:22
b70bfea to
db0f03b
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
4 times, most recently
from
September 18, 2025 14:26
7e94512 to
32c5b4b
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
2 times, most recently
from
September 29, 2025 15:13
6acdc5f to
d59b17f
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
2 times, most recently
from
October 17, 2025 11:43
7b834d3 to
d0322d8
Compare
renovate
Bot
force-pushed
the
renovate/govuk-frontend-5.x
branch
from
October 28, 2025 16:24
d0322d8 to
dc8d3d4
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
5.4.1->5.13.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
alphagov/govuk-frontend (govuk-frontend)
v5.13.0Compare Source
New features
Use Sass functions to create custom media queries
We've added new Sass functions to help write
@mediaand@containerqueries, mixins and functions whilst still using GOV.UK Frontend's$govuk-breakpointssetting.You can create
min-widthandmax-widthqueries using thegovuk-from-breakpointandgovuk-until-breakpointfunctions:You can get the configured value of a breakpoint using
govuk-breakpoint-value:Each of these functions allows for passing a custom breakpoint map. This can be useful if a particular component needs to change layout at different dimensions to the rest of the site and for authoring
@containerqueries.We've rewritten the internals of the
govuk-media-querymixin to make use of these new functions. The rewritten mixin should work identically and return the same CSS as the previous version, but you may want to make sure that your existing media queries work as expected.We made these changes in the following pull requests:
govuk-media-query, remove dependency onsass-mq.Recommended changes
Rename ellipses HTML class in pagination to ellipsis
Within the pagination component, change the
govuk-pagination__item--ellipsesclass togovuk-pagination__item--ellipsis.We introduced this change in pull request #5882: Rename ellipses html class to ellipsis. Thanks to @frankieroberto for making this change.
Fixes
v5.12.0Compare Source
New features
Use the
govuk-focused-form-inputmixin to style focus states for form inputsYou can now use the
govuk-focused-form-inputmixin to style the focus state in your own form input components.Thanks to @patrickpatrickpatrick for suggesting this change.
Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
Intl.PluralRulesand remove fallback logicv5.11.2Compare Source
Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
createAll()orinitAll()– thanks to @colinrotherham for reporting and fixing this issuev5.11.1Compare Source
Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
govuk-shadeandgovuk-tintv5.11.0Compare Source
New features
The Service navigation component no longer uses a menu on mobile for a single link
If you're using our Nunjucks macros, the Service navigation component will no longer collapse the navigation behind a Menu toggle on mobile if there's only one navigation link.
You can control this behaviour using the new
collapseNavigationOnMobileNunjucks option.If you're not using our Nunjucks macros, you can recreate this behaviour by omitting the Menu
<button>element when there is only one navigation item.We made this change in pull request #6016: Don’t use menu for service nav with a single link.
Add inverse styling to Service navigation for use on product pages
If you enable the GOV.UK rebrand, you can now add the
govuk-service-navigation--inverseclass to the Service navigation component to use white links on a blue background.This allows the rebranded GOV.UK header and Service navigation components to flow seamlessly with any following components that have a blue background, as is common on GOV.UK Digital Service Platform pages.
We made this change in pull request #6015: Add inverse variant to Service navigation component.
You'll now see a deprecation warning if you're using LibSass
If you're using the deprecated LibSass library, you'll now see this deprecation warning when compiling your Sass:
We made this change in pull request #5993: Warn if Sass is compiled using libsass.
Deprecated features
Replace references to CSS custom properties for breakpoints
We've renamed the CSS custom properties for breakpoints to simplify the prefix from
--govuk-frontendto just--govuk.You can still use the old names, but we'll remove them in the next breaking release (GOV.UK Frontend v6.0.0).
We made this change in pull request #6014: Simplify prefix for breakpoint custom properties.
Fixes
We've updated the SVG (Scalable Vector Graphics) file of the GOV.UK logo to fix some imperfections visible at high zoom levels. Thanks to @matteason for reporting this.
If you're using the
govukHeaderNunjucks macro, you do not need to update anything. If you're not using the macro, replace the logo's SVG code in the header with the following code:We made this change in pull request #6036: Fix some wordmark artifacts at high zoom levels.
We've also made fixes to GOV.UK Frontend in the following pull requests:
v5.10.2Compare Source
To install this version with npm, run
npm install govuk-frontend@5.10.2. You can also find more information about how to stay up to date in our documentation.Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
v5.10.1Compare Source
To install this version with npm, run
npm install govuk-frontend@5.10.1. You can also find more information about how to stay up to date in our documentation.Brand refresh fixes
We’ve fixed the colour of the dot in the refreshed GOV.UK logo as well as made some fixes to the implementation of the brand refresh in GOV.UK Frontend. We did this in the following pull requests:
Other fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
govuk-font-sizemixin outputting the wrong font properties for size 14 text when compiled using libsass, thanks to @oscarduignan for reporting this issuev5.10.0Compare Source
To install this version with npm, run
npm install govuk-frontend@5.10.0. You can also find more information about how to stay up to date in our documentation.New features
Prepare to use the refreshed GOV.UK brand
We’ve added features to GOV.UK Frontend to implement GOV.UK’s refreshed brand. Ahead of the brand’s go-live date of 25 June 2025, prepare your service by updating its code. You’ll then need to deploy the changes to production on 25 June 2025 or as soon after this date as possible.
These changes affect these components:
These changes also affect the
theme-colormetadata and assets, including:manifest.jsonTo help you get ready, we've published this release, which includes several features to make the necessary updates across your service:
govuk-template--rebrandedHTML class to apply updated styles from our CSSYou’ll need to serve the new assets in your service. What you’ll need to do after that depends on the code in your service and if you use GOV.UK Frontend:
Add the brand refresh assets to your project
GOV.UK Frontend provides updated assets for the icons, Open Graph image and
manifest.jsonto reflect the refreshed brand. These assets are available in thedist/govuk/assets/rebrandfolder of the package.If you serve the assets from the GOV.UK Frontend assets folder, make sure the assets inside the
dist/govuk/assets/rebrandfolder are served correctly at<YOUR-SITE-URL>/assets/rebrand.If you copy the font and image files into your application, you’ll need to copy the
dist/govuk/assets/rebrandfolder to<YOUR-APP>/assets/rebrand. If you use an automated task to copy the files, you may need to update your task to automatically copy our new folder.Use the refreshed GOV.UK brand if you're using our Nunjucks page template
If you can edit your Nunjucks environment, you can add a
govukRebrandglobal value to your environment, with a value oftrue. This global value makes the affected components use new styles for the brand refresh and display updated assets (such as the refreshed logo in the GOV.UK header component and the crown in the GOV.UK footer component).If you cannot edit your Nunjucks environment, you can use our new
govukRebrand'variable' option from our page template, which makes:headerandfooterblocks display updated assets (such as the refreshed logo in the GOV.UK header component and the crown in the GOV.UK footer component)If you’ve overridden the
headerorfooterblock, see the next sections to make sure your header or footer displays the updated assets.Use
setto assign thegovukRebrandvariable a value oftrueand enable the new styles:Do not place this snippet between any
blockandendblocklines. Place it on a separate line.If you’ve previously customised the template's
assetPath,assetUrloropengraphImageUrloptions, you may need to update these to point to the location of the updated icons, Open Graph image andmanifest.json.Use the refreshed GOV.UK brand if you're using Nunjucks macro (without the page template)
You can do this by adding the updated styles for these components:
Add the
govuk-template--rebrandedclass to the<html>element of your page to apply the updated styles to all affected components.Enable the refreshed GOV.UK logo by adding
rebrand: trueto the GOV.UK header component configuration.Enable the GOV.UK crown in the GOV.UK footer component by adding
rebrand: trueto the component configuration.Update the links to the assets. Change the HTML inside your
<head>element to use the new file locations (from/assets/to/assets/rebrand/) andtheme-color. Replace any existing definitions.Use the refreshed GOV.UK brand if you're not using Nunjucks
You also can use the refreshed GOV.UK brand if you’re not using Nunjucks.
Start by adding the
govuk-template--rebrandedclass to the<html>element of your page to apply the updated styles to all affected components.As you make changes, use the examples on our website to check your updates:
Replace the
<svg>element in your header with the following SVG code to display the refreshed GOV.UK logo:Update the HTML inside your
<footer>element by adding the following SVG code at the start of the<div>with thegovuk-width-containerclass.Update the links to the assets. Change the HTML inside your
<head>element to use the new file locations (from/assets/to/assets/rebrand/) andtheme-color. Replace any existing definitions.Use the refreshed GOV.UK brand in your Prototype Kit prototype
If you use GOV.UK Frontend in a Prototype Kit prototype, enable the refreshed brand by adding the following to your prototype's
app/config.json:Pull requests
These changes were made in the following pull requests:
govukRebrandNunjucks globalOther changes
The GOV.UK footer component top border is now consistent with GOV.UK
We've updated the border of the GOV.UK footer component so it matches the border used on the GOV.UK website. This will provide a more consistent experience for users as they navigate from the GOV.UK website and into services.
This change was introduced in pull request #5792: Update footer top border to be consistent with GOV.UK.
The Royal Arms in the GOV.UK footer component now matches the text colour
We've updated the colour of the Royal Arms in the GOV.UK footer so it matches the text colour in browsers supporting the
mask-imageCSS property.This improves its accessibility and reduces the number of colours used in the footer.
This change was introduced in pull request #5801: Update colour of the copyright logo using CSS
Deprecated features
Deprecation of
$govuk-canvas-background-colourThe responsibilities of the
$govuk-canvas-background-colourvariable were unclear, as the variable name and the description in the Sass API did not reflect how we were using it.We’re replacing it with the
$govuk-template-background-colourvariable, which you can use to get the background colour of the<html>elements and of elements that need to match for visual continuity, such as the GOV.UK footer and Cookie banner components.If you were using
$govuk-canvas-background-colourto match the background colour of the<html>element, use$govuk-template-background-colourinstead.If you were using
$govuk-canvas-background-colourto set the background colour in your custom styling tolight-grey, usegovuk-colour('light-grey')instead.This change was introduced in pull request #5790: Deprecate
$govuk-canvas-background-colour, use$govuk-template-background-colourinsteadFixes
We've made fixes to GOV.UK Frontend in the following pull requests:
v5.9.0Compare Source
To install this version with npm, run
npm install govuk-frontend@5.9.0. You can also find more information about how to stay up to date in our documentation.New features
Use our improved File upload component
We've added a JavaScript enhancement to the File upload component which:
This improvement is opt-in, as it's a substantial visual change which risks shifting other content on the page.
To enable this improvement for your users, you'll first need to update the markup of your File upload component:
if you use our Nunjucks macro, using the new
javascriptoption ofgovukFileUploadif you're using HTML, wrapping the
<input type="file">of the File upload markup in a<div class="govuk-drop-zone" data-module="govuk-file-upload">If you're importing components individually in your JavaScript, which we recommend for better performance, you'll then need to import and initialise the new
FileUploadcomponent.This change was introduced in pull request #5305: Add progressively enhanced File Upload component
Form control components now have default
idattributesIf you're using the included Nunjucks macros, these components now automatically use the value of the name parameter for the
idparameter:You’ll only have to provide the
nameparameters if they both have the same value.The Date input component still requires an
idattribute.This change was introduced in pull request #5658: Update form control components to set a default id based on name.
Deprecated features
Move service name and navigation links from the GOV.UK header to Service navigation component
We’ve deprecated the option to show a service name in the GOV.UK header component. This option will be removed from the GOV.UK header in the next breaking release of GOV.UK Frontend.
We recommend updating your service to use the Service navigation component as soon as possible.
Previously, we deprecated the option to show navigation links in the GOV.UK header component. This option will be removed as well, along with the GOV.UK header JavaScript component, since its only purpose was to make the navigation links responsive.
This change was introduced in pull request #5721: Add deprecation field and deprecate header navigation.
Migrate to the new organisation colour palette
The legacy organisation colour palette has been deprecated and will be removed in the next major version.
If your service uses the organisation colour palette, make sure that things still look as expected with the
$govuk-new-organisation-coloursfeature flag enabled.This change was introduced in pull request #5627: Deprecate legacy organisation colour palette.
Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
v5.8.0Compare Source
To install this version with npm, run
npm install govuk-frontend@5.8.0. You can also find more information about how to stay up to date in our documentation.New features
Use our base configurable component to build your own configurable component
We've added a
ConfigurableComponentclass to help you build your own configurable components. It extends ourComponentclass and allows you to focus on your components' specific features by handling these shared behaviours across components:this.$rootthis.configWe introduced this change in:
Deprecated features
Importing Sass using
govuk/allYou'll see a warning when compiling your Sass if you import all of GOV.UK Frontend's styling using
govuk/all. Importing using theallfile is deprecated, and we’ll remove it in the next major release.In your import statements, use a trailing
/indexrather than/allto load GOV.UK Frontend's files:@import "govuk/index";instead of@import "govuk/all";You do not need
/indexat the end of each import path if you’re using Dart Sass.This change was introduced in pull request #5518: Deprecate
govuk/all.scssand only referencegovuk/index.scssinternally.Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
v5.7.1Compare Source
To install this version with npm, run
npm install govuk-frontend@5.7.1. You can also find more information about how to stay up to date in our documentation.Recommended changes
Stop setting a
valuefor File upload componentsThe File upload component currently supports a
valueparameter, which populates thevalueHTML attribute of the input.However, since no modern browser supports passing a
valueto a file input, we've made the decision to remove this parameter. It has been deprecated and will be removed in a future version of GOV.UK Frontend.We introduced this change in pull request #5330: Deprecate File upload component's
valueparameter.Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
v5.7.0Compare Source
To install this version with npm, run
npm install govuk-frontend@5.7.0. You can also find more information about how to stay up to date in our documentation.New features
The Royal Arms has been updated
The Royal Arms in the GOV.UK footer has been updated to reflect the version introduced by King Charles III.
If your service does not use the image directly from the Frontend package, you should ensure the new image is being copied to your service’s image assets folder. By default this folder is located at
/assets/images.If you’re using Nunjucks, the asset path may have been changed by the
assetPathglobal variable orassetsPathparameter on the header component.Copy the
govuk-crest.svgfile from/dist/assets/imagesinto your assets folder.You can safely delete the old image files, named
govuk-crest.pngandgovuk-crest-2x.png.We introduced this change in pull request #5376: Update the Royal Arms graphic in footer (v5.x).
Components will not longer initialise twice on the same element
GOV.UK Frontend components now throw an error if they've already been initialised on the DOM Element they're receiving for initialisation.
This prevents components from being initialised more than once and therefore not working properly.
We introduced this change in pull request #5272: Prevent multiple initialisations of a single component instance
Respond to initialisation errors when using
createAllandinitAllWe've added a new
onErroroption forcreateAllandinitAllthat lets you respond to initialisation errors.The functions will continue catching errors and initialising components further down the page if one component fails to initialise,
but this option will let you react to a component failing to initialise. For example, to allow reporting to an error monitoring service.
We introduced this change in:
onErrortocreateAllonErrortoinitAllCheck if GOV.UK Frontend is supported
We've added the
isSupportedfunction to let you check if GOV.UK Frontend is supported in the browser running your script.GOV.UK Frontend components have been checking this automatically since the release of v5.0.0, but you may want to use the
isSupportedfunction to avoid running some code when GOV.UK Frontend is not supported.We introduced this change in pull request #5250: Add
isSupportedtoall.mjsUse our base component to build your own components
We've added a
Componentclass to help you build your own components. It allows you to focus on your components' specific features by handling these shared behaviours across components:this.$rootWe introduced this change in:
Componentclass.GOVUKFrontendComponentNew brand colour
We've added a brand colour for the Serious Fraud Office in pull request #5389.
Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
<strong>styles are resetv5.6.0Compare Source
To install this version with npm, run
npm install govuk-frontend@5.6.0. You can also find more information about how to stay up to date in our documentation.New features
Make it easier to navigate complex services with the Service navigation component
We've added a new Service navigation component to help users to navigate services with multiple top-level sections. This replaces the navigation functions of the Header component, which will be deprecated in a future release of GOV.UK Frontend.
This component includes some features we consider experimental. We intend to iterate these features in response to user feedback. These are:
We introduced this change in pull request #5206: Service navigation component.
v5.5.0Compare Source
To install this version with npm, run
npm install govuk-frontend@5.5.0. You can also find more information about how to stay up to date in our documentation.New features
We've updated the list of organisations and brand colours included in Frontend
We've overhauled the list of organisations and organisation brand colours that are shipped with GOV.UK Frontend.
The previous list was outdated and had not kept up with changes to the machinery of government. We’ve updated the list to:
To enable these changes, set the feature flag variable
$govuk-new-organisation-colourstotruebefore you import GOV.UK Frontend in your Sass files:You can also silence warnings about defunct organisations by adding
organisation-coloursto the$govuk-suppressed-warningssetting.We introduced this change in pull request #3407: Update organisation colours.
Stop long words breaking out of components with
govuk-!-text-break-wordWe've added a new override class to help display long words with no obvious break points when the space is too narrow to display them on one line. An example of a long word might be an email address entered by a user.
Wrapping the content with the
govuk-!-text-break-wordclass forces words that are too long for the parent element to break onto a new line.Sass users can also use the
govuk-text-break-wordmixin.We introduced this change in pull request #5159: Add break-word typography helper.
Recommended changes
Update the
$websafeparameter on thegovuk-organisation-colourfunctionThe
govuk-organisation-colourSass function's$websafeparameter has been renamed to$contrast-safe.This is to more accurately describe the functionality of the parameter.
The old parameter name will stop working in the next major version of GOV.UK Frontend.
We introduced this change in pull request #3407: Update organisation colours.
Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
hrefandtextfor falsy valuesConfiguration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) in timezone Europe/London, Automerge - "after 10am every weekday,before 4pm every weekday" in timezone Europe/London.
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.