_mixins.scss 670 B

12345678910111213141516171819202122232425262728293031323334
  1. // center vertically and/or horizontally an absolute positioned element
  2. @mixin center($xy:xy) {
  3. @if $xy == xy {
  4. left: 50%;
  5. top: 50%;
  6. bottom: auto;
  7. right: auto;
  8. @include transform(translateX(-50%) translateY(-50%));
  9. }
  10. @else if $xy == x {
  11. left: 50%;
  12. right: auto;
  13. @include transform(translateX(-50%));
  14. }
  15. @else if $xy == y {
  16. top: 50%;
  17. bottom: auto;
  18. @include transform(translateY(-50%));
  19. }
  20. }
  21. // border radius
  22. @mixin border-radius($radius:.25em) {
  23. border-radius: $radius;
  24. }
  25. // antialiasing mode font rendering
  26. @mixin font-smoothing {
  27. -webkit-font-smoothing: antialiased;
  28. -moz-osx-font-smoothing: grayscale;
  29. }