awselect.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. width:100%;
  91. li {
  92. float:left;
  93. width:100%;
  94. display:block;
  95. a {
  96. color:inherit;
  97. opacity:0.8;
  98. @include transition();
  99. &:hover {
  100. opacity:1;
  101. }
  102. }
  103. }
  104. }
  105. }
  106. &.dark_scheme {
  107. }
  108. &.animate {
  109. z-index:3;
  110. height:100%!important;
  111. .front_face {
  112. .icon {
  113. transform: rotate(0deg) translateY(-50%);
  114. }
  115. }
  116. > .bg {
  117. height:100%;
  118. }
  119. }
  120. &.animate2{
  121. > .bg {
  122. box-shadow:0px 11px 43px 11px rgba(0, 0, 0, 0.11);
  123. }
  124. .back_face {
  125. transform:translateY(0px);
  126. opacity:1;
  127. }
  128. }
  129. &.hasValue {
  130. .front_face {
  131. .placeholder {
  132. transform:translateY(20px);
  133. opacity:0;
  134. }
  135. }
  136. }
  137. &.placeholder_animate {
  138. .front_face {
  139. .current_value {
  140. opacity:0;
  141. }
  142. }
  143. }
  144. &.placeholder_animate2 {
  145. .front_face {
  146. .placeholder {
  147. transform:translateY(0);
  148. opacity:1;
  149. }
  150. }
  151. }
  152. }