diff options
author | Sam Potts <sam@potts.es> | 2017-12-21 00:20:56 +0000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2017-12-21 00:20:56 +0000 |
commit | 98ac98b4c2c1e1bf9e6b5352e042187a12e4e9d1 (patch) | |
tree | a7a0df83d4c227375d9e3488d5fe625b15844c0f /src | |
parent | 178b0d802001dc59497658d2c4357ad9049e5d6c (diff) | |
download | plyr-98ac98b4c2c1e1bf9e6b5352e042187a12e4e9d1.tar.lz plyr-98ac98b4c2c1e1bf9e6b5352e042187a12e4e9d1.tar.xz plyr-98ac98b4c2c1e1bf9e6b5352e042187a12e4e9d1.zip |
Vimeo fix
Diffstat (limited to 'src')
-rw-r--r-- | src/sass/components/embed.scss | 6 | ||||
-rw-r--r-- | src/sass/lib/functions.scss | 7 | ||||
-rw-r--r-- | src/sass/lib/mixins.scss | 3 | ||||
-rw-r--r-- | src/sass/plyr.scss | 1 |
4 files changed, 12 insertions, 5 deletions
diff --git a/src/sass/components/embed.scss b/src/sass/components/embed.scss index b5d464f6..d9349052 100644 --- a/src/sass/components/embed.scss +++ b/src/sass/components/embed.scss @@ -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); } diff --git a/src/sass/lib/functions.scss b/src/sass/lib/functions.scss new file mode 100644 index 00000000..a99a1b80 --- /dev/null +++ b/src/sass/lib/functions.scss @@ -0,0 +1,7 @@ +// ========================================================================== +// Useful functions +// ========================================================================== + +@function to-percentage($input) { + @return $input * 1%; +} diff --git a/src/sass/lib/mixins.scss b/src/sass/lib/mixins.scss index 67734701..59b693cf 100644 --- a/src/sass/lib/mixins.scss +++ b/src/sass/lib/mixins.scss @@ -1,6 +1,5 @@ // ========================================================================== -// Plyr mixins -// https://github.com/sampotts/plyr +// Mixins // ========================================================================== // Nicer focus styles diff --git a/src/sass/plyr.scss b/src/sass/plyr.scss index c6dd3678..2a01a561 100644 --- a/src/sass/plyr.scss +++ b/src/sass/plyr.scss @@ -19,6 +19,7 @@ @import 'settings/tooltips'; @import 'lib/animation'; +@import 'lib/functions'; @import 'lib/mixins'; @import 'base'; |