Skip to content

GOV.UK Frontend v3.12.0

Compare
Choose a tag to compare
@36degrees 36degrees released this 13 May 14:45
· 5281 commits to main since this release
b1134b7

New features

Links are easier to read and have a clearer hover state (opt-in)

Links now have underlines that are consistently thinner and a bit further away from the link text.

Links also have a clearer hover state, where the underline gets thicker to make the link stand out to users.

These changes are an opt-in feature because you may:

To enable this feature, set $govuk-new-link-styles to true before you import GOV.UK Frontend in your Sass:

// application.scss
$govuk-new-link-styles: true;
@import "govuk-frontend/all";

If you have created your own link styles, you should review them to ensure their use is consistent across your service.

To make it easier to be consistent in your use of link styles, we’ve also introduced new mixins and modifier classes for:

  • removing underlines
  • displaying white text on dark backgrounds

These new link styles will be enabled by default in a future major version of GOV.UK Frontend.

This was added in pull request #2183: Updates to link styles and link hover states.

Style links to remove underlines

You can now remove underlines from links by using either the:

An underline still appears when the user hovers their cursor over the link.

This was added in pull request #2214: Add no-underline mixin and modifier class.

Style links on dark backgrounds

You can now style links on dark backgrounds to use white text colour by using either the:

This was added in pull request #2213: Add inverse link mixin and modifier class.

Add links styled as buttons to cookie banners

You can now add links styled as buttons to cookie banners. For example, you can set the Hide button to be a link styled as a button that reloads the page. Use this feature if you set non-essential cookies on the server and want to help users keep their place using progressive enhancement.

This feature is enabled by default.

This was added in pull request #2164: Enable cookie banner to set link styled as a button.

Fixes