_waves.scss 3.9 KB

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