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.
🆕 New features
Enable
pattern
attribute for inputYou can now set the
pattern
attribute on input fields using the componentmacros:
As well as
pattern
, custom attributes can also be added on day/month/yearinputs (e.g.
data-example
) shown below:(PR #1172)
Prevent horizontal jump as scrollbars appear
As content vertical height grows (e.g. autocomplete results appear), browsers
may add scroll bars causing the page to jump horizontally in position.
To avoid this, re-introduce fix from GOV.UK Template:
Content on pages move horizontally depending on if a scrollbar is on screen or not #1204
(PR #1230)
Accommodate camera notches on new devices (iPhone X, Google Pixel 3 etc)
On newer devices with "camera notches", browsers reserve a safe area in
landscape orientation (known as pillarboxing) so content isn't obscured.
To avoid this, support has been added for
viewport-fit=cover
as shown here:https://webkit.org/blog/7929/designing-websites-for-iphone-x/
(PR #1176)
Prefix error messages with a visually hidden "Error:", to make it clearer to
users of assistive technologies
(PR #1221)
Prevent accidental multiple submissions of forms
If a user double clicks a submit button in a form, we debounce this event and
ignore the second click.
HTML data attribute:
Nunjucks macro:
(PR #1018)
🔧 Fixes
Ensure that files within the core, objects and overrides layers can be
imported individually
Unlike components, the files within these layers did not previously import
their dependencies (for example, most of them require the govuk-exports mixin
but did not import it).
We've also added tests to ensure that files within these layers can be
imported and rendered to CSS without erroring, which should catch this in the
future.
Thanks to Alasdair McLeay for originally raising a
PR to fix this.
(PR #1235)
Ensure inset component does not misalign nested components
Thanks to Paul Hayes for raising this issue.
(PR #1232)
Improve word wrapping in summary list component
Thanks to Edward Horsford and Lee Kowalkowski for their help on this one.
Also thanks to Malcolm Butler for exploring a previous version of this fix.
(PR #1220)
This also updates the documentation for a number of components to document missing options.