Skip to content

Click-through blur effect when gallery images have a caption. #69061

Closed

Description

@CruelDrool

What problem does this address?

When gallery images have a caption there is a blur effect added to the <figure> tag using the pseudo class :before. This effect is not click-through and prevents clicking on the image link. Particularly noticeable with taller the images.

What is your proposed solution?

In packages/block-library/src/gallery/style.scss, line 61, add:

pointer-events: none

Not a huge issue, I just add this to my own CSS styling.

Activity

  1. added
    [Block] GalleryAffects the Gallery Block - used to display groups of images
    on Feb 5, 2025
  2. Rishit30G commented on Feb 6, 2025

    @Rishit30G
    Contributor

    Thanks for sharing the issue,

    I was able to reproduce the issue successfully, I think on adding cursor: pointer after pointer-events: none should help us resolve this issue:

    pointer-events: none
    cursor: pointer

    Also I think that the max-height can be decreased and backdrop-filter can be increased for a better result, but that's subjective, so maintainers can share their take on this one 🙇🏻

    Before After
    410287461-525504b0-2261-4ed8-a3ca-4dc355138807_C1RmZewk.mov
    410286845-66e084ae-0fe2-4f77-bb02-83f3fa23ba27_7kEatini.mov

    PS: Sorry for the bad screen recording, my laptop's screen recorder wasn't able to show the cursor: pointer behaviour so had to rely on phone for recording 😓

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

Metadata

Metadata

Assignees

Labels

[Block] GalleryAffects the Gallery Block - used to display groups of images[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions