/

Aspect ratio

https://twitter.com/Una/status/1260980901934137345
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.