fix: hero video max-width

This commit is contained in:
Hossein Mehrabi
2023-07-10 05:51:09 +03:30
parent 976bc3d3f5
commit ada7b05abd
2 changed files with 6 additions and 3 deletions
@@ -43,7 +43,7 @@
object-position: top; object-position: top;
height: 100%; height: 100%;
max-width: var(--container-max-width); max-width: calc(var(--container-max-width) / var(--hero-video-scale));
} }
} }
@@ -69,6 +69,9 @@
video { video {
width: 100%; width: 100%;
transform: scale(var(--hero-video-scale-mobile)); transform: scale(var(--hero-video-scale-mobile));
max-width: calc(
var(--container-max-width) / var(--hero-video-scale-mobile)
);
} }
} }
} }
@@ -69,9 +69,9 @@ export const HeroVideo: React.FC<HeroVideoProps> = ({
style={makeStyle( style={makeStyle(
{ ...style }, { ...style },
{ {
'hero-video-scale': desktop?.scale ?? '151.5%', 'hero-video-scale': desktop?.scale ?? '1.515',
'hero-video-offset-y': desktop?.offsetY ?? '-120px', 'hero-video-offset-y': desktop?.offsetY ?? '-120px',
'hero-video-scale-mobile': mobile?.scale ?? '140%', 'hero-video-scale-mobile': mobile?.scale ?? '1.40',
'hero-video-offset-y-mobile': mobile?.offsetY ?? '-10%', 'hero-video-offset-y-mobile': mobile?.offsetY ?? '-10%',
}, },
)} )}