Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the readability and hover state of links #2197

Closed
11 tasks done
36degrees opened this issue Apr 21, 2021 · 3 comments
Closed
11 tasks done

Improve the readability and hover state of links #2197

36degrees opened this issue Apr 21, 2021 · 3 comments
Labels
design epic Epics are used in planning project boards to group related stories typography

Comments

@36degrees
Copy link
Contributor

36degrees commented Apr 21, 2021

What

Ensure that all of the components in GOV.UK Frontend that include links are using the core link helpers.

Update the link styles with the latest design changes.

Provide mixins and modifier classes for common link styles (without underlines, inverse for use on dark backgrounds) to help service teams implement the new link styles correctly.

Why

We want to make links:

  • easier to read
  • have clearer a hover state

v3.12

  1. accessibility audit may 2019 design typography
    christopherthomasdesign
  2. guidance typography
    36degrees
  3. typography 🕔 hours
    36degrees
  4. design guidance typography
    36degrees calvin-lau-sig7
    christopherthomasdesign
  5. typography
    hannalaakso

Once the Chrome bug with links in columns is fixed

  1. footer typography

Once the Chrome bug with incorrect offset calculations is fixed

  1. design typography 🕔 hours
    christopherthomasdesign domoscargin

v5.0

  1. breaking change typography
    36degrees
@36degrees
Copy link
Contributor Author

I've updated the description to (retrospectively) cover the work we've done so far on this, so that we can track the remaining things (flipping the feature flag and removing it) in context.

There were a couple of browser bugs relating to mis-painting links in columns and Chrome measuring the underline offset from a different point to other browsers – which is one of the reasons why we introduced this feature behind a flag.

Now that those bugs have been fixed (and most users have updated to a newer version of Chrome) we're ready to enable the feature by default in v5.0.

We still need to decide whether we want to keep the feature flag around for a while (so users can opt out if there are any other issues) or if we're happy to remove the flag at the same time.

@36degrees 36degrees changed the title Improvements to link styles Improve the readability and hover state of links Apr 18, 2023
@36degrees
Copy link
Contributor Author

We still need to decide whether we want to keep the feature flag around for a while (so users can opt out if there are any other issues) or if we're happy to remove the flag at the same time.

Having looked at this again, I'n inclined to remove the feature flag entirely because all of the underlying changes can be controlled by other settings.

The flag is used in two places in helpers/_links.scss. In both cases, all of the CSS within the block guarded by the flag is also guarded by the other settings:

@if $govuk-new-link-styles {
@if $govuk-link-underline-thickness {
text-decoration-thickness: $govuk-link-underline-thickness;
}
@if $govuk-link-underline-offset {
text-underline-offset: $govuk-link-underline-offset;
}
}

@if $govuk-new-link-styles and $govuk-link-hover-underline-thickness {
text-decoration-thickness: $govuk-link-hover-underline-thickness;
// Disable ink skipping on underlines on hover. Browsers haven't
// standardised on this part of the spec yet, so set both properties
text-decoration-skip-ink: none; // Chromium, Firefox
text-decoration-skip: none; // Safari
}

This means with the flag removed you could still disable all of the 'new' link styles by setting:

$govuk-link-underline-offset: false;
$govuk-link-underline-thickness: false;
$govuk-link-hover-underline-thickness: false;

@36degrees
Copy link
Contributor Author

Based on the above, we decided to remove the feature flag in #3600.

I think we can call this epic done! 🎉

@stevenjmesser stevenjmesser added this to the v5.0 milestone May 17, 2023
@36degrees 36degrees removed this from the v5.0 milestone Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design epic Epics are used in planning project boards to group related stories typography
Projects
None yet
Development

No branches or pull requests

2 participants