diff options
author | Sam Potts <sam@potts.es> | 2018-08-01 00:41:48 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-01 00:41:48 +1000 |
commit | fa0861ff2e9b22e361ada7b1fb9ff45c0378464e (patch) | |
tree | 6464b454b81c18d3b37fd1c1d5b6f6908be5b6cd /src | |
parent | e3dfd160965d09fa3aee517f0a7aefe17c9dd69b (diff) | |
parent | 9488de30e5ec5363a9fa3298c846a5ba100e4dbb (diff) | |
download | plyr-fa0861ff2e9b22e361ada7b1fb9ff45c0378464e.tar.lz plyr-fa0861ff2e9b22e361ada7b1fb9ff45c0378464e.tar.xz plyr-fa0861ff2e9b22e361ada7b1fb9ff45c0378464e.zip |
Merge pull request #1141 from friday/1137
Improve captions positioning consistency
Diffstat (limited to 'src')
-rw-r--r-- | src/sass/components/captions.scss | 7 | ||||
-rw-r--r-- | src/sass/components/controls.scss | 13 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/sass/components/captions.scss b/src/sass/components/captions.scss index 8fce581a..1cfca92e 100644 --- a/src/sass/components/captions.scss +++ b/src/sass/components/captions.scss @@ -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)); } + diff --git a/src/sass/components/controls.scss b/src/sass/components/controls.scss index d06cb232..65b7554c 100644 --- a/src/sass/components/controls.scss +++ b/src/sass/components/controls.scss @@ -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); - } -} |