You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
916 B

  1. @mixin radial-gradient-animation( $fallback, $start, $end, $transTime ){
  2. background-size: 100%;
  3. position: relative;
  4. z-index: 100;
  5. &:before {
  6. background: $fallback;
  7. background: radial-gradient($start, $end);
  8. content: '';
  9. display: block;
  10. height: 100%;
  11. position: absolute;
  12. top: 0; left: 0;
  13. opacity: 0;
  14. width: 100%;
  15. z-index: -100;
  16. transition: opacity $transTime;
  17. }
  18. &:hover {
  19. &:before {
  20. opacity: 1;
  21. }
  22. }
  23. }
  24. @mixin linear-gradient-animation( $fallback, $direction, $start, $middle, $end, $transTime ){
  25. background-size: 100%;
  26. position: relative;
  27. z-index: 100;
  28. &:before {
  29. background: $fallback;
  30. background: linear-gradient($direction, $start, $middle, $end);
  31. content: '';
  32. display: block;
  33. height: 100%;
  34. position: absolute;
  35. top: 0; left: 0;
  36. opacity: 0;
  37. width: 100%;
  38. z-index: -100;
  39. transition: opacity $transTime;
  40. }
  41. &:hover {
  42. &:before {
  43. opacity: 1;
  44. }
  45. }
  46. }