From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- .../lib/bootstrap/scss/utilities/_embed.scss | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 addons/web/static/lib/bootstrap/scss/utilities/_embed.scss (limited to 'addons/web/static/lib/bootstrap/scss/utilities/_embed.scss') diff --git a/addons/web/static/lib/bootstrap/scss/utilities/_embed.scss b/addons/web/static/lib/bootstrap/scss/utilities/_embed.scss new file mode 100644 index 00000000..4497ac04 --- /dev/null +++ b/addons/web/static/lib/bootstrap/scss/utilities/_embed.scss @@ -0,0 +1,39 @@ +// Credit: Nicolas Gallagher and SUIT CSS. + +.embed-responsive { + position: relative; + display: block; + width: 100%; + padding: 0; + overflow: hidden; + + &::before { + display: block; + content: ""; + } + + .embed-responsive-item, + iframe, + embed, + object, + video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; + } +} + +@each $embed-responsive-aspect-ratio in $embed-responsive-aspect-ratios { + $embed-responsive-aspect-ratio-x: nth($embed-responsive-aspect-ratio, 1); + $embed-responsive-aspect-ratio-y: nth($embed-responsive-aspect-ratio, 2); + + .embed-responsive-#{$embed-responsive-aspect-ratio-x}by#{$embed-responsive-aspect-ratio-y} { + &::before { + padding-top: percentage($embed-responsive-aspect-ratio-y / $embed-responsive-aspect-ratio-x); + } + } +} -- cgit v1.2.3