Fix 2021 site-wide broken mobile layouts from header overflow #885
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR for the 2021 site fixes site-wide broken mobile layouts caused by horizontal overflow from the header title container
.md-header__title--active. The fix restores normal page behavior for all pages within the affected viewport widths ≤ 959px by preventing:It adds
override.cssfor a targeted fix and imports it frommkdocs.yml(required to apply the CSS file to the theme).Closes #884
Testing
You can test the fix at this live demo site top10-21.ritovision.com or on a local build.
To verify:
I have tested and confirmed the fix is stable across Chrome, Firefox, Edge, Opera mobile and desktop browsers.
Note: In testing a comparison of the updated fix and the current site build, you should test with a mobile browser on a mobile device since desktop browsers have shown inconsistent reproduction of the issue compared to on mobile.
Before and After Screenshots
The issue manifests the same across all pages on the site, so the Home and About pages were chosen here as a representative demonstration of all other pages being fixed. Screenshots from Chrome mobile browser at around 450px screen size.
Top of Homepage - BEFORE
Notice the excess whitespace along the right side of the header
Bottom of Homepage - BEFORE
Notice the fixed header is missing and there is excess whitespace along the right side of the footer
Bottom of Homepage - AFTER
Notice the header is still visible while at the bottom of the page, and both the header and footer take up the full page width without any excess whitespace on the right side.
About page - BEFORE
Notice the same excess whitespace to the right of the header as on the homepage
About page - AFTER
Notice there is no more excess whitespace to the right of the header