.emacs.d

My Emacs configuration files.
Log | Files | Refs | README

commit 6ee7bbab72382fe58888c7739f435bd09ac6c79b
parent 804e6b3aae76b885b5fa7336eaa0443c22059182
Author: Hugo Soucy <hugo.soucy@toumoro.com>
Date:   Tue,  8 Oct 2019 10:33:46 -0400

Add a new html/css snippet for responsive iframe

Diffstat:
Asnippets/web-mode/iframe-responsive | 33+++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+), 0 deletions(-)

diff --git a/snippets/web-mode/iframe-responsive b/snippets/web-mode/iframe-responsive @@ -0,0 +1,33 @@ +# -*- mode: snippet -*- +# name: Responsive iframe embeded video (HTML/CSS) +# key: iframe-responsive +# -- + +<style> + .iframe-rwd { + overflow: hidden; + padding: 56.25% 0 0 0; + position: relative; + } + + .iframe-rwd__iframe { + border: 0; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; + } +</style> + +<div class="iframe-rwd"> + <iframe + allow="fullscreen" + allowfullscreen + class="iframe-rwd__iframe" + frameborder="0" + height="360" + src="${1:https://player.vimeo.com/video/25805461}" + width="640"> + </iframe> +</div>