Add responsive embed class for 1:1 aspect ratio

Closes #18141
This commit is contained in:
Richard Kraaijenhagen 2015-11-23 19:50:38 -08:00 committed by Chris Rebert
parent 569f86051e
commit c960169807
2 changed files with 9 additions and 0 deletions

View File

@ -328,4 +328,9 @@ Aspect ratios can be customized with modifier classes.
<div class="embed-responsive embed-responsive-4by3"> <div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="..."></iframe> <iframe class="embed-responsive-item" src="..."></iframe>
</div> </div>
<!-- 1:1 aspect ratio -->
<div class="embed-responsive embed-responsive-1by1">
<iframe class="embed-responsive-item" src="..."></iframe>
</div>
{% endhighlight %} {% endhighlight %}

View File

@ -33,3 +33,7 @@
.embed-responsive-4by3 { .embed-responsive-4by3 {
padding-bottom: percentage(3 / 4); padding-bottom: percentage(3 / 4);
} }
.embed-responsive-1by1 {
padding-bottom: percentage(1 / 1);
}