From 9e07ff04a939b93f6caa2107bd31ae9f28b14380 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Mon, 3 Jul 2017 11:27:47 +0200 Subject: [PATCH] Make videos responsive Embeds are now sandboxed. This broke our responsive video trick. We should restore this in some way. This PR is a work in progress. --- blocks/library/embed/style.scss | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/blocks/library/embed/style.scss b/blocks/library/embed/style.scss index f238164fcded7..d8df9b0849b36 100644 --- a/blocks/library/embed/style.scss +++ b/blocks/library/embed/style.scss @@ -17,18 +17,26 @@ } } - &.is-video > div:first-child { + &.is-video { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; /* 16:9 */ + margin-bottom: 2em; } - &.is-video > div > iframe { + &.is-video > iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + &.is-video > .blocks-editable { + position: absolute; + bottom: 0; + left: 0; + right: 0; + } }