WordPress / performance

Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.

Home Page:https://wordpress.org/plugins/performance-lab/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modern Image Formats `picture` support breaks gallery block cropping

joemcgill opened this issue · comments

Bug Description

When using the new Modern Image Formats picture element support on my personal site, I noticed that the markup conflicted with the style for an image gallery created using the wp:gallery block when the "Crop images to fit" setting was enabled for the block.

I've left the feature enabled on my site for now so the behavior can be observed.

Steps to reproduce

  1. Activate the Modern Image Formats plugin and enable picture support from the Media Settings screen.
  2. Create an image gallery using the core gallery block that includes images with different aspect ratios
  3. Turn on the "Crop images to fit" setting on the Gallery block settings panel (screenshot below)
  4. Preview the page in the front end

Screenshots

Screenshot of the settings panel

image

Before using picture

image

With picture support enabled

image

@joemcgill thanks for the bug report (and ouch that first photo!). This is likely due to a CSS selector that isn't applying correctly. We will either need to change the specificity to make it work, or add an additional selector for the picture element version.

No problem, and sorry for my face. I've recovered! I assumed there was a CSS issue but haven't dug into it. Wanted to report it while it was top of mind.

Would like to work on this issue. Can you assign me this?

Adding the following css to picture tag should solve this issue.

style="display: contents;"

@joemcgill @adamsilverstein