Vimeo fix

This commit is contained in:
Sam Potts
2017-12-21 00:20:56 +00:00
parent 178b0d8020
commit 98ac98b4c2
8 changed files with 16 additions and 9 deletions

View File

@ -7,10 +7,10 @@
// Default to 16:9 ratio but this is set by JavaScript based on config
$padding: ((100 / 16) * 9);
$height: 200;
$offset: percentage(($height - $padding) / ($height / 50));
$offset: to-percentage(($height - $padding) / ($height / 50));
height: 0;
padding-bottom: percentage($padding);
padding-bottom: to-percentage($padding);
iframe {
border: 0;
@ -24,7 +24,7 @@
// Vimeo hack
> div {
padding-bottom: percentage($height);
padding-bottom: to-percentage($height);
position: relative;
transform: translateY(-$offset);
}

View File

@ -0,0 +1,7 @@
// ==========================================================================
// Useful functions
// ==========================================================================
@function to-percentage($input) {
@return $input * 1%;
}

View File

@ -1,6 +1,5 @@
// ==========================================================================
// Plyr mixins
// https://github.com/sampotts/plyr
// Mixins
// ==========================================================================
// Nicer focus styles

View File

@ -19,6 +19,7 @@
@import 'settings/tooltips';
@import 'lib/animation';
@import 'lib/functions';
@import 'lib/mixins';
@import 'base';