Skip to content

Commit

Permalink
Media: Square and Circle gallery images squashed (#12732)
Browse files Browse the repository at this point in the history
This patch fixes images getting squashed/skewed in Square and Circle Tiled Gallery as described in 7861-wpcom.

This bug currently only appears when **Classic Editor** is used to create Square or Circle Tiled Gallery on **Simple sites**.

It does not appear in Jetpack site donpark.wpsandbox.me with latest Jetpack. I don't see an equivalent fix in Jetpack so it's not clear why the same issue does not appear there.

This commit was generated from D28285-code.
  • Loading branch information
donpark authored Jun 18, 2019
1 parent 14a647f commit f74b64b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/tiled-gallery/tiled-gallery/tiled-gallery.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,16 @@

.tiled-gallery.type-circle .tiled-gallery-item img {
border-radius: 50% !important; /* Ensure that circles are displayed in themes that add border-radius to all images as a default */
object-fit: cover;
}
.tiled-gallery.type-circle .tiled-gallery-caption {
display: none;
opacity: 0;
}


/* =Square Layout
-------------------------------------------------------------- */
.tiled-gallery.type-square .tiled-gallery-item img {
object-fit: cover;
}

0 comments on commit f74b64b

Please sign in to comment.