awselect.scss 3.4 KB

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