Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // * Vartical & Horizontal Centering (IE8 and above. use position.)
- @mixin vh-center($axis:xy) {
- position: relative;
- & > * {
- position: absolute;
- @if $axis == x {
- left: 0;
- right: 0;
- margin-left: auto;
- margin-right: auto;
- } @elseif $axis == y {
- top: 0;
- bottom: 0;
- margin-top: auto;
- margin-bottom: auto;
- } @else {
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement