/

Aspect ratio

https://www.bram.us/2020/11/30/native-aspect-ratio-boxes-in-css-thanks-to-aspect-ratio
css
css
/* Old, hacky way */
.parent {
padding-top: 56.25%;
}
/* New, cool way */
.parent {
aspect-ratio: 16 / 9;
/* or for square things */
aspect-ratio: 1 / 1;
}
Edit this page
Want to make your own site like this?
Try gatsby-theme-code-notes by Zander Martineau.
Notes on code. My second brain, by Zander Martineau.