Update _mixins.scss
This commit is contained in:
parent
a266914c3c
commit
967014e0ba
|
@ -58,3 +58,26 @@
|
|||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Positioning
|
||||
*/
|
||||
|
||||
@mixin center($horizontal: true, $vertical: true) {
|
||||
position: absolute;
|
||||
@if ($horizontal and $vertical) {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
@else if ($horizontal) {
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
}
|
||||
@else if ($vertical) {
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue