2014-03-06 23:18:13 -08:00
|
|
|
// Credit: Nicolas Gallagher and SUIT CSS.
|
|
|
|
|
|
|
|
.embed-responsive {
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
2016-04-15 01:40:51 -07:00
|
|
|
width: 100%;
|
2014-03-06 23:18:13 -08:00
|
|
|
padding: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
|
2016-04-15 01:40:51 -07:00
|
|
|
&::before {
|
|
|
|
display: block;
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
|
2014-03-06 23:18:13 -08:00
|
|
|
.embed-responsive-item,
|
|
|
|
iframe,
|
|
|
|
embed,
|
2014-09-26 13:45:28 -07:00
|
|
|
object,
|
|
|
|
video {
|
2014-03-06 23:18:13 -08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
2014-12-11 12:05:29 -08:00
|
|
|
left: 0;
|
2014-03-06 23:18:13 -08:00
|
|
|
width: 100%;
|
2014-12-11 12:05:29 -08:00
|
|
|
height: 100%;
|
2014-03-06 23:18:13 -08:00
|
|
|
border: 0;
|
|
|
|
}
|
2015-02-02 19:26:30 +02:00
|
|
|
}
|
2014-03-06 23:18:13 -08:00
|
|
|
|
2018-11-11 10:04:04 +01:00
|
|
|
@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);
|
2015-11-23 19:50:38 -08:00
|
|
|
|
2018-11-11 10:04:04 +01:00
|
|
|
.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);
|
|
|
|
}
|
2016-04-15 01:40:51 -07:00
|
|
|
}
|
2015-11-23 19:50:38 -08:00
|
|
|
}
|