Merge pull request #1141 from friday/1137

Improve captions positioning consistency
This commit is contained in:
Sam Potts 2018-08-01 00:41:48 +10:00 committed by GitHub
commit fa0861ff2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 11 deletions

View File

@ -17,7 +17,6 @@
padding: $plyr-control-spacing;
position: absolute;
text-align: center;
transform: translateY(-($plyr-control-spacing * 4));
transition: transform 0.4s ease-in-out;
width: 100%;
@ -53,6 +52,8 @@
display: block;
}
.plyr--hide-controls .plyr__captions {
transform: translateY(-($plyr-control-spacing * 1.5));
// If the lower controls are shown and not empty
.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty) ~ .plyr__captions {
transform: translateY(-($plyr-control-spacing * 4));
}

View File

@ -2,6 +2,11 @@
// Controls
// --------------------------------------------------------------
// Hide empty controls
.plyr__controls:empty {
display: none;
}
// Hide native controls
.plyr--full-ui ::-webkit-media-controls {
display: none;
@ -109,11 +114,3 @@
.plyr--fullscreen-enabled [data-plyr='fullscreen'] {
display: inline-block;
}
.plyr__controls:empty {
display: none;
~ .plyr__captions {
transform: translateY(0);
}
}