Finally improve photo thumbnail css to reduce use of 150px constant.

I've attempted this so many times and always failed. object-fit:contain
and minmax(0, fr) was the solution.
This commit is contained in:
voussoir 2021-10-31 16:15:57 -07:00
parent 3e72029908
commit bfe11cccd5
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -160,8 +160,8 @@
display: inline-grid;
vertical-align: top;
grid-template:
"thumbnail thumbnail" auto
"filename filename" 1fr
"thumbnail thumbnail" minmax(0, 1fr)
"filename filename" 50px
"tags metadata" auto
/10px auto;
min-width: 150px;
@ -194,12 +194,13 @@
justify-content: center;
align-items: center;
width: 100%;
height: 150px;
height: 100%;
}
.photo_card_grid .photo_card_thumbnail img
{
max-width: 100%;
max-height: 150px;
width: 100%;
height: 100%;
object-fit: contain;
}
.photo_card_filename