_keyframes.scss 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Adds keyframes blocks for supported prefixes, removing redundant prefixes in the block's content
  2. @mixin keyframes($name) {
  3. $original-prefix-for-webkit: $prefix-for-webkit;
  4. $original-prefix-for-mozilla: $prefix-for-mozilla;
  5. $original-prefix-for-microsoft: $prefix-for-microsoft;
  6. $original-prefix-for-opera: $prefix-for-opera;
  7. $original-prefix-for-spec: $prefix-for-spec;
  8. @if $original-prefix-for-webkit {
  9. @include disable-prefix-for-all();
  10. $prefix-for-webkit: true !global;
  11. @-webkit-keyframes #{$name} {
  12. @content;
  13. }
  14. }
  15. @if $original-prefix-for-mozilla {
  16. @include disable-prefix-for-all();
  17. $prefix-for-mozilla: true !global;
  18. @-moz-keyframes #{$name} {
  19. @content;
  20. }
  21. }
  22. $prefix-for-webkit: $original-prefix-for-webkit !global;
  23. $prefix-for-mozilla: $original-prefix-for-mozilla !global;
  24. $prefix-for-microsoft: $original-prefix-for-microsoft !global;
  25. $prefix-for-opera: $original-prefix-for-opera !global;
  26. $prefix-for-spec: $original-prefix-for-spec !global;
  27. @if $original-prefix-for-spec {
  28. @keyframes #{$name} {
  29. @content;
  30. }
  31. }
  32. }