domsPlace/public/styles/tools/_mixin.absolute-centering.scss

41 lines
712 B
SCSS

/*
* Absolute Position Centering
* Provides mixins to center using absolute positioning and transforms
*
* Dependencies:
* tools/_mixin.transform.scss
*
* Version:
* 1.0.0 - 2018/01/29
*/
@mixin t-absolute-center-x-y() {
position: absolute;
left: 50%;
top: 50%;
@include t-translate(-50%, -50%);
}
@mixin t-absolute-center-x() {
position: absolute;
left: 50%;
@include t-translate-x(-50%);
}
@mixin t-absolute-center-y() {
position: absolute;
top: 50%;
@include t-translate-y(-50%);
}
%t-absolute-center-x-y {
@include t-absolute-center-x-y();
}
%t-absolute-center-x {
@include t-absolute-center-x();
}
%t-absolute-center-y {
@include t-absolute-center-y();
}