FIX: Enforce a fixed height on generic oneboxed videos

This prevents 'jumping' as the video loads. This change will require posts to be rebaked before it takes effect.
This commit is contained in:
David Taylor 2019-01-08 16:22:03 +00:00
parent a2d1babac6
commit fe20cb4b56
3 changed files with 16 additions and 3 deletions

View File

@ -36,7 +36,7 @@ gem 'redis-namespace'
gem 'active_model_serializers', '~> 0.8.3'
gem 'onebox', '1.8.73'
gem 'onebox', '1.8.74'
gem 'http_accept_language', '~>2.0.5', require: false

View File

@ -258,7 +258,7 @@ GEM
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
onebox (1.8.73)
onebox (1.8.74)
htmlentities (~> 4.3)
moneta (~> 1.0)
multi_json (~> 1.11)
@ -512,7 +512,7 @@ DEPENDENCIES
omniauth-oauth2
omniauth-openid
omniauth-twitter
onebox (= 1.8.73)
onebox (= 1.8.74)
openid-redis-store
pg
pry-nav

View File

@ -565,3 +565,16 @@ aside.onebox.stackexchange .onebox-body {
.onebox.google-photos-album {
@extend .imgur-album;
}
// Force oneboxed videos to 16:9 aspect ratio
.onebox.video-onebox {
position: relative;
padding: 0 0 56.25% 0;
width: 100%;
video {
position: absolute;
width: 100%;
height: 100%;
}
}