Skip to content

Cubic: Large Images Cause Issues with Gallery/Slideshow Blocks #1601

Open

Description

Steps to replicate

Add images to a Tiled Gallery or Slideshow block

Result

Images are displayed off-center when published:

Gallery

Published Gallery

Slideshow

Published Slideshow

Expected

The images to look the way they do in the editor:

Gallery

Editor Gallery

Slideshow

Editor Slideshow


This appears to be due to the negative margin added to images that are larger than 767px, which the theme's JavaScript adds a .image-big class to -- the block handles the resizing of the images, but then the negative margin pulls the image to the left.

I used the following CSS to resolve the issue for the Gallery block

/* fix gallery image margins with cubic theme */
@media screen and (min-width: 768px) {
    .wp-block-jetpack-tiled-gallery .wp-caption.caption-big, 
    .wp-block-jetpack-tiled-gallery .image-big {
        margin-left: 0;
    }
}

And the following CSS to resolve it for the Slideshow block:

/* fix gallery image margins with cubic theme */
@media screen and (min-width: 768px) {
    .wp-block-jetpack-slideshow .wp-caption.caption-big, 
    .wp-block-jetpack-slideshow .image-big {
        margin-left: 0;
    }
}

This is likely the same cause of issues #1504, #1328, and #1290

  • User report: #16219193-hc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Customer ReportIssues or PRs that were reported via Happiness. Previously known as "Happiness Request".SupportTriagedUser ReportThis issue was created following a WordPress customer report[Pri] Low[Theme] Cubic[Type] BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions