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.
2.0.0 (Breaking change)
💥 Breaking changes:
Set panel component's title heading level to 1 as default
We think the panel title should be the h1 in the majority of cases, so we made
it the default.
If you have need to change the Panel component heading to something other than
h1, you can do so by specifying
headingLevel: <number>
in the Nunjucksmacro.
(PR #967)
Remove deprecated
govuk-visually-hidden-focussable
class nameIn 1.1 release we added a new, correctly spelt
govuk-visually-hidden-focusable
CSS class and marked the old one asdeprecated.
To migrate you need to change
govuk-visually-hidden-focussable
togovuk-visually-hidden-focusable
in your codebase.(PR #968)
Remove name-based width logic from date-input component
In 1.1 release
we removed styling which made the year field 4 characters wide, but was
coupled to the field's name.
However, to avoid making this a breaking release, we added logic to
automatically add the width classes based on the name.
We are now removing this behaviour. Instead, users need pass explicit classes
for each field in the
items
object for the desired width of the input field.If you are not passing
items
at all, you will get the default items which include these classes.If you are using the Nunjucks macro, you need to provide a width class for
each item, for example:
If you are using plain HTML, you need to manually add a width-based class, such
as
govuk-input--width-2
orgovuk-input--width-4
to the input fields.(PR #969)
Rename
name
argument of date-input component tonamePrefix
.This is better reflective of the purpose of the argument, which is to prefix the
name
attribute ofitems
. This is consistent with other components which use the nameidPrefix
to explain similar functionality.If your project currently uses this optional argument with the date-input macro, you need to rename all instances of it to
namePrefix
(NB: this argument shouldn't be confused with theitems.{}.name
attribute which hasn't changed.)(PR #984)
Turn off compatibility mode by default for GOV.UK Elements, GOV.UK Template, GOV.UK Frontend Toolkit
You do not need to make any changes if you do not use these projects alongside GOV.UK Frontend.
To migrate include the SCSS variables that correspond with the projects you depend on before importing GOV.UK Frontend styles into your app:
(PR #981)
Turn on relative typography (rem) by default
This allows for end-users to adjust GOV.UK Frontend components by setting their font size in their browser.
If you are using GOV.UK Frontend on with no other frameworks this should not break your project.
If you need to change this setting for compatibility with GOV.UK Elements, GOV.UK Template, GOV.UK Frontend Toolkit consider enabling compatibility mode.
Otherwise, set
$govuk-typography-use-rem
tofalse
before importing GOV.UK Frontend styles into your app:(PR #981)
Remove anchor styling in govuk-lists
This was an undocumented feature of lists.
To migrate we recommend using adding
.govuk-link
class to any anchors within a govuk-list.If you would like to replicate this functionality without adding a class you can also enable global styles (Note: global styles are enabled by default in the GOV.UK Prototype Kit)
(PR #985)
Remove the width declaration from the
<select>
componentThe
<select>
component’s width will now be defined by it’s content. This addresses some accessibility issues with the select being 100% wide by default. If you want to style your select to be 100% wide we have added a new override class.govuk-!-width-full
to allow this.(PR #960)
🆕 New features:
Add a new width override class
.govuk-!-width-full
You can now override elements that have an undefined or smaller percentage width to be 100% width of their container.
(PR #960)
Allow attributes on select items
You can now provide attributes on select items
attributes: { 'data-attribute': 'value' }
(PR #977)
🔧 Fixes:
Textareas can now only be resized vertically, to prevent them being resized
outside of their container bounds. Additionally, they now have a minimum
height to prevent them being resized smaller than a text input.
(PR #976)
Defend tables against GOV.UK Elements code
(PR #983)