govuk-frontend icon indicating copy to clipboard operation
govuk-frontend copied to clipboard

Enable new link styles by default

Open 36degrees opened this issue 3 years ago • 2 comments

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

36degrees avatar Sep 20 '21 13:09 36degrees

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.

lfdebrux avatar Jan 19 '22 13:01 lfdebrux

It looks like the issue in #2204 has been fixed in Chrome 102, so we should consider this for the 5.0 release.

36degrees avatar Jun 14 '22 16:06 36degrees