-
Notifications
You must be signed in to change notification settings - Fork 107
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
Hide header nav on print (to fix print layout issues) #1001
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🖨️
@anandamaryon1 @edwardhorsford thinking about it some more, I wonder if we should also hide everything outside the |
@frankieroberto that probably makes sense. Do you think there's any risk of teams putting useful content outside of |
Feels low risk? working out how to hide the breadcrumbs and back links from print is slightly complicated though - I think you'd have to hide everything within |
I think you could probably do a selector that targets siblings to |
e781014
The breadcrumbs already have styles to hide themselves on print but the back link doesn't seem to (I'm not sure why). It does feel a little risky to hide everything outside I'm thinking to keep this PR focussed on this bug, other print styling can maybe be done later, but I'd like to get this in now if you approve? |
Description
When printing pages that contain a header with navigation links, the print layout depends on the viewport width, leading to layout inconsistency (where the page is being 'zoomed out' to try fit the header, resulting in smaller printed text when printed from a wider browser/desktop).
Example:
And a live nhs.uk example:
I've tested on Chrome, Safari and Firefox and all present the same issue (with slightly different results).
I propose we hide the navigation items when printing.
This PR (hide the nav items):
Checklist