mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-28 23:59:53 +02:00
Switch from list to map for responsive embeds (#28678)
This commit is contained in:
committed by
XhmikosR
parent
be2ad67786
commit
a776cc473d
@@ -27,13 +27,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
@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} {
|
||||
@each $key, $ratio in $embed-responsive-aspect-ratios {
|
||||
.embed-responsive-#{$key} {
|
||||
&::before {
|
||||
padding-top: percentage($embed-responsive-aspect-ratio-y / $embed-responsive-aspect-ratio-x);
|
||||
padding-top: percentage(map-get($ratio, y) / map-get($ratio, x));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user