index.scss 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. @import '../common/abstracts/variable';
  2. @import '../common/abstracts/mixin';
  3. .wot-theme-dark {
  4. @include b(tabs) {
  5. background: $-dark-background2;
  6. @include e(nav) {
  7. background: $-dark-background2;
  8. }
  9. @include e(nav-item) {
  10. color: $-dark-color3;
  11. @include when(active) {
  12. font-weight: 600;
  13. color: $-dark-color;
  14. }
  15. @include when(disabled) {
  16. color: $-dark-color-gray;
  17. }
  18. }
  19. @include e(map-nav-btn) {
  20. background-color: $-dark-background4;
  21. color: $-dark-color3;
  22. @include when(active) {
  23. color: $-dark-color;
  24. border: 1px solid $-tabs-nav-active-color;
  25. background-color: $-dark-background;
  26. }
  27. @include when(disabled) {
  28. color: $-dark-color-gray;
  29. border-color: #f4f4f4;
  30. }
  31. }
  32. @include e(map-btn) {
  33. background: $-dark-background2;
  34. color: $-dark-color3;
  35. }
  36. @include e(map-header) {
  37. background: $-dark-background2;
  38. color: $-dark-color;
  39. &::after {
  40. background: $-dark-background4;
  41. }
  42. }
  43. @include e(map-body) {
  44. background: $-dark-background2;
  45. }
  46. }
  47. }
  48. @include b(tabs) {
  49. position: relative;
  50. background: #fff;
  51. width: 100%;
  52. @include e(nav) {
  53. left: 0;
  54. right: 0;
  55. height: $-tabs-nav-height;
  56. background-color: #fff;
  57. width: 100%;
  58. position: relative;
  59. @include m(wrap) {
  60. height: 100%;
  61. overflow: hidden;
  62. }
  63. @include m(sticky) {
  64. width: 100vw;
  65. }
  66. }
  67. @include e(nav-container) {
  68. position: relative;
  69. display: flex;
  70. user-select: none;
  71. }
  72. @include e(nav-item) {
  73. position: relative;
  74. display: flex;
  75. align-items: center;
  76. justify-content: center;
  77. flex: 1;
  78. min-width: 0;
  79. height: $-tabs-nav-height;
  80. font-size: $-tabs-nav-fs;
  81. color: $-tabs-nav-color;
  82. transition: color .3s;
  83. @include when(active) {
  84. font-weight: 600;
  85. }
  86. @include when(disabled) {
  87. color: $-tabs-nav-disabled-color;
  88. }
  89. }
  90. @include e(nav-item-text) {
  91. @include lineEllipsis();
  92. }
  93. @include edeep(nav-item-badge){
  94. display: flex;
  95. align-items: center;
  96. justify-content: center;
  97. max-width: 100%;
  98. min-width: 0;
  99. }
  100. @include e(line) {
  101. position: absolute;
  102. bottom: 4px;
  103. left: 0;
  104. z-index: 1;
  105. height: $-tabs-nav-line-height;
  106. width: $-tabs-nav-line-width;
  107. background: $-tabs-nav-line-bg-color;
  108. border-radius: calc($-tabs-nav-line-height / 2);
  109. @include m(inner) {
  110. left: 50%;
  111. transform: translateX(-50%)
  112. }
  113. }
  114. @include e(container) {
  115. overflow: hidden;
  116. }
  117. @include e(body) {
  118. position: relative;
  119. width: 100%;
  120. height: 100%;
  121. @include when(animated) {
  122. display: flex;
  123. transition-property: left;
  124. }
  125. }
  126. @include e(map) {
  127. position: absolute;
  128. top: 0;
  129. left: 0;
  130. right: 0;
  131. z-index: 1;
  132. }
  133. @include e(map-btn) {
  134. position: absolute;
  135. right: 0;
  136. top: 0;
  137. width: $-tabs-nav-height;
  138. height: $-tabs-nav-height;
  139. line-height: $-tabs-nav-height;
  140. text-align: center;
  141. color: $-tabs-nav-map-arrow-color;
  142. z-index: 1;
  143. background: $-tabs-nav-bg;
  144. -webkit-tap-highlight-color: transparent;
  145. &::before {
  146. position: absolute;
  147. content: '';
  148. top: 0;
  149. left: -24px;
  150. width: 24px;
  151. height: $-tabs-nav-height - 1;
  152. background: $-tabs-nav-map-btn-before-bg;
  153. }
  154. }
  155. @include e(map-arrow) {
  156. display: block;
  157. transition: transform .3s;
  158. @include when(open) {
  159. transform: rotate(180deg);
  160. }
  161. }
  162. @include e(map-header) {
  163. position: relative;
  164. padding-left: 17px;
  165. height: $-tabs-nav-height;
  166. line-height: $-tabs-nav-height;
  167. font-size: $-tabs-nav-map-fs;
  168. color: $-tabs-nav-map-color;
  169. transition: opacity .3s;
  170. background: #fff;
  171. opacity: 0;
  172. @include halfPixelBorder;
  173. &::after {
  174. z-index: 3;
  175. }
  176. }
  177. @include e(map-body) {
  178. display: flex;
  179. flex-wrap: wrap;
  180. padding: 20px 15px 10px;
  181. background: #fff;
  182. transition: transform .3s;
  183. transform: scaleY(0);
  184. transform-origin: center top;
  185. @include when(open) {
  186. transform: scaleY(1);
  187. }
  188. }
  189. @include e(map-nav-item) {
  190. flex-basis: 33%;
  191. &:nth-child(3n + 2) {
  192. text-align: center;
  193. }
  194. &:nth-child(3n + 3) {
  195. text-align: right;
  196. }
  197. }
  198. @include e(map-nav-btn) {
  199. @include buttonClear;
  200. @include lineEllipsis;
  201. display: inline-block;
  202. width: 107px;
  203. height: 32px;
  204. line-height: 32px;
  205. background-color: $-tabs-nav-map-button-back-color;
  206. border-color: transparent;
  207. margin-bottom: 10px;
  208. border-radius: $-tabs-nav-map-button-radius;
  209. color: $-tabs-nav-map-color;
  210. font-size: $-tabs-nav-map-fs;
  211. text-align: center;
  212. transition: color .3s, border-color .3s;
  213. @include when(active) {
  214. color: $-tabs-nav-active-color;
  215. border: 1px solid $-tabs-nav-active-color;
  216. background-color: $-tabs-nav-bg
  217. }
  218. @include when(disabled) {
  219. color: $-tabs-nav-disabled-color;
  220. border-color: #f4f4f4;
  221. }
  222. }
  223. @include e(mask) {
  224. position: absolute;
  225. top: $-tabs-nav-height;
  226. left: 0;
  227. right: 0;
  228. bottom: 0;
  229. background: $-tabs-nav-map-modal-bg;
  230. opacity: 0;
  231. transition: opacity .3s;
  232. }
  233. @include when(slide) {
  234. .wd-tabs__nav-item {
  235. flex: 0 0 auto;
  236. padding: 0 17px;
  237. }
  238. }
  239. @include when(map) {
  240. .wd-tabs__nav--wrap {
  241. padding-right: 40px;
  242. }
  243. }
  244. }
  245. @media screen and (max-width: 330px) {
  246. .wd-tabs__map-nav-btn {
  247. width: 90px;
  248. }
  249. }