Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CruelDrool opened this issue Feb 5, 2025 · 1 comment · May be fixed by #69067
Open

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

CruelDrool opened this issue Feb 5, 2025 · 1 comment · May be fixed by #69067
Assignees
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@CruelDrool
Copy link

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.

@CruelDrool CruelDrool added the [Type] Enhancement A suggestion for improvement. label Feb 5, 2025
@Mamaduka Mamaduka added the [Block] Gallery Affects the Gallery Block - used to display groups of images label Feb 5, 2025
@Rishit30G
Copy link
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
https://github.com/user-attachments/assets/3b9bca6f-63ec-4f9e-9d9c-e3538f2e413a https://github.com/user-attachments/assets/a42643fa-bb90-497d-8c74-5e3d3cda3c1c

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 😓

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants