diff --git a/src/govuk/helpers/_links.scss b/src/govuk/helpers/_links.scss index fbec01c92e..3d2f9afc8e 100644 --- a/src/govuk/helpers/_links.scss +++ b/src/govuk/helpers/_links.scss @@ -52,6 +52,10 @@ @mixin govuk-link-hover-decoration { @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 } } diff --git a/src/govuk/helpers/links.test.js b/src/govuk/helpers/links.test.js index dbe54847a9..8e568ea339 100644 --- a/src/govuk/helpers/links.test.js +++ b/src/govuk/helpers/links.test.js @@ -121,7 +121,7 @@ describe('@mixin govuk-link-hover-decoration', () => { }) describe('when $govuk-new-link-styles are enabled', () => { - it('sets text-decoration-thickness on hover', async () => { + it('sets a hover state', async () => { const sass = ` $govuk-new-link-styles: true; $govuk-link-hover-underline-thickness: 10px; @@ -133,7 +133,7 @@ describe('@mixin govuk-link-hover-decoration', () => { const results = await renderSass({ data: sass, ...sassConfig }) - expect(results.css.toString()).toContain('.foo:hover { text-decoration-thickness: 10px; }') + expect(results.css.toString()).toContain('.foo:hover') }) describe('when $govuk-link-hover-underline-thickness is falsey', () => {