_waves.scss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /*Wave Effeects*/
  2. $gradient: rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0) 70%;
  3. @mixin waves-transition($transition) {
  4. -webkit-transition: $transition;
  5. -moz-transition: $transition;
  6. -o-transition: $transition;
  7. transition: $transition;
  8. }
  9. @mixin waves-transform($string) {
  10. -webkit-transform: $string;
  11. -moz-transform: $string;
  12. -ms-transform: $string;
  13. -o-transform: $string;
  14. transform: $string;
  15. }
  16. @mixin waves-box-shadow($shadow) {
  17. -webkit-box-shadow: $shadow;
  18. box-shadow: $shadow;
  19. }
  20. .waves-effect {
  21. position: relative;
  22. display: inline-block;
  23. overflow: hidden;
  24. cursor: pointer;
  25. -webkit-user-select: none;
  26. -moz-user-select: none;
  27. -ms-user-select: none;
  28. user-select: none;
  29. -webkit-tap-highlight-color: transparent;
  30. .waves-ripple {
  31. position: absolute;
  32. width: 20px;
  33. height: 20px;
  34. margin-top: -10px;
  35. margin-left: -10px;
  36. pointer-events: none;
  37. background: rgba(0, 0, 0, 0.08);
  38. border-radius: 50%;
  39. opacity: 0;
  40. -webkit-transition-property: -webkit-transform, opacity;
  41. -moz-transition-property: -moz-transform, opacity;
  42. -o-transition-property: -o-transform, opacity;
  43. transition-property: transform, opacity;
  44. -webkit-transform: scale(0);
  45. -moz-transform: scale(0);
  46. -ms-transform: scale(0);
  47. -o-transform: scale(0);
  48. transform: scale(0);
  49. @include waves-transition(all 0.5s ease-out);
  50. @include waves-transform(scale(0) translate(0, 0));
  51. }
  52. &.waves-light .waves-ripple {
  53. background: rgba(255, 255, 255, 0.4);
  54. background: -webkit-radial-gradient($gradient);
  55. background: -o-radial-gradient($gradient);
  56. background: -moz-radial-gradient($gradient);
  57. background: radial-gradient($gradient);
  58. }
  59. &.waves-classic .waves-ripple {
  60. background: rgba(0, 0, 0, 0.2);
  61. }
  62. &.waves-classic.waves-light .waves-ripple {
  63. background: rgba(255, 255, 255, 0.4);
  64. }
  65. }
  66. .waves-notransition {
  67. @include waves-transition(none '!important');
  68. }
  69. .waves-button,
  70. .waves-circle {
  71. @include waves-transform(translateZ(0));
  72. -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
  73. }
  74. .waves-button,
  75. .waves-button:hover,
  76. .waves-button:visited,
  77. .waves-button-input {
  78. z-index: 1;
  79. font-size: 1em;
  80. line-height: 1em;
  81. color: inherit;
  82. text-align: center;
  83. text-decoration: none;
  84. white-space: nowrap;
  85. vertical-align: middle;
  86. cursor: pointer;
  87. background-color: rgba(0, 0, 0, 0);
  88. border: none;
  89. outline: none;
  90. }
  91. .waves-button {
  92. padding: 0.85em 1.1em;
  93. border-radius: 0.2em;
  94. }
  95. .waves-button-input {
  96. padding: 0.85em 1.1em;
  97. margin: 0;
  98. }
  99. .waves-input-wrapper {
  100. vertical-align: bottom;
  101. border-radius: 0.2em;
  102. &.waves-button {
  103. padding: 0;
  104. }
  105. .waves-button-input {
  106. position: relative;
  107. top: 0;
  108. left: 0;
  109. z-index: 1;
  110. }
  111. }
  112. .waves-circle {
  113. width: 2.5em;
  114. height: 2.5em;
  115. line-height: 2.5em;
  116. text-align: center;
  117. border-radius: 50%;
  118. }
  119. .waves-float {
  120. mask-image: none;
  121. @include waves-box-shadow(0px 1px 1.5px 1px rgba(0, 0, 0, 0.12));
  122. @include waves-transition(all 300ms);
  123. &:active {
  124. @include waves-box-shadow(0px 8px 20px 1px rgba(0, 0, 0, 0.3));
  125. }
  126. }
  127. .waves-block {
  128. display: block;
  129. }