Skip to content

Commit

Permalink
auto resize post thumbnail images (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
tangh authored and LouisBarranqueiro committed Dec 16, 2018
1 parent 65bebd1 commit c0c5fa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/_css/components/_postShorten.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@
margin: 15px 0 15px 0;

img {
width: auto;
height: auto;
width: 100%;
height: auto;
max-height: $post-bottom-thumbnail-image-max-height;
object-fit: cover;
}
}
}
}
}
1 change: 1 addition & 0 deletions source/_css/utils/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ $pagination-height: 60px;
// Post thumbnail image
// Width and height of post's thumbnail image
$post-thumbnail-image-width: 140px;
$post-bottom-thumbnail-image-max-height: 250px;

// Tooltip
$tooltip: (
Expand Down

0 comments on commit c0c5fa4

Please sign in to comment.