index.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. @import '../common/abstracts/_mixin.scss';
  2. @import '../common/abstracts/variable.scss';
  3. .wot-theme-dark {
  4. @include b(search) {
  5. background: $-dark-background4;
  6. @include e(block) {
  7. background-color: $-dark-background;
  8. }
  9. @include e(input) {
  10. color: $-dark-color;
  11. }
  12. @include e(cover) {
  13. background-color: $-dark-background;
  14. }
  15. @include e(search-icon) {
  16. color: $-dark-color;
  17. }
  18. @include e(search-left-icon) {
  19. color: $-dark-color;
  20. }
  21. @include e(clear) {
  22. color: $-dark-color;
  23. }
  24. @include e(cancel) {
  25. color: $-dark-color;
  26. }
  27. @include when(light) {
  28. background: $-dark-background4;
  29. .wd-search__block {
  30. background: $-dark-background7;
  31. }
  32. .wd-search__cover {
  33. background: $-dark-background7;
  34. }
  35. }
  36. }
  37. }
  38. @include b(search) {
  39. display: flex;
  40. padding: $-search-padding;
  41. align-items: center;
  42. background: #fff;
  43. @include e(block) {
  44. flex: 1;
  45. background-color: $-search-input-bg;
  46. border-radius: $-search-input-radius;
  47. display: flex;
  48. flex-direction: row;
  49. align-items: center;
  50. position: relative;
  51. }
  52. @include e(field) {
  53. flex: 1;
  54. display: flex;
  55. flex-direction: row;
  56. align-items: center;
  57. position: relative;
  58. }
  59. @include e(input) {
  60. flex: 1;
  61. height: $-search-input-height;
  62. box-sizing: border-box;
  63. padding: $-search-input-padding;
  64. border: none;
  65. background: transparent;
  66. font-size: $-search-input-fs;
  67. -webkit-appearance: none;
  68. outline: none;
  69. color: $-search-input-color;
  70. z-index: 0;
  71. @include lineEllipsis;
  72. &::-webkit-search-cancel-button {
  73. -webkit-appearance: none;
  74. }
  75. }
  76. @include e(cover) {
  77. width: 100%;
  78. height: $-search-input-height;
  79. background-color: $-search-input-bg;
  80. line-height: $-search-input-height;
  81. font-size: $-search-input-fs;
  82. border-radius: $-search-input-radius;
  83. flex-direction: row;
  84. justify-content: center;
  85. align-items: center;
  86. }
  87. @include edeep(search-icon) {
  88. margin-right: 8px;
  89. color: $-search-icon-color;
  90. font-size: $-search-icon-size;
  91. }
  92. @include edeep(search-left-icon) {
  93. position: absolute;
  94. font-size: $-search-icon-size;
  95. top: 50%;
  96. left: 16px;
  97. transform: translateY(-50%);
  98. color: $-search-icon-color;
  99. }
  100. @include e(placeholder-txt) {
  101. color: $-search-placeholder-color;
  102. font-size: $-search-input-fs;
  103. }
  104. @include edeep(clear) {
  105. position: absolute;
  106. right: 0;
  107. padding: 6px 9px 6px 7px;
  108. color: $-search-cancel-color;
  109. }
  110. @include edeep(clear-icon) {
  111. vertical-align: middle;
  112. font-size: $-search-clear-icon-size;
  113. }
  114. @include e(cancel) {
  115. padding: $-search-cancel-padding;
  116. height: $-search-input-height;
  117. line-height: $-search-input-height;
  118. font-size: $-search-cancel-fs;
  119. color: $-search-cancel-color;
  120. -webkit-tap-highlight-color: transparent;
  121. }
  122. @include when(light) {
  123. background: $-search-light-bg;
  124. .wd-search__block {
  125. background: #fff;
  126. }
  127. .wd-search__cover {
  128. background: #fff;
  129. }
  130. }
  131. @include when(without-cancel) {
  132. padding-right: $-search-side-padding;
  133. }
  134. }