index.less 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. @import '../style/var';
  2. .van-picker {
  3. position: relative;
  4. background-color: @picker-background-color;
  5. user-select: none;
  6. &__toolbar {
  7. display: flex;
  8. align-items: center;
  9. justify-content: space-between;
  10. height: @picker-toolbar-height;
  11. }
  12. &__cancel,
  13. &__confirm {
  14. height: 100%;
  15. padding: @picker-action-padding;
  16. font-size: @picker-action-font-size;
  17. background-color: transparent;
  18. border: none;
  19. cursor: pointer;
  20. &:active {
  21. opacity: @active-opacity;
  22. }
  23. }
  24. &__confirm {
  25. color: @picker-confirm-action-color;
  26. }
  27. &__cancel {
  28. color: @picker-cancel-action-color;
  29. }
  30. &__title {
  31. max-width: 50%;
  32. font-weight: @font-weight-bold;
  33. font-size: @picker-title-font-size;
  34. line-height: @picker-title-line-height;
  35. text-align: center;
  36. }
  37. &__columns {
  38. position: relative;
  39. display: flex;
  40. cursor: grab;
  41. }
  42. &__loading {
  43. position: absolute;
  44. top: 0;
  45. right: 0;
  46. bottom: 0;
  47. left: 0;
  48. z-index: 3;
  49. display: flex;
  50. align-items: center;
  51. justify-content: center;
  52. color: @picker-loading-icon-color;
  53. background-color: @picker-loading-mask-color;
  54. }
  55. &__frame {
  56. position: absolute;
  57. top: 50%;
  58. right: @padding-md;
  59. left: @padding-md;
  60. z-index: 2;
  61. transform: translateY(-50%);
  62. pointer-events: none;
  63. }
  64. &__mask {
  65. position: absolute;
  66. top: 0;
  67. left: 0;
  68. z-index: 1;
  69. width: 100%;
  70. height: 100%;
  71. background-image: linear-gradient(
  72. 180deg,
  73. hsla(0, 0%, 100%, 0.9),
  74. hsla(0, 0%, 100%, 0.4)
  75. ),
  76. linear-gradient(0deg, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.4));
  77. background-repeat: no-repeat;
  78. background-position: top, bottom;
  79. // fix rendering failure during animation on safari
  80. transform: translateZ(0);
  81. pointer-events: none;
  82. }
  83. &-column {
  84. flex: 1;
  85. overflow: hidden;
  86. font-size: @picker-option-font-size;
  87. &__wrapper {
  88. transition-timing-function: cubic-bezier(0.23, 1, 0.68, 1);
  89. }
  90. &__item {
  91. display: flex;
  92. align-items: center;
  93. justify-content: center;
  94. padding: 0 @padding-base;
  95. color: @picker-option-text-color;
  96. &--disabled {
  97. cursor: not-allowed;
  98. opacity: @picker-option-disabled-opacity;
  99. }
  100. }
  101. }
  102. }