From 784f36921b1ed02e4f1d0d42f6ed2e0229ec6a2c Mon Sep 17 00:00:00 2001 From: Roland Date: Tue, 24 Aug 2021 14:30:13 +0200 Subject: [PATCH] Update video.scss (#2296) --- src/sass/types/video.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sass/types/video.scss b/src/sass/types/video.scss index e0de7acc..d8897c97 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); @@ -21,7 +23,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 +49,7 @@ $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);