-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Image block: Fix responsive sizing in lightbox (#51823)
* Rewrite logic to calculate image dimensions based on aspect ratio * Add padding for lightbox images using fade animation * Use window inner dimensions to account for mobile address bar On mobile, the address bar is sometimes visible in browsers, which the CSS vh (viewport height) value does not account for. This causes calculations based on vh to render incorrectly if the address bar is ever visible - in this case, placing the lightbox image off center. To address this, I changed the lightbox calculations to be based on window.innerHeight and window.innerWidth instead. * Revise to deactivate responsive image on lightbox close * Use built-in directive for mouseover event * Add safe area inset to close button positioning * Revert "Use built-in directive for mouseover event" This reverts commit a4c9a22ccd17fc92f5dd99796b52605654ce82e9. * Update tests
- Loading branch information
1 parent
4e17443
commit 10d927c
Showing
3 changed files
with
60 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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