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:
parent
3e72029908
commit
bfe11cccd5
1 changed files with 6 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue