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

Fix skip link underline being removed when global styles are enabled #4936

Merged
merged 1 commit into from Apr 15, 2024

Conversation

querkmachine
Copy link
Member

@querkmachine querkmachine commented Apr 15, 2024

Fixes #4930.

Changes

  • Adds the govuk-link-decoration mixin (which sets the text-decoration, text-decoration-thickness and text-decoration-offset properties) to the list of styles re-added to the Skip link component when global styles are enabled.
  • Update changelog.

Thoughts

  • Simply re-adding the underline with text-decoration: underline doesn't have the desired effect, as the text-decoration: none inherited from the global styles also resets the thickness and offset properties. We do need all three.

@querkmachine querkmachine self-assigned this Apr 15, 2024
@querkmachine querkmachine force-pushed the fix-skip-link-underline-global-styles branch from 38ebfd2 to de8aec6 Compare April 15, 2024 12:34
@querkmachine querkmachine force-pushed the fix-skip-link-underline-global-styles branch from de8aec6 to bbc74c6 Compare April 15, 2024 12:35
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4936 April 15, 2024 12:35 Inactive
Copy link

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.24 KiB
dist/govuk-frontend-development.min.js 42.21 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 87.21 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 81.95 KiB
packages/govuk-frontend/dist/govuk/all.mjs 4.17 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.23 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.2 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 77.67 KiB 40.19 KiB
accordion.mjs 22.71 KiB 12.85 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.13 KiB 6.11 KiB

View stats and visualisations on the review app


Action run for bbc74c6

Copy link

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss b/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
index 9ca6fde4b..9c4803617 100644
--- a/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/skip-link/_index.scss
@@ -27,6 +27,7 @@
 
       // Undo unwanted changes when global styles are enabled
       @if $govuk-global-styles {
+        @include govuk-link-decoration;
         box-shadow: none;
       }
     }

Action run for bbc74c6

@querkmachine querkmachine requested a review from a team April 15, 2024 12:39
@querkmachine querkmachine marked this pull request as ready for review April 15, 2024 12:39
Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works neatly 🙌🏻

@querkmachine querkmachine merged commit c97b592 into main Apr 15, 2024
46 checks passed
@querkmachine querkmachine deleted the fix-skip-link-underline-global-styles branch April 15, 2024 13:00
@owenatgov owenatgov mentioned this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global styles conflict with skip link component
3 participants