fix: use negative positioning for iOS notch video extension
All checks were successful
build-website / build (push) Successful in 1m32s
All checks were successful
build-website / build (push) Successful in 1m32s
- Replace broken fixed positioning with absolute + negative top - Video now extends calc(-1 * env(safe-area-inset-top)) above container - Height compensated with calc(100dvh + env(safe-area-inset-top)) - Container uses position: relative with overflow: visible - Fixes iOS Safari bug where fixed positioning doesn't work properly This approach allows the video to extend under the iOS notch/Dynamic Island while keeping interactive content in safe areas.
This commit is contained in:
@@ -1674,28 +1674,27 @@ html {
|
|||||||
/* Responsive */
|
/* Responsive */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.hero-voyage {
|
.hero-voyage {
|
||||||
|
/* Use relative positioning to contain the absolutely positioned video */
|
||||||
|
position: relative;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
/* iOS-specific height handling */
|
/* Set height to dynamic viewport height */
|
||||||
height: 100vh;
|
|
||||||
height: -webkit-fill-available;
|
|
||||||
height: 100dvh;
|
height: 100dvh;
|
||||||
min-height: 100vh;
|
|
||||||
min-height: -webkit-fill-available;
|
|
||||||
min-height: 100dvh;
|
min-height: 100dvh;
|
||||||
/* Video will extend under notch - no padding-top here */
|
/* CRITICAL: Allow overflow visible so video can extend beyond container */
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
overflow: visible !important;
|
||||||
overflow-x: hidden !important;
|
|
||||||
max-width: 100vw !important;
|
max-width: 100vw !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make video container fixed on mobile to fill entire viewport including notch */
|
/* Use negative positioning to extend video into notch area */
|
||||||
.hero-video-container {
|
.hero-video-container {
|
||||||
position: fixed !important;
|
position: absolute !important;
|
||||||
inset: 0;
|
/* Negative top to extend into notch area */
|
||||||
|
top: calc(-1 * env(safe-area-inset-top, 0px));
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
/* Height includes the safe area we're extending into */
|
||||||
height: -webkit-fill-available;
|
height: calc(100dvh + env(safe-area-inset-top, 0px));
|
||||||
height: 100dvh;
|
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user