awselect.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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. .immersive_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. left:0;
  85. }
  86. .placeholder {
  87. position:relative;
  88. }
  89. .icon {
  90. float: right;
  91. position: absolute;
  92. right: 0px;
  93. top: 50%;
  94. transform: rotate(180deg) translateY(-50%);
  95. transform-origin: center 0;
  96. @include transition();
  97. svg {
  98. width:10px;
  99. height:10px;
  100. }
  101. }
  102. }
  103. .back_face {
  104. z-index:2;
  105. position:absolute;
  106. padding:0px;
  107. @include transition();
  108. transform:translateY(20px);
  109. opacity:0;
  110. float:left;
  111. width:100%;
  112. max-height:200px;
  113. overflow: hidden;
  114. display:none;
  115. &.overflow {
  116. overflow-y:scroll;
  117. }
  118. ul {
  119. margin:0;
  120. float:left;
  121. padding:0;
  122. width:100%;
  123. li {
  124. float:left;
  125. width:100%;
  126. display:block;
  127. a {
  128. color:inherit;
  129. opacity:0.8;
  130. float:left;
  131. width:100%;
  132. @include transition();
  133. &:hover {
  134. background:rgba(0,0,0,0.07);
  135. opacity:1;
  136. }
  137. }
  138. }
  139. }
  140. }
  141. &.dark_scheme {
  142. }
  143. &.animate {
  144. z-index:9999;
  145. .front_face {
  146. .icon {
  147. transform: rotate(0deg) translateY(-50%);
  148. }
  149. }
  150. > .bg {
  151. height:100%;
  152. }
  153. }
  154. &.animate2{
  155. > .bg {
  156. box-shadow:0px 11px 43px 11px rgba(0, 0, 0, 0.11);
  157. }
  158. .back_face {
  159. transform:translateY(0px);
  160. opacity:1;
  161. }
  162. }
  163. &.hasValue {
  164. .front_face {
  165. .placeholder {
  166. transform:translateY(20px);
  167. opacity:0;
  168. }
  169. }
  170. }
  171. &.placeholder_animate {
  172. .front_face {
  173. .current_value {
  174. opacity:0;
  175. }
  176. }
  177. }
  178. &.placeholder_animate2 {
  179. .front_face {
  180. .placeholder {
  181. transform:translateY(0);
  182. opacity:1;
  183. }
  184. }
  185. }
  186. &.transition_paused {
  187. transition:none!important;
  188. }
  189. }
  190. .aw_cursor_pointer {
  191. float:left;
  192. width:20px;
  193. height:20px;
  194. border-radius:100%;
  195. background:#ddd;
  196. overflow:hidden;
  197. padding:5px;
  198. @include transition();
  199. transform:scale(0.5);
  200. .inner {
  201. float:left;
  202. width:100%;
  203. height: 0%;
  204. background:#fff;
  205. border-radius:100%;
  206. @include transition();
  207. }
  208. &.animate {
  209. transform: scale(1);
  210. .inner {
  211. height:100%;
  212. }
  213. }
  214. }