Skip to content

Commit 4724ad8

Browse files
committed
bug(video): should fix background video size
- It can happen that the video is too small for the screen. This should fix it
1 parent 8a6cc3b commit 4724ad8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

components/Background.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ const sharedStyles = `
1616
right: 0;
1717
bottom: 0;
1818
position: absolute;
19+
20+
width: auto;
21+
height: auto;
22+
overflow: hidden;
23+
min-width: 100%;
24+
min-height: 100%;
1925
`;
2026

2127
const BackgroundVideo: React.SFC<BackgroundProps> = ({ video, image }) => (
@@ -26,7 +32,7 @@ const BackgroundVideo: React.SFC<BackgroundProps> = ({ video, image }) => (
2632
muted={true}
2733
autoPlay={true}
2834
/>
29-
<style jsx={true}>
35+
<style jsx>
3036
{`
3137
video {
3238
${sharedStyles}
@@ -39,7 +45,7 @@ const BackgroundVideo: React.SFC<BackgroundProps> = ({ video, image }) => (
3945

4046
const BackgroundImage: React.SFC<BackgroundProps> = ({ image, position }) => (
4147
<div>
42-
<style jsx={true}>
48+
<style jsx>
4349
{`
4450
${sharedStyles}
4551
z-index: ${zIndex.background};

0 commit comments

Comments
 (0)