time-spinner.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. @use '../mixins/mixins' as *;
  2. @use '../common/var' as *;
  3. @include b(time-spinner) {
  4. &.has-seconds {
  5. .#{$namespace}-time-spinner__wrapper {
  6. width: 33.3%;
  7. }
  8. }
  9. @include e(wrapper) {
  10. max-height: 192px;
  11. overflow: auto;
  12. display: inline-block;
  13. width: 50%;
  14. vertical-align: top;
  15. position: relative;
  16. &.#{$namespace}-scrollbar__wrap:not(.#{$namespace}-scrollbar__wrap--hidden-default) {
  17. padding-bottom: 15px;
  18. }
  19. @include when(arrow) {
  20. box-sizing: border-box;
  21. text-align: center;
  22. overflow: hidden;
  23. .#{$namespace}-time-spinner__list {
  24. transform: translateY(-32px);
  25. }
  26. .#{$namespace}-time-spinner__item:hover:not(.is-disabled):not(.is-active) {
  27. background: getCssVar('fill-color', 'light');
  28. cursor: default;
  29. }
  30. }
  31. }
  32. @include e(arrow) {
  33. font-size: 12px;
  34. color: getCssVar('text-color', 'secondary');
  35. position: absolute;
  36. left: 0;
  37. width: 100%;
  38. z-index: getCssVar('index-normal');
  39. text-align: center;
  40. height: 30px;
  41. line-height: 30px;
  42. cursor: pointer;
  43. &:hover {
  44. color: getCssVar('color-primary');
  45. }
  46. &.arrow-up {
  47. top: 10px;
  48. }
  49. &.arrow-down {
  50. bottom: 10px;
  51. }
  52. }
  53. @include e(input) {
  54. &.#{$namespace}-input {
  55. width: 70%;
  56. .#{$namespace}-input__inner {
  57. padding: 0;
  58. text-align: center;
  59. }
  60. }
  61. }
  62. @include e(list) {
  63. padding: 0;
  64. margin: 0;
  65. list-style: none;
  66. text-align: center;
  67. &::after,
  68. &::before {
  69. content: '';
  70. display: block;
  71. width: 100%;
  72. height: 80px;
  73. }
  74. }
  75. @include e(item) {
  76. height: 32px;
  77. line-height: 32px;
  78. font-size: 12px;
  79. color: getCssVar('text-color', 'regular');
  80. &:hover:not(.is-disabled):not(.is-active) {
  81. background: getCssVar('fill-color', 'light');
  82. cursor: pointer;
  83. }
  84. &.is-active:not(.is-disabled) {
  85. color: getCssVar('text-color', 'primary');
  86. font-weight: bold;
  87. }
  88. &.is-disabled {
  89. color: getCssVar('text-color', 'placeholder');
  90. cursor: not-allowed;
  91. }
  92. }
  93. }