Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Blogger – Scale Home Page Post Thumbnails Instead of Cropped Thumbnails? Reply To: Blogger – Scale Home Page Post Thumbnails Instead of Cropped Thumbnails?

#265392
orca
Participant

I’ve posted the the xhtml file for the template within a temporary Blogger post here:

http://temporary51.blogspot.com/2018/01/notable-template.html

I’ve attempted to modify code with references “thumbnail” but did not have any success:

This occurs first:

.post-outer .snippet-thumbnail {
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  background: #000;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 auto;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
  height: 256px;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  margin-$endSide: 136px;
  overflow: hidden;
  -webkit-box-ordinal-group: 3;
  -webkit-order: 2;
      -ms-flex-order: 2;
          order: 2;
  position: relative;
  width: 256px;
}

.post-outer .thumbnail-empty {
  background: transparent;
}

.post-outer .snippet-thumbnail-img {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  width: 100%;
  height: 100%;
}

.post-outer .snippet-thumbnail img {
  max-height: 100%;
}

This is farther down in the xhtml under this media query

@media screen and (max-width: 1168px) {
  .centered-top-container,
  .centered-top-placeholder {
    padding: 24px 24px 32px 24px;
  }
  .post-outer .snippet-thumbnail {
    width: 920px;
    height: 613.33333px;
    margin-bottom: 16px;
  }
  .post-outer .snippet-thumbnail.thumbnail-empty {
    display: none;

This is farther down in the xhtml under this media query

@media screen and (max-width: 968px) {
  body {
    font-size: $(body.text.font.size * 14 / 20);
  }
  .post-outer .snippet-thumbnail {
    width: 100%;
    height: calc((100vw - 48px) * 2 / 3);
  }

It appears the code may producing cropped thumbnails of the original image and then stretching those to fit the thumbnail’s parent area.

Here’s the homepage of the temporary blog with a post containing a image:

http://temporary51.blogspot.com