awselect.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /**
  2. jQuery Awselect
  3. Developed by: Prev Wong
  4. Documentation: https://prevwong.github.io/awesome-select/
  5. Github: https://github.com/prevwong/awesome-select/
  6. **/
  7. $bg_color: #fff;
  8. $placeholder_color: #000;
  9. $link_color: #000;
  10. @mixin transition() {
  11. -webkit-transition:.4s cubic-bezier(.19,1,.22,1);
  12. -moz-transition:.4s cubic-bezier(.19,1,.22,1);
  13. -o-transition:.4s cubic-bezier(.19,1,.22,1);
  14. transition: .4s cubic-bezier(.19,1,.22,1);
  15. }
  16. @mixin faster_transition() {
  17. -webkit-transition:0.2s ease-in;
  18. -moz-transition:0.2s ease-in;
  19. -o-transition:0.2s ease-in;
  20. transition: 0.2s ease-in;
  21. }
  22. .awselect_bg {
  23. position:fixed;
  24. z-index:999;
  25. left:0;
  26. top:0;
  27. width:100%;
  28. height:100%;
  29. opacity:0;
  30. background:rgba(0,0,0,0.8);
  31. @include faster_transition();
  32. &.animate {
  33. opacity:1;
  34. }
  35. }
  36. .awselect {
  37. float:left;
  38. width:100%;
  39. position:relative;
  40. cursor:pointer;
  41. @include transition();
  42. > .bg {
  43. background:$bg_color;
  44. height:0%;
  45. float:left;
  46. width:100%;
  47. position:absolute;
  48. z-index:1;
  49. @include transition();
  50. }
  51. .front_face{
  52. position:relative;
  53. padding:20px 40px;
  54. color : $placeholder_color;
  55. float:left;
  56. width:100%;
  57. > .bg {
  58. position:absolute;
  59. z-index:0;
  60. float:left;
  61. width:100%;
  62. height:100%;
  63. left:0;
  64. background:#e5e5e5;
  65. top:0;
  66. }
  67. .content {
  68. float:left;
  69. width:100%;
  70. position:relative;
  71. z-index:2;
  72. }
  73. span {
  74. @include transition();
  75. float:left;
  76. width:100%;
  77. color:inherit;
  78. }
  79. .current_value {
  80. position:absolute;
  81. }
  82. .placeholder {
  83. position:relative;
  84. }
  85. .icon {
  86. float: right;
  87. position: absolute;
  88. right: 0px;
  89. top: 50%;
  90. transform: rotate(180deg) translateY(-50%);
  91. transform-origin: center 0;
  92. @include transition();
  93. svg {
  94. width:10px;
  95. height:10px;
  96. }
  97. }
  98. }
  99. .back_face {
  100. z-index:2;
  101. position:absolute;
  102. padding:0px;
  103. @include transition();
  104. transform:translateY(20px);
  105. opacity:0;
  106. float:left;
  107. width:100%;
  108. max-height:200px;
  109. overflow: hidden;
  110. display:none;
  111. &.overflow {
  112. overflow-y:scroll;
  113. }
  114. ul {
  115. margin:0;
  116. float:left;
  117. padding:0;
  118. width:100%;
  119. li {
  120. float:left;
  121. width:100%;
  122. display:block;
  123. a {
  124. color:inherit;
  125. opacity:0.8;
  126. float:left;
  127. width:100%;
  128. @include transition();
  129. &:hover {
  130. background:rgba(0,0,0,0.07);
  131. opacity:1;
  132. }
  133. }
  134. }
  135. }
  136. }
  137. &.dark_scheme {
  138. }
  139. &.animate {
  140. z-index:9999;
  141. .front_face {
  142. .icon {
  143. transform: rotate(0deg) translateY(-50%);
  144. }
  145. }
  146. > .bg {
  147. height:100%;
  148. }
  149. }
  150. &.animate2{
  151. > .bg {
  152. box-shadow:0px 11px 43px 11px rgba(0, 0, 0, 0.11);
  153. }
  154. .back_face {
  155. transform:translateY(0px);
  156. opacity:1;
  157. }
  158. }
  159. &.hasValue {
  160. .front_face {
  161. .placeholder {
  162. transform:translateY(20px);
  163. opacity:0;
  164. }
  165. }
  166. }
  167. &.placeholder_animate {
  168. .front_face {
  169. .current_value {
  170. opacity:0;
  171. }
  172. }
  173. }
  174. &.placeholder_animate2 {
  175. .front_face {
  176. .placeholder {
  177. transform:translateY(0);
  178. opacity:1;
  179. }
  180. }
  181. }
  182. &.transition_paused {
  183. transition:none!important;
  184. }
  185. }
  186. .aw_cursor_pointer {
  187. float:left;
  188. width:20px;
  189. height:20px;
  190. border-radius:100%;
  191. background:#ddd;
  192. overflow:hidden;
  193. padding:5px;
  194. @include transition();
  195. transform:scale(0.5);
  196. .inner {
  197. float:left;
  198. width:100%;
  199. height: 0%;
  200. background:#fff;
  201. border-radius:100%;
  202. @include transition();
  203. }
  204. &.animate {
  205. transform: scale(1);
  206. .inner {
  207. height:100%;
  208. }
  209. }
  210. }