Started on documentation and aspect ratio option

This commit is contained in:
Sam Potts
2017-11-06 19:38:31 +11:00
parent 5fe477340b
commit 0068710740
14 changed files with 159 additions and 108 deletions

View File

@ -4,7 +4,11 @@
// --------------------------------------------------------------
.plyr__video-embed {
padding-bottom: 56.25%; /* 16:9 */
// Default to 16:9 ratio but this is set by JavaScript based on config
@padding: ((100 / 16) * 9);
@offset: unit((100 - @padding) / 2, ~'%');
padding-bottom: unit(@padding, ~'%');
height: 0;
iframe {
@ -20,8 +24,8 @@
// Vimeo hack
> div {
position: relative;
padding-bottom: 200%;
transform: translateY(-35.95%);
padding-bottom: 100%;
transform: translateY(-@offset);
}
}
// To allow mouse events to be captured if full support