--- layout: docs title: Aspect ratio description: Use the `aspect-ratio` property to make an element maintain the aspect ratio of your choosing. Ideal for responsively handling video or slideshow embeds based on the width of the parent. group: utilities toc: true --- Use the ratio utility to manage the aspect ratios of content like ` {{< /example >}} ## Aspect ratios A handful of aspect ratio classes are provided by default, generated via the utility API and the `$aspect-ratios` Sass variable. {{< example class="bd-example-ratios d-flex flex-column align-start" >}}
Auto
1x1
4x3
16x9
21x9
{{< /example >}} ## Sass maps Within `_variables.scss`, you can change the aspect ratios you want to use. Here's our default `$aspect-ratios` map. Modify the map as you like and recompile your Sass to put them to use. {{< scss-docs name="aspect-ratios" file="scss/_variables.scss" >}}