diff options
Diffstat (limited to 'assets/stylesheets/bootstrap/utilities/_embed.scss')
-rw-r--r-- | assets/stylesheets/bootstrap/utilities/_embed.scss | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/assets/stylesheets/bootstrap/utilities/_embed.scss b/assets/stylesheets/bootstrap/utilities/_embed.scss index d3362b6..4497ac0 100644 --- a/assets/stylesheets/bootstrap/utilities/_embed.scss +++ b/assets/stylesheets/bootstrap/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); + } } } |