0

I try to understand how medium calculates the the image sizes in their latest list. What I understand is that the image is positioned absolute and sizes are coming from the .aspectRatioPlaceholder-fill div, which has a 30% padding-bottom.

What I don’t understand, where does the height for calculating the 30% come from ? Can anyone help here out? Thx!

Here is the link: https://medium.com/cinemania

enter image description here

user7646471
  • 352
  • 3
  • 11

1 Answers1

0

A vertical padding set in percent is calculated on the elements width. That is really useful in using aspect ratios for elements. https://css-tricks.com/aspect-ratio-boxes/

thomic
  • 16
  • 3