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