index.scss 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. @import "../common/abstracts/variable";
  2. @import "../common/abstracts/mixin";
  3. .wot-theme-dark {
  4. @include b(input) {
  5. background: $-dark-background2;
  6. &::after {
  7. background: $-dark-color-gray;
  8. }
  9. @include when(not-empty) {
  10. &:not(.is-disabled) {
  11. &::after {
  12. background-color: $-dark-color;
  13. }
  14. }
  15. }
  16. @include e(inner) {
  17. color: $-dark-color;
  18. &::-webkit-input-placeholder {
  19. color: $-dark-color3;
  20. }
  21. }
  22. @include e(count) {
  23. color: $-dark-color3;
  24. background: transparent;
  25. }
  26. @include e(count-current) {
  27. color: $-dark-color;
  28. }
  29. :deep(.wd-input__icon),
  30. :deep(.wd-input__clear) {
  31. color: $-dark-color;
  32. background: transparent;
  33. }
  34. @include when(cell) {
  35. background-color: $-dark-background2;
  36. line-height: $-cell-line-height;
  37. @include when(border) {
  38. @include halfPixelBorder("top", $-input-cell-padding, $-dark-border-color);
  39. }
  40. }
  41. @include when(disabled) {
  42. .wd-input__inner {
  43. color: $-dark-color-gray;
  44. background: transparent;
  45. }
  46. }
  47. @include e(label) {
  48. color: $-dark-color;
  49. }
  50. }
  51. }
  52. @include b(input) {
  53. position: relative;
  54. -webkit-tap-highlight-color: transparent;
  55. text-align: left;
  56. background: $-input-bg;
  57. &::after {
  58. position: absolute;
  59. content: "";
  60. bottom: 0;
  61. left: 0;
  62. right: 0;
  63. height: 1px;
  64. background: $-input-border-color;
  65. transform: scaleY(0.5);
  66. transition: background-color 0.2s ease-in-out;
  67. }
  68. @include when(not-empty) {
  69. &:not(.is-disabled) {
  70. &::after {
  71. background-color: $-input-not-empty-border-color;
  72. }
  73. }
  74. }
  75. @include e(label) {
  76. position: relative;
  77. display: flex;
  78. width: $-input-cell-label-width;
  79. color: $-cell-title-color;
  80. margin-right: $-cell-padding;
  81. box-sizing: border-box;
  82. font-size: $-input-fs;
  83. flex-shrink: 0;
  84. }
  85. @include e(label-inner) {
  86. display: inline-block;
  87. font-size: $-input-fs;
  88. line-height: $-cell-line-height;
  89. }
  90. @include e(required) {
  91. font-size: $-cell-required-size;
  92. color: $-cell-required-color;
  93. margin-left: $-cell-required-margin;
  94. @include m(left) {
  95. margin-left: 0;
  96. margin-right: $-cell-required-margin;
  97. }
  98. }
  99. @include e(body) {
  100. flex: 1;
  101. }
  102. @include e(value) {
  103. position: relative;
  104. display: flex;
  105. flex-direction: row;
  106. align-items: center;
  107. }
  108. @include e(prefix) {
  109. margin-right: $-input-icon-margin;
  110. font-size: $-input-fs;
  111. line-height: initial;
  112. :deep(.wd-input__icon),
  113. :deep(.wd-input__clear) {
  114. margin-left: 0;
  115. }
  116. }
  117. @include e(suffix) {
  118. flex-shrink: 0;
  119. line-height: initial;
  120. }
  121. @include e(error-message){
  122. color: $-form-item-error-message-color;
  123. font-size: $-form-item-error-message-font-size;
  124. line-height: $-form-item-error-message-line-height;
  125. text-align: left;
  126. vertical-align: middle;
  127. }
  128. @include when(disabled) {
  129. .wd-input__inner {
  130. color: $-input-disabled-color;
  131. background: transparent;
  132. }
  133. }
  134. @include when(error) {
  135. .wd-input__inner {
  136. color: $-input-error-color;
  137. background: transparent;
  138. }
  139. }
  140. @include when(no-border) {
  141. &::after {
  142. display: none;
  143. }
  144. .wd-input__inner {
  145. height: $-input-inner-height-no-border;
  146. padding-top: 0;
  147. padding-bottom: 0;
  148. }
  149. }
  150. @include when(cell) {
  151. display: flex;
  152. align-items: flex-start;
  153. padding: $-input-cell-padding $-input-padding;
  154. background-color: $-input-cell-bg;
  155. &.is-error::after {
  156. background: $-input-cell-border-color;
  157. }
  158. :deep(.wd-input__icon),
  159. :deep(.wd-input__clear) {
  160. display: inline-flex;
  161. align-items: center;
  162. height: $-input-cell-height;
  163. line-height: $-input-cell-height;
  164. }
  165. .wd-input__prefix {
  166. display: inline-block;
  167. margin-right: $-cell-icon-right;
  168. }
  169. .wd-input__inner {
  170. height: $-input-cell-height;
  171. }
  172. &.wd-input::after {
  173. display: none;
  174. }
  175. @include when(center) {
  176. align-items: center;
  177. }
  178. @include when(border) {
  179. @include halfPixelBorder("top", $-input-cell-padding);
  180. }
  181. }
  182. @include when(large) {
  183. padding: $-input-cell-padding-large;
  184. .wd-input__prefix {
  185. font-size: $-input-fs-large;
  186. }
  187. .wd-input__label-inner {
  188. font-size: $-input-fs-large;
  189. }
  190. .wd-input__inner {
  191. font-size: $-input-fs-large;
  192. }
  193. .wd-input__count {
  194. font-size: $-input-count-fs-large;
  195. }
  196. :deep(.wd-input__icon),
  197. :deep(.wd-input__clear) {
  198. font-size: $-input-icon-size-large;
  199. }
  200. }
  201. @include e(inner) {
  202. flex: 1;
  203. height: $-input-inner-height;
  204. font-size: $-input-fs;
  205. color: $-input-color;
  206. outline: none;
  207. border: none;
  208. background: none;
  209. padding: 0;
  210. box-sizing: border-box;
  211. &::-webkit-input-placeholder {
  212. color: $-input-placeholder-color;
  213. }
  214. @include when(align-right) {
  215. text-align: right;
  216. }
  217. }
  218. @include e(readonly-mask) {
  219. position: absolute;
  220. top: 0;
  221. left: 0;
  222. z-index: 2;
  223. width: 100%;
  224. height: 100%;
  225. }
  226. @include edeep(icon) {
  227. margin-left: $-input-icon-margin;
  228. font-size: $-input-icon-size;
  229. color: $-input-icon-color;
  230. vertical-align: middle;
  231. background: $-input-bg;
  232. }
  233. @include edeep(clear) {
  234. margin-left: $-input-icon-margin;
  235. font-size: $-input-icon-size;
  236. color: $-input-clear-color;
  237. vertical-align: middle;
  238. background: $-input-bg;
  239. }
  240. @include e(count) {
  241. margin-left: 15px;
  242. font-size: $-input-count-fs;
  243. color: $-input-count-color;
  244. vertical-align: middle;
  245. background: $-input-bg;
  246. }
  247. @include e(count-current) {
  248. color: $-input-count-current-color;
  249. @include when(error) {
  250. color: $-input-error-color;
  251. }
  252. }
  253. .wd-input__count,
  254. .wd-input__count-current {
  255. display: inline-flex;
  256. }
  257. }