8
0

year-table.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. @use '../mixins/mixins' as *;
  2. @use '../common/var' as *;
  3. @include b(year-table) {
  4. font-size: 12px;
  5. margin: -1px;
  6. border-collapse: collapse;
  7. .#{$namespace}-icon {
  8. color: getCssVar('datepicker', 'icon-color');
  9. }
  10. td {
  11. width: 68px;
  12. text-align: center;
  13. padding: 8px 0px;
  14. cursor: pointer;
  15. position: relative;
  16. @include b(date-table-cell) {
  17. height: 48px;
  18. padding: 6px 0;
  19. box-sizing: border-box;
  20. }
  21. &.today {
  22. .#{$namespace}-date-table-cell__text {
  23. color: getCssVar('color', 'primary');
  24. font-weight: bold;
  25. }
  26. &.start-date .#{$namespace}-date-table-cell__text,
  27. &.end-date .#{$namespace}-date-table-cell__text {
  28. color: $color-white;
  29. }
  30. }
  31. &.disabled .#{$namespace}-date-table-cell__text {
  32. background-color: getCssVar('fill-color', 'light');
  33. cursor: not-allowed;
  34. color: getCssVar('text-color', 'placeholder');
  35. &:hover {
  36. color: getCssVar('text-color', 'placeholder');
  37. }
  38. }
  39. @include b(date-table-cell__text) {
  40. width: 60px;
  41. height: 36px;
  42. display: block;
  43. line-height: 36px;
  44. color: getCssVar('datepicker-text-color');
  45. border-radius: 18px;
  46. margin: 0 auto;
  47. position: absolute;
  48. left: 50%;
  49. transform: translateX(-50%);
  50. &:hover {
  51. color: getCssVar('datepicker-hover-text-color');
  52. }
  53. }
  54. &.in-range .#{$namespace}-date-table-cell {
  55. background-color: getCssVar('datepicker-inrange-bg-color');
  56. &:hover {
  57. background-color: getCssVar('datepicker-inrange-hover-bg-color');
  58. }
  59. }
  60. &.start-date .#{$namespace}-date-table-cell,
  61. &.end-date .#{$namespace}-date-table-cell {
  62. color: $color-white;
  63. }
  64. &.start-date .#{$namespace}-date-table-cell__text,
  65. &.end-date .#{$namespace}-date-table-cell__text {
  66. color: $color-white;
  67. background-color: getCssVar('datepicker-active-color');
  68. }
  69. &.start-date .#{$namespace}-date-table-cell {
  70. border-top-left-radius: 24px;
  71. border-bottom-left-radius: 24px;
  72. }
  73. &.end-date .#{$namespace}-date-table-cell {
  74. border-top-right-radius: 24px;
  75. border-bottom-right-radius: 24px;
  76. }
  77. &.current:not(.disabled) .#{$namespace}-date-table-cell__text {
  78. color: $color-white;
  79. background-color: getCssVar('datepicker-active-color');
  80. }
  81. &:focus-visible {
  82. outline: none;
  83. .#{$namespace}-date-table-cell__text {
  84. outline: 2px solid getCssVar('datepicker-active-color');
  85. outline-offset: 1px;
  86. }
  87. }
  88. }
  89. }