Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ratio); add ratio for portrait videos #775 #906

Merged
merged 4 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,8 @@ $aspect-ratios: (
"1x1": 100%,
"4x3": calc(3 / 4 * 100%),
"16x9": calc(9 / 16 * 100%),
"21x9": calc(9 / 21 * 100%)
"21x9": calc(9 / 21 * 100%),
"9x16": calc(16 / 9 * 100%) // Boosted mod: additional ratio for portait videos
) !default;
// scss-docs-end aspect-ratios
// stylelint-enable function-disallowed-list
Expand Down
2 changes: 1 addition & 1 deletion site/assets/scss/_component-examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
.bd-example-ratios {
.ratio {
display: inline-block;
width: 10rem;
width: 9rem; // Boosted mod
font-weight: $font-weight-bold; // Boosted mod
color: $gray-800; // Boosted mod
background-color: $gray-400; // Boosted mod
Expand Down
3 changes: 3 additions & 0 deletions site/content/docs/5.1/helpers/ratio.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ Wrap any embed, like an `<iframe>`, in a parent element with `.ratio` and an asp
Aspect ratios can be customized with modifier classes. By default the following ratio classes are provided:

{{< example class="bd-example-ratios" >}}
<div class="ratio ratio-9x16">
<div>9x16</div>
</div>
<div class="ratio ratio-1x1">
<div>1x1</div>
</div>
Expand Down