1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-21 20:55:50 +02:00

Allow to add more embed responsive ratios (#25894)

This commit is contained in:
Martijn Cuppens
2018-11-11 10:04:04 +01:00
committed by XhmikosR
parent 9836a411e8
commit 976efcd5ee
3 changed files with 30 additions and 21 deletions

View File

@@ -25,7 +25,7 @@ Wrap any embed like an `<iframe>` in a parent element with `.embed-responsive` a
## Aspect ratios
Aspect ratios can be customized with modifier classes.
Aspect ratios can be customized with modifier classes. By default the following ratio classes are provided:
{% highlight html %}
<!-- 21:9 aspect ratio -->
@@ -48,3 +48,14 @@ Aspect ratios can be customized with modifier classes.
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
{% endhighlight %}
Within `_variables.scss`, you can change the aspect ratios you want to use. Here's an example of the `$embed-responsive-aspect-ratios` list:
{% highlight scss %}
$embed-responsive-aspect-ratios: (
(21 9),
(16 9),
(3 4),
(1 1)
) !default;
{% endhighlight %}