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

Ensure legacy styles do not override button active state #1564

Merged
merged 2 commits into from
Sep 10, 2019

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Sep 10, 2019

This bug only impacts users that are using the legacy project GOV.UK Template alongside GOV.UK Frontend.

Add additional selector only when GOV.UK Template is loaded to ensure it does not override GOV.UK Frontend's active state.

This was missed because the links are all visited which gives the selectors a higher specificity.

To reproduce this you will need to change the link href in the example yaml file so that is not a visited link.

All link styles tested

  • Button start link (fixed)
  • Tabs unenhanced mode (good)
  • Back link (good)
  • Breadcrumbs (good)
  • Error summary links (good)
  • Footer links (good)
  • Header links (good)
  • Skip-link (good)

Fixes #1562

Add additional selector only when GOV.UK Template is loaded to ensure it does not override GOV.UK Frontend's active state.

This was missed because the links are all visited which gives the selectors a higher specificity.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1564 September 10, 2019 11:08 Inactive
@NickColley NickColley added this to Needs review in Design System Sprint Board via automation Sep 10, 2019
@NickColley NickColley added this to the Next milestone Sep 10, 2019
Copy link
Member

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

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

Makes sense – so this wasn't an issue for secondary / warning buttons, because we include this fix in those already… is that right?

@NickColley
Copy link
Contributor Author

@36degrees yeah, I'm not sure how we fixed it there but not in the default variation, is a bit of a weird one.

@NickColley NickColley merged commit 33cc10f into master Sep 10, 2019
Design System Sprint Board automation moved this from Needs review to Done Sep 10, 2019
@NickColley NickColley deleted the fix-legacy-leaking-styles branch September 10, 2019 11:55
@NickColley NickColley mentioned this pull request Sep 10, 2019
@timpaul timpaul added the button label Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Some components active states are broken in compatibility mode
4 participants