govuk-frontend
govuk-frontend copied to clipboard
Enable new link styles by default
At the minute, the new link styles introduced in 3.12.0 are disabled by default, and we require users to set a flag $govuk-new-link-styles: true
before importing GOV.UK Frontend in order to opt-in to use them.
This is in case users:
- need to make changes to their service to introduce these new link styles consistently
- want to avoid opting in if they have links within a multiple-column layout in your CSS, due to #2204
In a future major release (probably after #2204 has been fixed in Chromium) we should change the setting to enable the links, making the new link styles opt-out.
We may then choose to deprecate the flag for removal in a following major release.
What
Set $govuk-new-link-styles
to true
in govuk/settings/_links.scss
.
Update any associated comments, documentation or tests.
Why
We want to encourage as many services as possible to use the new link styles. We decided to make the link styles opt-in because of #2204.
Who needs to know about this
Developers, tech writer
Done when
- [ ] All footer component links are opted into the new styles (once https://github.com/alphagov/govuk-frontend/issues/2204 has been fixed)
- [ ] The new link styles are opt-in
- [ ] Comments, documentation and tests updated
Note that we also opted-out the footer links separately https://github.com/alphagov/govuk-frontend/commit/8187b5733a767dfee5bff474010d8572abadac1b, because these often can have a multi-column layout, and we don't want sites using the new link styles to have broken footers. This does mean however that footer links currently don't have a clear hover state.
It looks like the issue in #2204 has been fixed in Chrome 102, so we should consider this for the 5.0 release.