aboutsummaryrefslogtreecommitdiffstats
path: root/src/sass/types/video.scss
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-11 11:08:56 -0500
committerJesús <heckyel@hyperbola.info>2022-02-11 11:08:56 -0500
commit69e20fc11381bdc94c416f11527289a34ffb89ed (patch)
tree4b8969904958e4a377a9dd00cabd972c1ce22429 /src/sass/types/video.scss
parent421de00c8bb27fd0cd01d19ed4c2681ef2d63446 (diff)
downloadplyr-master.tar.lz
plyr-master.tar.xz
plyr-master.zip
update from upstreamHEADmaster
Diffstat (limited to 'src/sass/types/video.scss')
-rw-r--r--src/sass/types/video.scss8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sass/types/video.scss b/src/sass/types/video.scss
index e0de7acc..747a2eb7 100644
--- a/src/sass/types/video.scss
+++ b/src/sass/types/video.scss
@@ -2,6 +2,8 @@
// Video styles
// --------------------------------------------------------------
+@use 'sass:math';
+
// Container
.plyr--video {
background: var(--plyr-video-background, $plyr-video-background);
@@ -14,6 +16,7 @@
.plyr__video-wrapper {
background: var(--plyr-video-background, $plyr-video-background);
+ height: 100%;
margin: auto;
overflow: hidden;
position: relative;
@@ -21,7 +24,7 @@
}
// Default to 16:9 ratio but this is set by JavaScript based on config
-$embed-padding: ((100 / 16) * 9);
+$embed-padding: (math.div(100, 16) * 9);
.plyr__video-embed,
.plyr__video-wrapper--fixed-ratio {
@@ -47,7 +50,8 @@ $embed-padding: ((100 / 16) * 9);
// For Vimeo, if the full custom UI is supported
.plyr--full-ui .plyr__video-embed > .plyr__video-embed__container {
$height: 240;
- $offset: to-percentage(($height - $embed-padding) / ($height / 50));
+ $offset: to-percentage(math.div($height - $embed-padding, math.div($height, 50)));
+
padding-bottom: to-percentage($height);
position: relative;
transform: translateY(-$offset);