YearPanel.less 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. .@{calendar-prefix-cls}-year-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}-year-panel-hidden {
  19. display: none;
  20. }
  21. .@{calendar-prefix-cls}-year-panel-header {
  22. .calendarPanelHeader(~'@{calendar-prefix-cls}-year-panel');
  23. position: relative;
  24. }
  25. .@{calendar-prefix-cls}-year-panel-body {
  26. flex: 1;
  27. }
  28. .@{calendar-prefix-cls}-year-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}-year-panel-table {
  35. width: 100%;
  36. height: 100%;
  37. table-layout: fixed;
  38. border-collapse: separate;
  39. }
  40. .@{calendar-prefix-cls}-year-panel-cell {
  41. text-align: center;
  42. }
  43. .@{calendar-prefix-cls}-year-panel-year {
  44. display: inline-block;
  45. height: 24px;
  46. margin: 0 auto;
  47. padding: 0 8px;
  48. color: @text-color;
  49. line-height: 24px;
  50. text-align: center;
  51. background: transparent;
  52. border-radius: @border-radius-sm;
  53. transition: background 0.3s ease;
  54. &:hover {
  55. background: @item-hover-bg;
  56. cursor: pointer;
  57. }
  58. }
  59. .@{calendar-prefix-cls}-year-panel-selected-cell .@{calendar-prefix-cls}-year-panel-year {
  60. color: @text-color-inverse;
  61. background: @primary-color;
  62. &:hover {
  63. color: @text-color-inverse;
  64. background: @primary-color;
  65. }
  66. }
  67. .@{calendar-prefix-cls}-year-panel-last-decade-cell,
  68. .@{calendar-prefix-cls}-year-panel-next-decade-cell {
  69. .@{calendar-prefix-cls}-year-panel-year {
  70. color: @disabled-color;
  71. user-select: none;
  72. }
  73. }