Fix issue with hero image causing horizontal scroll #1777
Merged
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.
What are the relevant tickets?
N/A
Description (What does it do?)
Issue in production where the Hero image causes overflow to the right of its container causing the page to be horizontally scrollable. To replicate, reduce your screen width to <1365px and scroll left:
By design the image is translated right by 48px so is cropped right on the page. With this fix:
We could add an
overflow: hiddento its container, though the issue is that the image scales and at larger screen widths we want to see the whole image, otherwise it looks like this:This fix add a media breakpoint so that the image displays in full at larger widths, but has overflow hidden where it would interfere with the page margins.
Open to a better solution with the css, or an update to the design where the image is not translated right (not sure how intentional this was), which looks like:
Screenshots (if appropriate):
How can this be tested?
The homepage should not be scrollable at all screen widths and the hero image should display correctly.