_keyframes.scss 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // Copyright 2017 Google Inc.
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. // MDC Ripple keyframes are split into their own file so that _mixins.scss can rely on them.
  23. @use "@material/animation/variables";
  24. @use "./variables" as variables2;
  25. @mixin keyframes_ {
  26. @keyframes mdc-ripple-fg-radius-in {
  27. from {
  28. animation-timing-function: variables.$standard-curve-timing-function;
  29. // NOTE: For these keyframes, we do not need custom property fallbacks because they are only
  30. // used in conjunction with `.mdc-ripple-upgraded`. Since MDCRippleFoundation checks to ensure
  31. // that custom properties are supported within the browser before adding this class, we can
  32. // safely use them without a fallback.
  33. transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);
  34. }
  35. to {
  36. transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));
  37. }
  38. }
  39. @keyframes mdc-ripple-fg-opacity-in {
  40. from {
  41. animation-timing-function: linear;
  42. opacity: 0;
  43. }
  44. to {
  45. opacity: var(--mdc-ripple-fg-opacity, 0);
  46. }
  47. }
  48. @keyframes mdc-ripple-fg-opacity-out {
  49. from {
  50. animation-timing-function: linear;
  51. opacity: var(--mdc-ripple-fg-opacity, 0);
  52. }
  53. to {
  54. opacity: 0;
  55. }
  56. }
  57. }