diff options
author | Sam Potts <sam@potts.es> | 2017-12-20 15:14:05 +0000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2017-12-20 15:14:05 +0000 |
commit | 6864149989c6a5b1bb6e9199e1f8af062c64dcc4 (patch) | |
tree | 283649e596f5a81780fabe3603bb0be7d0d47485 /src/sass/components/embed.scss | |
parent | aab53fa91fded2babdef8c3529a0ff1203f92f97 (diff) | |
download | plyr-6864149989c6a5b1bb6e9199e1f8af062c64dcc4.tar.lz plyr-6864149989c6a5b1bb6e9199e1f8af062c64dcc4.tar.xz plyr-6864149989c6a5b1bb6e9199e1f8af062c64dcc4.zip |
Converted to SASS/SCSS
Diffstat (limited to 'src/sass/components/embed.scss')
-rw-r--r-- | src/sass/components/embed.scss | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/sass/components/embed.scss b/src/sass/components/embed.scss new file mode 100644 index 00000000..b5d464f6 --- /dev/null +++ b/src/sass/components/embed.scss @@ -0,0 +1,35 @@ +// -------------------------------------------------------------- +// Embedded players +// YouTube, Vimeo, etc +// -------------------------------------------------------------- + +.plyr__video-embed { + // 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)); + + height: 0; + padding-bottom: percentage($padding); + + iframe { + border: 0; + height: 100%; + left: 0; + position: absolute; + top: 0; + user-select: none; + width: 100%; + } + + // Vimeo hack + > div { + padding-bottom: percentage($height); + position: relative; + transform: translateY(-$offset); + } +} +// To allow mouse events to be captured if full support +.plyr--full-ui .plyr__video-embed iframe { + pointer-events: none; +} |