Skip to content

Lightbox trigger BUTTON is not visible on an Image lightbox when Picture Element is enabled #1805

Open
@westonruter

Description

@westonruter

Bug Description

I just found that Modern Image Formats prevents that button from ever being visible on hover when Picture Element is enabled. This is because of this CSS rule (source):

.wp-lightbox-container img:hover+button {
    opacity: 1;
}

That rule would not be necessary if the BUTTON.lightbox-trigger wrapped the IMG, since hovering over the button could always then cause the SVG to be revealed:

.wp-lightbox-container button.lightbox-trigger:hover > SVG {
    opacity: 1;
}

Originally discovered in WordPress/gutenberg#68726 (comment).

Steps to reproduce

  1. Activate Modern Image Formats plugin
  2. Enable Picture Element in the plugin settings
  3. Upload an image
  4. Add the image to a new Image block and enable lightbox
  5. Hover over the Image block with your mouse

The lightbox trigger button is not visible.

Screenshots

The lightbox trigger button is supposed to appear in the top-right corner of the image:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Plugin] Modern Image FormatsIssues for the Modern Image Formats plugin (formerly WebP Uploads)[Type] BugAn existing feature is brokenblocked

    Type

    Projects

    • Status

      Not Started/Backlog 📆

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions