From 172bc0155f0ad70d046db3151539715ee1690678 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Mon, 21 Sep 2020 21:44:29 +0300
Subject: fix: get rid of nasty aspect ratio bug

---
 src/components/Image/BackgroundImage.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/components/Image/BackgroundImage.tsx')

diff --git a/src/components/Image/BackgroundImage.tsx b/src/components/Image/BackgroundImage.tsx
index e749d10..7d8e6e2 100644
--- a/src/components/Image/BackgroundImage.tsx
+++ b/src/components/Image/BackgroundImage.tsx
@@ -11,13 +11,14 @@ const useStyles = makeStyles({
   root: {
     position: 'absolute',
     width: '100%',
-    height: '100%'
+    height: '100%',
+    overflow: 'hidden'
   },
   image: {
     objectFit: 'cover',
     pointerEvents: 'none',
     width: '100%',
-    height: '100%'
+    minHeight: '100%'
   }
 });
 
@@ -25,9 +26,9 @@ const BackgroundImage: React.FC<PropTypes> = ({ src, alt }) => {
   const classes = useStyles();
 
   return (
-    <picture className={classes.root}>
+    <div className={classes.root}>
       <Image src={src} alt={alt} className={classes.image} />
-    </picture>
+    </div>
   );
 };
 
-- 
cgit v1.2.3

