tiles.scss 1.36 KB
.tiles{
  display: grid;
  grid-template-columns: auto auto auto;
  column-width: 33%;
  column-gap: 0px;
  grid-auto-flow: dense;
  grid-template-rows: masonry;
  margin-top: 40px;
  max-width: 100vw;
  margin: auto;
  transition: .5s;
  background: #333;
}
.tile {
  display:  inline-grid;
  margin: 0px;
  cursor: pointer;
  text-align: center;
  background: #333;
  vertical-align: top;
  grid-column-end: span 1;
  grid-row-end: span 1;
  .tile_image{    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 275px;
    width: 100%;
  }
  .hover_content{
    opacity: 0;
  }
  .tile_content{
    display: none;
  }
}


.tile:hover {
  .hover_content{
    opacity: 1;
    background-color: rgba(0,0,0,0.6);
    height: 100%;
  }
}




.tile.expand {
  grid-column-end: span 2;
  grid-row-end: span 2;
  .hover_content{
    display: none;
  }
  .tile_content{
    margin-top: -16px;
    display: block;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
  }
  .tile_image{  
    height: 550px;
  }
}

.tile.expand:hover {
  .hover_content{
    display: none;
  }
   .tile_content{
    display: block;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
  }
}

// .last-expand{
//   .tile:nth-of-type(4){

//     grid-column-end:2;
//   }

//   .tile:nth-of-type(5){
//     grid-row-end:  4;
//     grid-column-end:2;
//   }
// }