From 58417a3cd5e6deaa34c3df97452e9ced454d0c59 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Sun, 20 Nov 2016 16:07:47 +0100 Subject: [PATCH] Add facility to embed videos with dynamic scaling --- source/stylesheets/application.css.scss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/stylesheets/application.css.scss b/source/stylesheets/application.css.scss index b9acf51..6c1d27d 100644 --- a/source/stylesheets/application.css.scss +++ b/source/stylesheets/application.css.scss @@ -86,3 +86,18 @@ figcaption { float: right; text-align: right; } + +// From https://www.ostraining.com/blog/coding/responsive-videos/ +.video-responsive { + overflow:hidden; + padding-bottom:56.25%; + position:relative; + height:0; +} +.video-responsive iframe { + left:0; + top:0; + height:100%; + width:100%; + position:absolute; +}