Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

_mixins.scss 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * Animation mixin.
  3. */
  4. @mixin animation($animate...) {
  5. $max: length($animate);
  6. $animations: '';
  7. @for $i from 1 through $max {
  8. $animations: #{$animations + nth($animate, $i)};
  9. @if $i < $max {
  10. $animations: #{$animations + ", "};
  11. }
  12. }
  13. -webkit-animation: $animations;
  14. -moz-animation: $animations;
  15. -o-animation: $animations;
  16. animation: $animations;
  17. }
  18. /**
  19. * Keyframes mixin.
  20. */
  21. @mixin keyframes($animationName) {
  22. @-webkit-keyframes #{$animationName} {
  23. @content;
  24. }
  25. @-moz-keyframes #{$animationName} {
  26. @content;
  27. }
  28. @-o-keyframes #{$animationName} {
  29. @content;
  30. }
  31. @keyframes #{$animationName} {
  32. @content;
  33. }
  34. }
  35. @mixin circle($diameter) {
  36. width: $diameter;
  37. height: $diameter;
  38. border-radius: 50%;
  39. }
  40. @mixin absoluteAligning($sizeX, $sizeY) {
  41. top: 50%;
  42. left: 50%;
  43. position: absolute;
  44. @include transform(translate(-#{$sizeX / 2}, -#{$sizeY / 2}))
  45. }
  46. @mixin transform($func) {
  47. -moz-transform: $func;
  48. -ms-transform: $func;
  49. -webkit-transform: $func;
  50. -o-transform: $func;
  51. transform: $func;
  52. }
  53. @mixin transition($transition...) {
  54. -moz-transition: $transition;
  55. -o-transition: $transition;
  56. -webkit-transition: $transition;
  57. transition: $transition;
  58. }