awselect.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. $bg_color: #fff;
  2. $placeholder_color: #000;
  3. $link_color: #000;
  4. @mixin transition() {
  5. -webkit-transition:.4s cubic-bezier(.19,1,.22,1);
  6. -moz-transition:.4s cubic-bezier(.19,1,.22,1);
  7. -o-transition:.4s cubic-bezier(.19,1,.22,1);
  8. transition: .4s cubic-bezier(.19,1,.22,1);
  9. }
  10. .awselect {
  11. float:left;
  12. width:100%;
  13. position:relative;
  14. @include transition();
  15. > .bg {
  16. background:$bg_color;
  17. height:0%;
  18. float:left;
  19. width:100%;
  20. position:absolute;
  21. z-index:1;
  22. @include transition();
  23. }
  24. .front_face{
  25. position:relative;
  26. padding:20px 40px;
  27. color : $placeholder_color;
  28. float:left;
  29. width:100%;
  30. > .bg {
  31. position:absolute;
  32. z-index:0;
  33. float:left;
  34. width:100%;
  35. height:100%;
  36. left:0;
  37. background:#e5e5e5;
  38. top:0;
  39. }
  40. .content {
  41. float:left;
  42. width:100%;
  43. position:relative;
  44. z-index:2;
  45. }
  46. span {
  47. @include transition();
  48. float:left;
  49. width:100%;
  50. color:inherit;
  51. }
  52. .current_value {
  53. position:absolute;
  54. }
  55. .placeholder {
  56. position:relative;
  57. }
  58. .icon {
  59. float: right;
  60. position: absolute;
  61. right: 0px;
  62. top: 50%;
  63. transform: rotate(180deg) translateY(-50%);
  64. transform-origin: center 0;
  65. @include transition();
  66. svg {
  67. width:10px;
  68. height:10px;
  69. }
  70. }
  71. }
  72. .back_face {
  73. z-index:2;
  74. position:absolute;
  75. padding:0 20px;
  76. @include transition();
  77. transform:translateY(20px);
  78. opacity:0;
  79. float:left;
  80. width:100%;
  81. max-height:200px;
  82. overflow: hidden;
  83. display:none;
  84. &.overflow {
  85. overflow-y:scroll;
  86. }
  87. ul {
  88. margin:0;
  89. float:left;
  90. padding:0;
  91. width:100%;
  92. li {
  93. float:left;
  94. width:100%;
  95. display:block;
  96. a {
  97. color:inherit;
  98. opacity:0.8;
  99. @include transition();
  100. &:hover {
  101. opacity:1;
  102. }
  103. }
  104. }
  105. }
  106. }
  107. &.dark_scheme {
  108. }
  109. &.animate {
  110. z-index:3;
  111. height:100%!important;
  112. .front_face {
  113. .icon {
  114. transform: rotate(0deg) translateY(-50%);
  115. }
  116. }
  117. > .bg {
  118. height:100%;
  119. }
  120. }
  121. &.animate2{
  122. > .bg {
  123. box-shadow:0px 11px 43px 11px rgba(0, 0, 0, 0.11);
  124. }
  125. .back_face {
  126. transform:translateY(0px);
  127. opacity:1;
  128. }
  129. }
  130. &.hasValue {
  131. .front_face {
  132. .placeholder {
  133. transform:translateY(20px);
  134. opacity:0;
  135. }
  136. }
  137. }
  138. &.placeholder_animate {
  139. .front_face {
  140. .current_value {
  141. opacity:0;
  142. }
  143. }
  144. }
  145. &.placeholder_animate2 {
  146. .front_face {
  147. .placeholder {
  148. transform:translateY(0);
  149. opacity:1;
  150. }
  151. }
  152. }
  153. }