themes icon indicating copy to clipboard operation
themes copied to clipboard

Cubic: Large Images Cause Issues with Gallery/Slideshow Blocks

Open edequalsawesome opened this issue 6 years ago • 13 comments

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

edequalsawesome avatar Oct 25 '19 21:10 edequalsawesome

I had an issue in #23195801-HC where the Large image setting caused an image not to wrap correctly with text. I was able to replicate the issue in my test site.

Here is how the settings look in the editor: Screen Shot 2020-08-10 at 4 07 42 PM

Here is what I expected to see (this is the Pena theme):

Screen Shot 2020-08-10 at 4 07 25 PM

Here is what I got with the Cubic theme:

Screen Shot 2020-08-10 at 4 07 56 PM

You can see here, there is a <span class="image-big"> that is surrounding the image that seems to be casuing the problem.

Screen Shot 2020-08-10 at 4 08 15 PM

JessBoctor avatar Aug 10 '20 23:08 JessBoctor

Another report of this - #26629085-hc and #3605758-zd

This customer is using the Tiled Mosaic block and the images are cropped strangely on desktop. It appears to be specific to the Cubic theme as when I switched to Twenty Twenty on my test site the images appeared as they did in the editor (not cropped).

The above CSS for the Tiled Gallery works as a fix.

gwensmithx avatar Dec 29 '20 01:12 gwensmithx

Another user report here that's related to the Classic Editor Tiled Gallery set to a circular crop: 3941754-zd-woothemes.

I confirmed the clipping issue appears on both Classic and Block editor pages. The main content area has 72px padding to its left and right, which pushes the galleries to the right causing the clipping.

Clearing those paddings works but has unintended effects on smaller screens, so I provided some CSS to reduce the inline width and height of the Gallery elements and images to bring them into line on this site:

/* Set gallery width to actual content area minus left/right padding on >Tablet screen widths | 3941754-ZD */
@media screen and (min-width: 768px) {
  .tiled-gallery.type-circle .gallery-row,
  .tiled-gallery.type-circle .gallery-row .gallery-group,
  .tiled-gallery.type-circle .gallery-row .gallery-group .tiled-gallery-item {
    height: 624px!important;
    width: 624px!important;
  }
}

/* Images need to be slightly smaller to account for padding | 3941754-ZD */
.tiled-gallery.type-circle .gallery-row .gallery-group .tiled-gallery-item img {
    height: 622px!important;
    width: 622px!important;
}

inaikem avatar Apr 28 '21 09:04 inaikem

I have had a user report this in 30507431-hc.

happychait avatar Jul 07 '21 03:07 happychait

Another in https://wordpress.com/forums/topic/pictures-do-not-display-completely/?view=all

KokkieH avatar Oct 15 '21 07:10 KokkieH

Another in https://wordpress.com/forums/topic/wordpress-cubic-galleries-not-working/?view=all

KokkieH avatar Oct 26 '21 09:10 KokkieH

This seems like a relatively high priority fix - Cubic is active on 1,475,553 sites.

jordesign avatar Nov 04 '21 03:11 jordesign

Another report on 29214250-hc followed up on 4572463-zen. The user has used the Classic Editor Tiled Mosaic Gallery on a Personal plan so cannot share a CSS fix.

Update: Explained to this user that this could take some time. We should follow-up with the user when this issue is resolved.

poojashetty18 avatar Dec 06 '21 12:12 poojashetty18

The issue with Slideshow block, in 33232812-hc

happychait avatar Jan 17 '22 03:01 happychait

https://wordpress.com/forums/topic/slide-show-feature/?view=all

metabreakr avatar Mar 31 '22 21:03 metabreakr

Given how this is an old theme and we have a viable CSS workaround, I have changed priority to low.

mrfoxtalbot avatar Jun 17 '22 11:06 mrfoxtalbot

Another in 7201325-zen

This customer was having the issue with their Tiled Gallery blocks. The above CSS for the Tiled Gallery worked.

hacchism avatar Oct 23 '23 01:10 hacchism

Support References

This comment is automatically generated. Please do not edit it.

  • [ ] 3605758-zen
  • [ ] 3941754-zen
  • [ ] 4572463-zen
  • [ ] 7201325-zen

github-actions[bot] avatar Oct 23 '23 01:10 github-actions[bot]