Fix tall aspect-ratio images getting squashed (#16554)

* Fix tall aspect-ratio images getting squashed 

When the `max-height` kicks in, the `width` attribute needs to be overridden, just like `max-width` needs `height: auto`.

* Prefer `object-fit` to `width`

Avoids clashing with GIF-pausing library that sets `.ff-container`

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
This commit is contained in:
Taylor Hunt 2022-02-15 10:04:06 -05:00 committed by GitHub
parent 7238d56a04
commit b61e238f8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -269,6 +269,7 @@ body {
video,
.ff-container {
height: auto;
object-fit: contain;
display: block;
margin: var(--content-rhythm) auto;
max-width: 100%;