-
Notifications
You must be signed in to change notification settings - Fork 153
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
Fix horizontal scrolling on pages including Streamfield ImageText block #12444
Fix horizontal scrolling on pages including Streamfield ImageText block #12444
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.
Great job @ramram-mf, the new rule addresses the issue and the horizontal scroll is no more! I left one small comment on adjusting the implementation. Please reach out if you have any questions!
…difying medium and large screens current margins.
…-on' of github-mf:MozillaFoundation/foundation.mozilla.org into TP1-168-strange-horizontal-panning-on-opportunity-pages-on
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.
LGTM, thanks @ramram-mf! 🚀
➤ Simon Acosta Torres commented: PR has been merged. |
Description
The
Image Text
block, specifically the.image_text-block .streamfield-content .tw-row
elements, when rendered on mobile viewports, calculates differently horizontal margins adhering to tailwind unit scales, having16px
to each side, providing the following box model:This PR attempts to mitigate the resulting user experience behavior in mobile devices, which introduces horizontal body wide scrolling. This horizontal scrolling gets in the way of vertical scrolling and immediately disrupts user experience in affected pages.
The solution proposed uses a
calc()
css function to remove the resulting extra1px
from the right of the elements so it doesn't overflow from body.Fix will only be applied to small viewports.
Link to sample test page: https://foundation-s-tp1-168-st-l8zo7d.herokuapp.com/en/initiatives/web-literacy/core-curriculum/participate/
Related PRs/issues: #10801
┆Issue is synchronized with this Jira Story