index.less 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. @import (reference) './variable.less';
  2. @checkboxItemPrefix: ant-calendar;
  3. .@{checkboxItemPrefix} {
  4. color: @COLOR_TEXT_PRIMARY;
  5. position: relative;
  6. display: flex;
  7. flex-direction: column;
  8. height: 100%;
  9. &-body {
  10. flex: 1;
  11. }
  12. &-sticky {
  13. position: absolute;
  14. top: 0px;
  15. left: 0px;
  16. max-height: @calendar-month-title-height;
  17. width: 100%;
  18. overflow: hidden;
  19. top: @calendar-weekday-names-height;
  20. z-index: @calendar-sticky-title-z-index;
  21. }
  22. &-mark {
  23. height: @calendar-weekday-names-height;
  24. display: flex;
  25. flex-direction: row;
  26. justify-content: flex-start;
  27. align-items: center;
  28. box-sizing: border-box;
  29. font-size: @calendar-weekday-names-font-size;
  30. padding: 0 @calendar-cells-padding;
  31. & &-cell {
  32. flex: 1;
  33. text-align: center;
  34. width: calc((100% - 6 * @calendar-cell-space-size) / 7);
  35. margin-right: @calendar-cell-space-size;
  36. }
  37. & &-cell-last {
  38. margin-right: 0;
  39. }
  40. }
  41. &-title {
  42. color: @COLOR_TEXT_PRIMARY_DEFAULT;
  43. font-size: @font-size-title;
  44. height: @calendar-month-title-height;
  45. line-height: @calendar-month-title-height;
  46. padding-left: @calendar-weekday-names-left-padding;
  47. margin-bottom: @calendar-weekday-names-bottom-margin;
  48. background: @calendar-weekday-names-background-color;
  49. }
  50. &-cells {
  51. display: flex;
  52. flex-direction: row;
  53. flex-wrap: wrap;
  54. justify-content: flex-start;
  55. align-items: stretch;
  56. padding: 0 @calendar-cells-padding;
  57. }
  58. &-cell-space {
  59. width: @calendar-cell-space-size;
  60. height: @calendar-cell-height;
  61. }
  62. &-cell-space-active {
  63. background: fade(@COLOR_BRAND1, 10%);
  64. }
  65. &-cell {
  66. box-sizing: border-box;
  67. width: calc((100% - 6 * @calendar-cell-space-size) / 7);
  68. height: @calendar-cell-height;
  69. margin-bottom: @calendar-cell-bottom-margin;
  70. position: relative;
  71. &-container {
  72. box-sizing: border-box;
  73. padding-top: @calendar-cell-top-padding;
  74. height: 100%;
  75. }
  76. &-top {
  77. color: @COLOR_TEXT_ASSIST_DEFAULT;
  78. text-align: center;
  79. font-size: @calendar-cell-top-font-size;
  80. height: @calendar-cell-top-height;
  81. &-text {
  82. white-space: nowrap;
  83. }
  84. }
  85. &-center {
  86. text-align: center;
  87. height: @calendar-cell-center-height;
  88. font-size: @calendar-cell-center-font-size;
  89. }
  90. &-bottom {
  91. color: @COLOR_TEXT_ASSIST_DEFAULT;
  92. text-align: center;
  93. font-size: @calendar-cell-bottom-font-size;
  94. height: @calendar-cell-bottom-height;
  95. }
  96. &-selected {
  97. background: fade(@COLOR_BRAND1, 10%);
  98. }
  99. &-selected-begin {
  100. border-top-left-radius: @corner-radius-md;
  101. border-bottom-left-radius: @corner-radius-md;
  102. background: fade(@COLOR_BRAND1, 10%);
  103. }
  104. &-selected-end {
  105. border-top-right-radius: @corner-radius-md;
  106. border-bottom-right-radius: @corner-radius-md;
  107. color: @COLOR_WHITE_DEFAULT;
  108. }
  109. &-selected-row-end {
  110. border-top-right-radius: @corner-radius-md;
  111. border-bottom-right-radius: @corner-radius-md;
  112. }
  113. &-selected-row-begin {
  114. border-top-left-radius: @corner-radius-md;
  115. border-bottom-left-radius: @corner-radius-md;
  116. }
  117. &-selected-begin &-container {
  118. background: @COLOR_BRAND1_DEFAULT;
  119. border-radius: @corner-radius-md;
  120. color: @COLOR_WHITE_DEFAULT;
  121. }
  122. &-selected-end &-container {
  123. background: @COLOR_BRAND1_DEFAULT;
  124. border-radius: @corner-radius-md;
  125. color: @COLOR_WHITE_DEFAULT;
  126. }
  127. &-selected-end &-top {
  128. color: @COLOR_WHITE_DEFAULT;
  129. }
  130. &-selected-begin &-top {
  131. color: @COLOR_WHITE_DEFAULT;
  132. }
  133. &-selected-end &-bottom {
  134. color: @COLOR_WHITE_DEFAULT;
  135. }
  136. &-selected-begin &-bottom {
  137. color: @COLOR_WHITE_DEFAULT;
  138. }
  139. }
  140. &-cell-disabled {
  141. opacity: @calendar-cell-disabled-opacity;
  142. }
  143. &-cell-hidden {
  144. opacity: 0;
  145. }
  146. }