-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Try using popover API for image lightbox #68726
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: +175 B (+0.01%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
Flaky tests detected in cabba6d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12819863388
|
Why, because of Kses? |
As an alternative to #68725, this PR explores using the
popover
API for the image lightbox instead of a regular less semanticdiv
.Benefits:
z-index
necessary (top-level is higher than anyz-index
can be).::backdrop
pseudo element that can be styled.Escape
automatically closes the lightbox.Caveats:
popovertarget
attribute, so requires a manualdata-wp-on--click
to open the lightbox.::backdrop
pseudo element is removed immediately upon hiding the lightbox, so animation to fade out is not possible.handleKeydown
action on the lightbox does not fire. Still researching why...