Jetpack Slideshow Wrapper breaks mobile layouts
-
For some reason, the Jetpack Slideshow has a wrapper that ON MOBILE ends up having a height that adds a lot of whitespace around the slideshow and a width in the tens of thousands (or more) depending on how many slides you have. On desktop (in Chrome) it doesn’t seem to affect anything, but on mobile is causes the page to be wider than the viewport and breaks the rest of the layout. In this site, we are using all images that are the same exact size and sized for the max width of the site, so that isn’t causing the issue.
I added some CSS to constrain the wrapper to the viewport. If you use inspector and turn off this max-width and height on the swiper-wrapper you’ll see what happens:
@media only screen and (max-width: 835px) and (orientation: portrait) { ul.wp-block-jetpack-slideshow_swiper-wrapper.swiper-wrapper { height: fit-content !important; max-width: calc(100vw - 60px) !important; } }
I’ve spent hours troubleshooting in forums and seen other users mention this issue. One such example:
https://github.com/Automattic/themes/issues/6081
https://github.com/Automattic/jetpack/issues/22834Anyone have any experience with this or understand why the wrapper behaves this way? Is my little CSS hack the only fix?
The page I need help with: [log in to see the link]
- The topic ‘Jetpack Slideshow Wrapper breaks mobile layouts’ is closed to new replies.