Fix thumbnail height in CSS only, no html attr. Don't h-stretch.
This commit is contained in:
		
							parent
							
								
									f5a126d3bc
								
							
						
					
					
						commit
						45091c6596
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		|  | @ -26,6 +26,7 @@ | ||||||
| { | { | ||||||
|     position: relative; |     position: relative; | ||||||
|     display: inline-grid; |     display: inline-grid; | ||||||
|  |     vertical-align: top; | ||||||
|     grid-template-columns: auto auto; |     grid-template-columns: auto auto; | ||||||
|     grid-template-rows: auto 1fr auto; |     grid-template-rows: auto 1fr auto; | ||||||
|     grid-template-areas: |     grid-template-areas: | ||||||
|  | @ -52,10 +53,15 @@ | ||||||
|     grid-area: thumbnail; |     grid-area: thumbnail; | ||||||
|     align-self: start; |     align-self: start; | ||||||
|     justify-self: center; |     justify-self: center; | ||||||
|  |     display: flex; | ||||||
|  |     width: 100%; | ||||||
|  |     height: 150px; | ||||||
| } | } | ||||||
| .photo_card_thumbnail img | .photo_card_thumbnail img | ||||||
| { | { | ||||||
|     max-width: 100%; |     max-width: 100%; | ||||||
|  |     max-height: 100%; | ||||||
|  |     margin: auto; | ||||||
| } | } | ||||||
| .photo_card_filename | .photo_card_filename | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -58,7 +58,7 @@ | ||||||
| 
 | 
 | ||||||
| <div class="photo_card photo_card_grid" data-id="{{photo.id}}"> | <div class="photo_card photo_card_grid" data-id="{{photo.id}}"> | ||||||
|     <a class="photo_card_thumbnail" target="_blank" href="/photo/{{photo.id}}"> |     <a class="photo_card_thumbnail" target="_blank" href="/photo/{{photo.id}}"> | ||||||
|         <img height="150" src="{{thumbnail_src}}"> |         <img src="{{thumbnail_src}}"> | ||||||
|     </a> |     </a> | ||||||
| 
 | 
 | ||||||
|     <div class="photo_card_filename"> |     <div class="photo_card_filename"> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue