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

Adjust the positioning of the header mobile menu button #4065

Closed
wants to merge 1 commit into from

Conversation

owenatgov
Copy link
Contributor

Adjust the positioning of the header mobile menu button so that it sits in the middle of the header bar on mobile rather than at the baseline of the GOV.UK logo.

Fixes #3896

Visual changes

Before

Screenshot of header on mobile before change

After

Screenshot of header on mobile after change

Thoughts

I'm wondering if there's a way to flexbox the header so that we can make this positioning dynamic. Will explore this as part of this PR.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4065 August 9, 2023 13:59 Inactive
Copy link
Member

@querkmachine querkmachine left a comment

Choose a reason for hiding this comment

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

LGTM.

Unrelated to this, but I noticed when reviewing that there is 50 pixels of horizontal space reserved for the absolutely positioned toggle, but the toggle itself is wider than this (≈54 pixels).

Flagging as it might need to be accounted for if the toggle text is going to be scaled up at some point.

@owenatgov
Copy link
Contributor Author

@querkmachine Good spot. I'm gonna investigate it a little more but I expect this can be solved by just increasing that padding to govuk-spacing(9) rather than 8. I wonder if there's a way we can make the positioning make more sense and avoid then eed for absolute positioning hacks at all.

@owenatgov
Copy link
Contributor Author

I'm going to close this in favour of refactoring the header to future proof it against positioning challenges like this one

@owenatgov owenatgov closed this Aug 14, 2023
@owenatgov owenatgov deleted the adjust-header-menu-button branch June 28, 2024 10:16
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.

3 participants