love using object-fit: cover; when appropriate. I work a lot with image grids and random crops (thanks editors!) so we gotta make sure it looks decent across the board
yes pretty much! it is very helpful to preserve aspect ratio for both images and video.
so lets say you have a 2:1 image (and you cannot crop it down manually or via some upload tool) you can use object-fit: cover - so if the container that holds the image is a 1:1, it will not distort but in fact crop outside of the container.
love using
object-fit: cover;
when appropriate. I work a lot with image grids and random crops (thanks editors!) so we gotta make sure it looks decent across the boardHi, Artem! Can you give more detail on what
object-fit: cover
accomplishes? (In my head, it kinda sounds like cover background image positioning)yes pretty much! it is very helpful to preserve aspect ratio for both images and video.
so lets say you have a 2:1 image (and you cannot crop it down manually or via some upload tool) you can use
object-fit: cover
- so if the container that holds the image is a 1:1, it will not distort but in fact crop outside of the container.Cool!