index-pure.less 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. @import '../../style/themes/index';
  2. @import '../../style/mixins/index';
  3. @calendar-prefix-cls: ~'@{ant-prefix}-picker-calendar';
  4. @calendar-picker-prefix-cls: ~'@{ant-prefix}-picker';
  5. .@{calendar-prefix-cls} {
  6. .reset-component();
  7. background: @calendar-full-bg;
  8. // ========================= Header =========================
  9. &-header {
  10. display: flex;
  11. justify-content: flex-end;
  12. padding: @padding-sm 0;
  13. .@{calendar-prefix-cls}-year-select {
  14. min-width: 80px;
  15. }
  16. .@{calendar-prefix-cls}-month-select {
  17. min-width: 70px;
  18. margin-left: @padding-xs;
  19. }
  20. .@{calendar-prefix-cls}-mode-switch {
  21. margin-left: @padding-xs;
  22. }
  23. }
  24. .@{calendar-picker-prefix-cls}-panel {
  25. background: @calendar-full-panel-bg;
  26. border: 0;
  27. border-top: @border-width-base @border-style-base @border-color-split;
  28. border-radius: 0;
  29. .@{calendar-picker-prefix-cls}-month-panel,
  30. .@{calendar-picker-prefix-cls}-date-panel {
  31. width: auto;
  32. }
  33. .@{calendar-picker-prefix-cls}-body {
  34. padding: @padding-xs 0;
  35. }
  36. .@{calendar-picker-prefix-cls}-content {
  37. width: 100%;
  38. }
  39. }
  40. // ========================== Mini ==========================
  41. &-mini {
  42. border-radius: @border-radius-base;
  43. .@{calendar-picker-prefix-cls}-calendar-header {
  44. padding-right: @padding-xs;
  45. padding-left: @padding-xs;
  46. }
  47. .@{calendar-picker-prefix-cls}-panel {
  48. border-radius: 0 0 @border-radius-base @border-radius-base;
  49. }
  50. .@{calendar-picker-prefix-cls}-content {
  51. height: 256px;
  52. th {
  53. height: auto;
  54. padding: 0;
  55. line-height: 18px;
  56. }
  57. }
  58. }
  59. // ========================== Full ==========================
  60. &-full {
  61. .@{calendar-picker-prefix-cls}-panel {
  62. display: block;
  63. width: 100%;
  64. text-align: right;
  65. background: @calendar-full-bg;
  66. border: 0;
  67. .@{calendar-picker-prefix-cls}-body {
  68. th,
  69. td {
  70. padding: 0;
  71. }
  72. th {
  73. height: auto;
  74. padding: 0 12px 5px 0;
  75. line-height: 18px;
  76. }
  77. }
  78. // Cell
  79. .@{calendar-picker-prefix-cls}-cell {
  80. &::before {
  81. display: none;
  82. }
  83. &:hover {
  84. .@{calendar-prefix-cls}-date {
  85. background: @item-hover-bg;
  86. }
  87. }
  88. .@{calendar-prefix-cls}-date-today::before {
  89. display: none;
  90. }
  91. &-selected,
  92. &-selected:hover {
  93. .@{calendar-prefix-cls}-date,
  94. .@{calendar-prefix-cls}-date-today {
  95. background: @calendar-item-active-bg;
  96. .@{calendar-prefix-cls}-date-value {
  97. color: @primary-color;
  98. }
  99. }
  100. }
  101. }
  102. // Cell date
  103. .@{calendar-prefix-cls}-date {
  104. display: block;
  105. width: auto;
  106. height: auto;
  107. margin: 0 (@padding-xs / 2);
  108. padding: (@padding-xs / 2) @padding-xs 0;
  109. border: 0;
  110. border-top: 2px solid @border-color-split;
  111. border-radius: 0;
  112. transition: background 0.3s;
  113. &-value {
  114. line-height: 24px;
  115. transition: color 0.3s;
  116. }
  117. &-content {
  118. position: static;
  119. width: auto;
  120. height: 86px;
  121. overflow-y: auto;
  122. color: @text-color;
  123. line-height: @line-height-base;
  124. text-align: left;
  125. }
  126. &-today {
  127. border-color: @primary-color;
  128. .@{calendar-prefix-cls}-date-value {
  129. color: @text-color;
  130. }
  131. }
  132. }
  133. }
  134. }
  135. }
  136. @media only screen and (max-width: @screen-xs) {
  137. .@{calendar-prefix-cls} {
  138. &-header {
  139. display: block;
  140. .@{calendar-prefix-cls}-year-select {
  141. width: 50%;
  142. }
  143. .@{calendar-prefix-cls}-month-select {
  144. width: ~'calc(50% - @{padding-xs})';
  145. }
  146. .@{calendar-prefix-cls}-mode-switch {
  147. width: 100%;
  148. margin-top: @padding-xs;
  149. margin-left: 0;
  150. > label {
  151. width: 50%;
  152. text-align: center;
  153. }
  154. }
  155. }
  156. }
  157. }
  158. @import './rtl';