feat(lightbox): fade the dialog in and out#1992
Merged
Merged
Conversation
Replace the fade-in-only keyframe with transition-based fades on both open and close, using @starting-style for the entry value and allow-discrete on display/overlay so the dialog animates out before it leaves the top layer. The backdrop fades too. Still gated behind prefers-reduced-motion; unsupported browsers simply skip the animation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for gethinode-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Collaborator
Author
|
🎉 This PR is included in version 2.19.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The reusable lightbox
<dialog>now fades in and out (opacity + subtle scale, plus the backdrop), replacing the fade-in-only keyframe.How
Transition-based, using
@starting-stylefor the pre-open value andtransition-behavior: allow-discreteondisplay/overlayso the dialog animates out before it leaves the top layer. Still gated behindprefers-reduced-motion: no-preference; browsers without@starting-style/allow-discretesimply skip the animation (instant, no worse than today).Why
Opening/closing the lightbox (images and cloned mermaid diagrams) was abrupt on close. This gives a subtle, consistent fade both directions.
Verification
dart-sass compiles the new
@starting-style/allow-discretesyntax; the full exampleSite build is clean.🤖 Generated with Claude Code