steveosoule
3/25/2014 - 7:02 PM

SASS Vertical Align Mixin

SASS Vertical Align Mixin

/* http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ */
@mixin vertical-align {
  position: relative;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

.element p {
  @include vertical-align;
}