Explorar el Código

Merge pull request #190 from goto-bus-stop/chore/uncrop-webcam

Make the webcam video fill the available space as much as possible
Artur Paikin hace 8 años
padre
commit
103285af41
Se han modificado 1 ficheros con 6 adiciones y 10 borrados
  1. 6 10
      src/scss/_webcam.scss

+ 6 - 10
src/scss/_webcam.scss

@@ -12,19 +12,15 @@
 }
 }
 
 
 .UppyWebcam-videoContainer {
 .UppyWebcam-videoContainer {
-  width: 70%;
-  height: 80%;
-  position: relative;
-  overflow: hidden;
+  height: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
 }
 }
 
 
 .UppyWebcam-video {
 .UppyWebcam-video {
-  position: absolute;
-  top: 50%;
-  left: 50%;
-  transform: translate(-50%, -50%);
-  min-width: 100%;
-  min-height: 100%;
+  max-width: 100%;
+  max-height: 100%;
 }
 }
 
 
 // .UppyWebcam-canvas {
 // .UppyWebcam-canvas {