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; |     display: inline-grid; | ||||||
|     vertical-align: top; |     vertical-align: top; | ||||||
|     grid-template: |     grid-template: | ||||||
|         "thumbnail thumbnail" auto |         "thumbnail thumbnail" minmax(0, 1fr) | ||||||
|         "filename  filename" 1fr |         "filename  filename" 50px | ||||||
|         "tags      metadata" auto |         "tags      metadata" auto | ||||||
|         /10px      auto; |         /10px      auto; | ||||||
|     min-width: 150px; |     min-width: 150px; | ||||||
|  | @ -194,12 +194,13 @@ | ||||||
|     justify-content: center; |     justify-content: center; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     height: 150px; |     height: 100%; | ||||||
| } | } | ||||||
| .photo_card_grid .photo_card_thumbnail img | .photo_card_grid .photo_card_thumbnail img | ||||||
| { | { | ||||||
|     max-width: 100%; |     width: 100%; | ||||||
|     max-height: 150px; |     height: 100%; | ||||||
|  |     object-fit: contain; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .photo_card_filename | .photo_card_filename | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue