GOV.UK Frontend release v1.2.0
This is a feature release, where we've added some new functionality and there are no breaking changes.
In both radios and checkboxes macros you can now provide specify optional hints and optional label classes to each item. Additionally, you can provide a text divider between radio items.
OpenGraph image meta tag path is now independently customisable if needed and we've added stylistic tweaks to the logo when users have overridden colours in their browser.
There have also been some fixes to the conditional revealing content to address fix flash of unstyled content as well as replacing 'js-hidden' class with a new modifier class in tabs component's javascript file.
For more details see the changelog below.
Changelog
🆕 New features:
-
Allow for optional divider between radio items
You can now provide a divider item (e.g "or") to separate items
(PR #849) -
Allow og:image meta tag url to be set independently
Image url for the opengraph image needs to be absolute and
can now be overwritten by setting theassetUrl
variable.
(PR #847) -
Only underline the logo in the header on underline when users have overridden
colours in their browser, rather than it appearing underlined all the time
(PR #926) -
Allow for optional hint for each radio and checkbox item
You can now pass a hint object (or add in html) to each radio
and checkbox item to display the hint
(PR #846) -
Allow additional classes to be added to the radio and checkbox items
You can now provide
label: { classes: 'extra-class' }
to each item.(PR #880)
🔧 Fixes:
-
Replace conflicting
js-hidden
class used within the tabs component with a new modifier class.
Because this class is defined and used within the JavaScript, no markup changes are required.
(PR #916) -
Use
get-function
when calling a Sass function as passing a string to `call()``
is deprecated and will be illegal in Sass 4.0
(PR #919) -
Fix flash of unstyled content with conditional reveals (Radios and Checkboxes)
If the conditional reveal JavaScript is slow to execute it can result in showing the user their contents briefly which can be jarring.
(PR #885)