index.less 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. @import '../style/var';
  2. .van-number-keyboard {
  3. left: 0;
  4. bottom: 0;
  5. width: 100%;
  6. position: fixed;
  7. user-select: none;
  8. background-color: @white;
  9. animation-timing-function: ease-out;
  10. &__title {
  11. height: 30px;
  12. font-size: 14px;
  13. line-height: 30px;
  14. text-align: center;
  15. position: relative;
  16. color: @gray-darker;
  17. &-left {
  18. left: 0;
  19. position: absolute;
  20. }
  21. }
  22. &__body {
  23. box-sizing: border-box;
  24. }
  25. &__close {
  26. right: 0;
  27. color: @blue;
  28. font-size: 14px;
  29. padding: 0 15px;
  30. position: absolute;
  31. &:active {
  32. background-color: @active-color;
  33. }
  34. }
  35. &__sidebar {
  36. top: 0;
  37. right: 0;
  38. width: 25%;
  39. position: absolute;
  40. height: @number-keyboard-key-height * 4;
  41. }
  42. &--custom {
  43. .van-number-keyboard__body {
  44. padding-right: 25%;
  45. }
  46. }
  47. &--safe-area-inset-bottom {
  48. padding-bottom: constant(safe-area-inset-bottom);
  49. padding-bottom: env(safe-area-inset-bottom);
  50. }
  51. }
  52. .van-key {
  53. width: 100% / 3;
  54. font-size: 24px;
  55. font-style: normal;
  56. text-align: center;
  57. display: inline-block;
  58. vertical-align: middle;
  59. height: @number-keyboard-key-height;
  60. line-height: @number-keyboard-key-height;
  61. &::after {
  62. border-width: 1px 1px 0 0;
  63. }
  64. &--middle {
  65. width: 200% / 3;
  66. }
  67. &--big {
  68. width: 100%;
  69. height: @number-keyboard-key-height * 2;
  70. line-height: @number-keyboard-key-height * 2;
  71. }
  72. &--blue,
  73. &--delete {
  74. font-size: 16px;
  75. }
  76. &--blue {
  77. color: @white;
  78. background-color: @blue;
  79. &.van-key--active {
  80. background-color: @blue;
  81. }
  82. &::after {
  83. border-color: @blue;
  84. }
  85. }
  86. &--gray {
  87. background-color: @number-keyboard-key-background;
  88. }
  89. &--active {
  90. background-color: @active-color;
  91. }
  92. }