diff options
Diffstat (limited to 'vendor/twbs/bootstrap/scss/utilities/_embed.scss')
-rw-r--r-- | vendor/twbs/bootstrap/scss/utilities/_embed.scss | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/vendor/twbs/bootstrap/scss/utilities/_embed.scss b/vendor/twbs/bootstrap/scss/utilities/_embed.scss index d3362b6fd..4497ac040 100644 --- a/vendor/twbs/bootstrap/scss/utilities/_embed.scss +++ b/vendor/twbs/bootstrap/scss/utilities/_embed.scss @@ -27,26 +27,13 @@ } } -.embed-responsive-21by9 { - &::before { - padding-top: percentage(9 / 21); - } -} - -.embed-responsive-16by9 { - &::before { - padding-top: percentage(9 / 16); - } -} - -.embed-responsive-4by3 { - &::before { - padding-top: percentage(3 / 4); - } -} +@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-1by1 { - &::before { - padding-top: percentage(1 / 1); + .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); + } } } |