Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // * Vartical & Horizontal Centering (IE8 and above. use position.)
  2. @mixin vh-center($axis:xy) {
  3. position: relative;
  4. & > * {
  5. position: absolute;
  6. @if $axis == x {
  7. left: 0;
  8. right: 0;
  9. margin-left: auto;
  10. margin-right: auto;
  11. } @elseif $axis == y {
  12. top: 0;
  13. bottom: 0;
  14. margin-top: auto;
  15. margin-bottom: auto;
  16. } @else {
  17. top: 0;
  18. left: 0;
  19. right: 0;
  20. bottom: 0;
  21. margin: auto;
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement