index.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. .nut-theme-dark {
  2. .nut-input {
  3. background: $dark-background;
  4. &__label {
  5. color: $dark-color;
  6. }
  7. .input-text,
  8. &__text--readonly {
  9. color: $dark-color;
  10. }
  11. }
  12. }
  13. input,
  14. textarea {
  15. font: inherit;
  16. .nut-placeholder {
  17. // font: inherit;
  18. }
  19. }
  20. textarea {
  21. .nut-placeholder {
  22. // padding: 0 2px;
  23. // font: inherit;
  24. }
  25. }
  26. .nut-input {
  27. position: relative;
  28. width: 100%;
  29. padding: 10px 25px;
  30. display: flex;
  31. line-height: 20px;
  32. background: $white;
  33. font-size: $input-font-size;
  34. box-sizing: border-box;
  35. &.center {
  36. align-items: center;
  37. }
  38. &--border {
  39. border-bottom: 1px solid $input-border-bottom;
  40. }
  41. .input-text,
  42. &__text--readonly {
  43. width: 100%;
  44. padding: 0;
  45. // padding-right: 35px;
  46. line-height: inherit;
  47. text-align: left;
  48. outline: 0 none;
  49. border: 0;
  50. text-decoration: none;
  51. background: transparent;
  52. resize: none;
  53. flex: 1;
  54. }
  55. .input-text {
  56. font-size: $input-font-size;
  57. height: auto;
  58. min-height: auto;
  59. }
  60. &__label {
  61. width: 80px;
  62. overflow: hidden;
  63. margin-right: 6px;
  64. text-align: left;
  65. }
  66. &-value {
  67. flex: 1;
  68. vertical-align: middle;
  69. }
  70. &-inner {
  71. position: relative;
  72. display: flex;
  73. align-items: center;
  74. }
  75. &-box {
  76. position: relative;
  77. width: 100%;
  78. display: flex;
  79. }
  80. &-disabled-mask {
  81. position: absolute;
  82. width: 100%;
  83. height: 100%;
  84. top: 0;
  85. left: 0;
  86. z-index: 2;
  87. }
  88. &-word-limit {
  89. display: flex;
  90. justify-content: flex-end;
  91. color: #808080;
  92. font-size: 12px;
  93. padding: 0 10px;
  94. // margin-top: -50%;
  95. // line-height: var(--van-field-word-limit-line-height);
  96. }
  97. &-left-icon,
  98. &-right-icon {
  99. display: flex;
  100. align-items: center;
  101. font-size: 0;
  102. }
  103. &-clear,
  104. &-right-icon {
  105. margin-left: 4px;
  106. }
  107. &-left-icon {
  108. margin-right: 4px;
  109. }
  110. &-clear-box {
  111. height: 100%;
  112. .nut-input-clear {
  113. vertical-align: -2px;
  114. }
  115. }
  116. &-clear {
  117. width: 16px;
  118. height: 16px;
  119. color: #c8c9cc;
  120. cursor: pointer;
  121. }
  122. .nut-button {
  123. margin-left: 10px;
  124. }
  125. &--required {
  126. &::before {
  127. position: absolute;
  128. left: 14px;
  129. color: $input-required-color;
  130. content: '*';
  131. }
  132. }
  133. &--disabled {
  134. color: $input-disabled-color !important;
  135. input:disabled {
  136. background: none;
  137. color: $input-disabled-color;
  138. cursor: not-allowed;
  139. opacity: 1;
  140. -webkit-text-fill-color: $input-disabled-color;
  141. }
  142. }
  143. &--error,
  144. &--error::placeholder {
  145. color: $input-required-color;
  146. -webkit-text-fill-color: $input-required-color;
  147. }
  148. }
  149. .nut-form-item {
  150. .nut-input {
  151. padding: 0px;
  152. margin: 0px;
  153. line-height: var(--nut-cell-line-height);
  154. }
  155. }