MonthPanel.less 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. .@{calendar-prefix-cls}-month-panel {
  2. position: absolute;
  3. top: 0;
  4. right: 0;
  5. bottom: 0;
  6. left: 0;
  7. z-index: @zindex-picker-panel;
  8. background: @component-background;
  9. border-radius: @border-radius-base;
  10. outline: none;
  11. > div {
  12. display: flex;
  13. flex-direction: column;
  14. // TODO: this is a useless wrapper, and we need to remove it in rc-calendar
  15. height: 100%;
  16. }
  17. }
  18. .@{calendar-prefix-cls}-month-panel-hidden {
  19. display: none;
  20. }
  21. .@{calendar-prefix-cls}-month-panel-header {
  22. .calendarPanelHeader(~'@{calendar-prefix-cls}-month-panel');
  23. position: relative;
  24. }
  25. .@{calendar-prefix-cls}-month-panel-body {
  26. flex: 1;
  27. }
  28. .@{calendar-prefix-cls}-month-panel-footer {
  29. border-top: @border-width-base @border-style-base @border-color-split;
  30. .@{calendar-prefix-cls}-footer-extra {
  31. padding: 0 12px;
  32. }
  33. }
  34. .@{calendar-prefix-cls}-month-panel-table {
  35. width: 100%;
  36. height: 100%;
  37. table-layout: fixed;
  38. border-collapse: separate;
  39. }
  40. .@{calendar-prefix-cls}-month-panel-selected-cell .@{calendar-prefix-cls}-month-panel-month {
  41. color: @text-color-inverse;
  42. background: @primary-color;
  43. &:hover {
  44. color: @text-color-inverse;
  45. background: @primary-color;
  46. }
  47. }
  48. .@{calendar-prefix-cls}-month-panel-cell {
  49. text-align: center;
  50. &-disabled .@{calendar-prefix-cls}-month-panel-month {
  51. &,
  52. &:hover {
  53. color: @disabled-color;
  54. background: @disabled-bg;
  55. cursor: not-allowed;
  56. }
  57. }
  58. }
  59. .@{calendar-prefix-cls}-month-panel-month {
  60. display: inline-block;
  61. height: 24px;
  62. margin: 0 auto;
  63. padding: 0 8px;
  64. color: @text-color;
  65. line-height: 24px;
  66. text-align: center;
  67. background: transparent;
  68. border-radius: @border-radius-sm;
  69. transition: background 0.3s ease;
  70. &:hover {
  71. background: @item-hover-bg;
  72. cursor: pointer;
  73. }
  74. }