// POSITIONING
// --------------------------------------------------------------------
// element needs a defined width
@mixin center-horizontal {
    margin-left: auto;
    margin-right: auto;
}

// zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
// parent element needs a defined height
@mixin center-vertical {
    .csstransforms & {
        position: relative;
        top: 50%;
        transform: translateY(-50%);
    }
}

// POSITIONING
// --------------------------------------------------------------------
// element needs a defined width
@mixin center-horizontal {
    margin-left: auto;
    margin-right: auto;
}

// zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
// parent element needs a defined height
@mixin center-vertical {
    .csstransforms & {
        position: relative;
        top: 50%;
        transform: translateY(-50%);
    }
}

// center an absolutely positioned element
@mixin center-absolute {
    bottom: 0;
    left: 0;
    margin: auto;
    position: absolute;
    right: 0;
    top: 0;
}
Add mixin to center absolutely positioned elements
Add mixin to center absolutely positioned elements
