2014-03-07 07:18:13 +00:00
|
|
|
// Credit: Nicolas Gallagher and SUIT CSS.
|
|
|
|
|
|
|
|
.embed-responsive {
|
|
|
|
position: relative;
|
2016-04-15 08:40:51 +00:00
|
|
|
width: 100%;
|
2014-03-07 07:18:13 +00:00
|
|
|
|
2016-04-15 08:40:51 +00:00
|
|
|
&::before {
|
|
|
|
display: block;
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
|
2014-03-07 07:18:13 +00:00
|
|
|
.embed-responsive-item,
|
|
|
|
iframe,
|
|
|
|
embed,
|
2014-09-26 20:45:28 +00:00
|
|
|
object,
|
|
|
|
video {
|
2014-03-07 07:18:13 +00:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
2014-12-11 20:05:29 +00:00
|
|
|
left: 0;
|
2014-03-07 07:18:13 +00:00
|
|
|
width: 100%;
|
2014-12-11 20:05:29 +00:00
|
|
|
height: 100%;
|
2014-03-07 07:18:13 +00:00
|
|
|
border: 0;
|
|
|
|
}
|
2015-02-02 17:26:30 +00:00
|
|
|
}
|
2014-03-07 07:18:13 +00:00
|
|
|
|
2019-05-05 07:41:27 +00:00
|
|
|
@each $key, $ratio in $embed-responsive-aspect-ratios {
|
|
|
|
.embed-responsive-#{$key} {
|
2018-11-11 09:04:04 +00:00
|
|
|
&::before {
|
2019-05-05 07:41:27 +00:00
|
|
|
padding-top: percentage(map-get($ratio, y) / map-get($ratio, x));
|
2018-11-11 09:04:04 +00:00
|
|
|
}
|
2016-04-15 08:40:51 +00:00
|
|
|
}
|
2015-11-24 03:50:38 +00:00
|
|
|
}
|