radiodraws
10/20/2017 - 9:24 AM

dinamic vertical align in box css / sass with flex cross browser

dinamic vertical align in box css / sass with flex cross browser

@mixin cell($align) {
  display: table;
  width: 100%;
  &>* {
    display: table-cell;
    vertical-align: $align;
  }
}

.boxes-type9 {
  a {
    display: block;
    position: relative;
    height: 100%;
    &:hover {
      .wrap-cover-img {
        @include mask($brand-color, 0.8);
      }
    }
  }
  .wrap-cover-img {
    position: absolute;
    width: 100%;
    height: 100%;
    @include mask(black, 0.5);
  }
  .wrap-txt {
    color: white;
    position: relative;
    height: 200px;// no importa el alto fijo ya que en tabla este sera como un min-height
    text-align: center;
    font-size: toRem(24);
    font-weight: $regular;
    @include cell(bottom);
    &>* {
      padding: 15px 15px 30px 15px;
    }
  }
}