Sha256: cd03a6e4702ac348e9ce130cf8094ce2485259c7f78283439897813e9d59cb60

Contents?: true

Size: 1.43 KB

Versions: 9

Compression:

Stored size: 1.43 KB

Contents

.media-grid {
  @include list-unstyled;
  @include make-row;

  li {
    position: relative;
    width: 100%;

    padding-right: $grid-gutter-width / 2;
    padding-left: $grid-gutter-width / 2;

    @include make-col(6);

    @include media-breakpoint-up(md) {
      @include make-col(4);
    }

    @include media-breakpoint-up(xl) {
      @include make-col(3);
    }

    margin-bottom: 20px;
  }

  figure {
    margin: 0;

    @include aspect-ratio(4 / 3);

    background: #eee;
    overflow: hidden;

    display: flex;
    align-items: center;

    img {
      @include fill-area;
      object-fit: contain;
    }
  }

  figure.fill {
    img {
      object-fit: cover;
    }
  }

  figure.zoom {
    img {
      transition: transform 250ms;
    }

    &:hover img {
      transform: scale(1.05);
    }
  }

  a {
    cursor: zoom-in;
  }
}

.media-grid-sm {
  li {
    @include make-col(4);

    @include media-breakpoint-up(md) {
      @include make-col(3);
    }

    @include media-breakpoint-up(lg) {
      @include make-col(2);
    }
  }
}

.media-grid-lg {
  li {
    @include make-col(12);

    @include media-breakpoint-up(sm) {
      @include make-col(6);
    }

    @include media-breakpoint-up(lg) {
      @include make-col(4);
    }
  }
}

@include media-breakpoint-down(sm) {
  .media-grid {
    margin-left: -5px;
    margin-right: -5px;

    li {
      padding-left: 5px;
      padding-right: 5px;

      margin-bottom: 10px;
    }
  }
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trestle-0.9.8 frontend/css/components/_media-grid.scss
trestle-0.9.7 frontend/css/components/_media-grid.scss
trestle-0.9.6 frontend/css/components/_media-grid.scss
trestle-0.9.5 frontend/css/components/_media-grid.scss
trestle-0.9.4 frontend/css/components/_media-grid.scss
trestle-0.9.3 frontend/css/components/_media-grid.scss
trestle-0.9.2 frontend/css/components/_media-grid.scss
trestle-0.9.1 frontend/css/components/_media-grid.scss
trestle-0.9.0 frontend/css/components/_media-grid.scss