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

Refactor header component styles #1059

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

paulrobertlloyd
Copy link
Contributor

@paulrobertlloyd paulrobertlloyd commented Oct 24, 2024

Description

This PR performs a deep dive on the CSS for the header and its various components. These styles have accumulated over time, with many rules applied in multiple instances, needlessly set or unset, or not inheriting values where they could.

This PR also fixes the issue where overflowing navigation items don’t get rolled up into the dropdown menu on desktop (I’ve pulled this into a separate, non-breaking PR – #1060).

These modifier classes are no longer needed:

  • .nhsuk-header__logo--only
  • .nhsuk-header__transactional--logo

There are a few stylistic changes too:

  • The ‘More’ button is no longer underlined (it’s not a link, it doesn’t go anywhere, so I think this makes sense)
  • The padding is now equal on all sides (nhsuk-spacing(3), 16px v 20px); this saves space and uses a defined value.
  • The bottom border on the drop-down menu is now darker, so that it’s not the same colour as the default page background
  • On desktop, items in the drop-down navigation are no longer centred
  • The font size for organisation names as been changed, with a larger minimum font size; changes in other spacing means this shouldn’t add much to the overall header height

There are 43 updated backstop images; reviewing these I think demonstrate how these changes should hopefully be for the better.

Checklist

@paulrobertlloyd
Copy link
Contributor Author

Tests failing due to fix for overflowing navigation items on desktop; will address in separate PR.

@paulrobertlloyd paulrobertlloyd merged commit 1d394a5 into header-breaking-changes Oct 31, 2024
2 checks passed
@paulrobertlloyd paulrobertlloyd deleted the header-refactor-styles branch October 31, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants