index.less 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. @import '../style/var';
  2. .van-number-keyboard {
  3. position: fixed;
  4. bottom: 0;
  5. left: 0;
  6. z-index: @number-keyboard-z-index;
  7. width: 100%;
  8. padding-bottom: 22px;
  9. background-color: @number-keyboard-background-color;
  10. user-select: none;
  11. &--with-title {
  12. border-radius: 20px 20px 0 0;
  13. }
  14. &__header {
  15. position: relative;
  16. display: flex;
  17. align-items: center;
  18. justify-content: center;
  19. box-sizing: content-box;
  20. height: @number-keyboard-title-height;
  21. padding-top: 6px;
  22. color: @number-keyboard-title-color;
  23. font-size: @number-keyboard-title-font-size;
  24. }
  25. &__title {
  26. display: inline-block;
  27. font-weight: normal;
  28. &-left {
  29. position: absolute;
  30. left: 0;
  31. }
  32. }
  33. &__body {
  34. display: flex;
  35. padding: 6px 0 0 6px;
  36. }
  37. &__keys {
  38. display: flex;
  39. flex: 3;
  40. flex-wrap: wrap;
  41. }
  42. &__close {
  43. position: absolute;
  44. right: 0;
  45. height: 100%;
  46. padding: @number-keyboard-close-padding;
  47. color: @number-keyboard-close-color;
  48. font-size: @number-keyboard-close-font-size;
  49. background-color: transparent;
  50. border: none;
  51. cursor: pointer;
  52. &:active {
  53. opacity: @active-opacity;
  54. }
  55. }
  56. &__sidebar {
  57. display: flex;
  58. flex: 1;
  59. flex-direction: column;
  60. }
  61. &--unfit {
  62. padding-bottom: 0;
  63. }
  64. }
  65. .van-key {
  66. display: flex;
  67. align-items: center;
  68. justify-content: center;
  69. height: @number-keyboard-key-height;
  70. font-size: @number-keyboard-key-font-size;
  71. line-height: 1.5;
  72. background-color: @white;
  73. border-radius: @border-radius-lg;
  74. cursor: pointer;
  75. &--large {
  76. // height: 100% can't fill flex parent on legacy safari
  77. // see: https://stackoverflow.com/questions/33636796
  78. position: absolute;
  79. top: 0;
  80. right: 6px;
  81. bottom: 6px;
  82. left: 0;
  83. height: auto;
  84. }
  85. &--blue,
  86. &--delete {
  87. font-size: @number-keyboard-delete-font-size;
  88. }
  89. &--active {
  90. background-color: @number-keyboard-key-active-color;
  91. }
  92. &--blue {
  93. color: @number-keyboard-button-text-color;
  94. background-color: @number-keyboard-button-background-color;
  95. &.van-key--active {
  96. background-color: darken(@number-keyboard-button-background-color, 10%);
  97. }
  98. }
  99. &__wrapper {
  100. position: relative;
  101. flex: 1;
  102. flex-basis: 33%;
  103. box-sizing: border-box;
  104. padding: 0 6px 6px 0;
  105. &--wider {
  106. flex-basis: 66%;
  107. }
  108. }
  109. &__delete-icon {
  110. width: 32px;
  111. height: 22px;
  112. }
  113. &__collapse-icon {
  114. width: 30px;
  115. height: 24px;
  116. }
  117. &__loading-icon {
  118. color: @number-keyboard-button-text-color;
  119. }
  120. }