suitcss-utils-position
Version:
Positioning utilities for SUIT CSS
49 lines (40 loc) • 814 B
CSS
/** @define utilities */
.u-posFit,
.u-posAbsoluteCenter,
.u-posAbsolute {
position: absolute ;
}
/**
* Element will be centered to its nearest relatively-positioned
* ancestor.
*/
.u-posFixedCenter,
.u-posAbsoluteCenter {
left: 50% ;
top: 50% ;
transform: translate(-50%, -50%) ;
}
.u-posFit,
.u-posFullScreen {
bottom: 0 ;
left: 0 ;
margin: auto ;
right: 0 ;
top: 0 ;
}
/**
* 1. Make sure fixed elements are promoted into a new layer, for performance
* reasons.
*/
.u-posFullScreen,
.u-posFixedCenter,
.u-posFixed {
backface-visibility: hidden; /* 1 */
position: fixed ;
}
.u-posRelative {
position: relative ;
}
.u-posStatic {
position: static ;
}