input.css 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. uni-input {
  2. display: block;
  3. font-size: 16px;
  4. line-height: 1.4em;
  5. height: 1.4em;
  6. min-height: 1.4em;
  7. overflow: hidden;
  8. }
  9. uni-input[hidden] {
  10. display: none;
  11. }
  12. .uni-input-wrapper,
  13. .uni-input-placeholder,
  14. .uni-input-form,
  15. .uni-input-input {
  16. outline: none;
  17. border: none;
  18. padding: 0;
  19. margin: 0;
  20. text-decoration: inherit;
  21. }
  22. .uni-input-wrapper,
  23. .uni-input-form {
  24. display: flex;
  25. position: relative;
  26. width: 100%;
  27. height: 100%;
  28. flex-direction: column;
  29. justify-content: center;
  30. }
  31. .uni-input-placeholder,
  32. .uni-input-input {
  33. width: 100%;
  34. }
  35. .uni-input-placeholder {
  36. position: absolute;
  37. top: auto !important;
  38. left: 0;
  39. color: gray;
  40. overflow: hidden;
  41. text-overflow: clip;
  42. white-space: pre;
  43. word-break: keep-all;
  44. pointer-events: none;
  45. line-height: inherit;
  46. }
  47. .uni-input-input {
  48. position: relative;
  49. display: block;
  50. height: 100%;
  51. background: none;
  52. color: inherit;
  53. opacity: 1;
  54. font: inherit;
  55. line-height: inherit;
  56. letter-spacing: inherit;
  57. text-align: inherit;
  58. text-indent: inherit;
  59. text-transform: inherit;
  60. text-shadow: inherit;
  61. }
  62. .uni-input-input[type='search']::-webkit-search-cancel-button,
  63. .uni-input-input[type="search"]::-webkit-search-decoration {
  64. display: none;
  65. }
  66. .uni-input-input::-webkit-outer-spin-button,
  67. .uni-input-input::-webkit-inner-spin-button {
  68. appearance: none;
  69. margin: 0;
  70. }
  71. .uni-input-input[type='number'] {
  72. -moz-appearance: textfield;
  73. }
  74. .uni-input-input:disabled {
  75. /* 用于重置iOS14以下禁用状态文字颜色 */
  76. -webkit-text-fill-color: currentcolor;
  77. }