index.less 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. @import '~antd/es/style/themes/default.less';
  2. @pro-header-hover-bg: rgba(0, 0, 0, 0.025);
  3. .menu {
  4. :global(.anticon) {
  5. margin-right: 8px;
  6. }
  7. :global(.ant-dropdown-menu-item) {
  8. min-width: 160px;
  9. }
  10. }
  11. .right {
  12. display: flex;
  13. float: right;
  14. height: 48px;
  15. margin-left: auto;
  16. overflow: hidden;
  17. .action {
  18. display: flex;
  19. align-items: center;
  20. height: 100%;
  21. padding: 0 12px;
  22. cursor: pointer;
  23. transition: all 0.3s;
  24. > span {
  25. vertical-align: middle;
  26. }
  27. &:hover {
  28. background: @pro-header-hover-bg;
  29. }
  30. &:global(.opened) {
  31. background: @pro-header-hover-bg;
  32. }
  33. }
  34. .search {
  35. padding: 0 12px;
  36. &:hover {
  37. background: transparent;
  38. }
  39. }
  40. .account {
  41. .avatar {
  42. margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
  43. margin-right: 8px;
  44. color: @primary-color;
  45. vertical-align: top;
  46. background: rgba(255, 255, 255, 0.85);
  47. }
  48. }
  49. }
  50. .dark {
  51. .action {
  52. color: rgba(255, 255, 255, 0.85);
  53. > span {
  54. color: rgba(255, 255, 255, 0.85);
  55. }
  56. &:hover,
  57. &:global(.opened) {
  58. background: @primary-color;
  59. }
  60. }
  61. }
  62. :global(.ant-pro-global-header) {
  63. .dark {
  64. .action {
  65. color: @text-color;
  66. > span {
  67. color: @text-color;
  68. }
  69. &:hover {
  70. color: rgba(255, 255, 255, 0.85);
  71. > span {
  72. color: rgba(255, 255, 255, 0.85);
  73. }
  74. }
  75. }
  76. }
  77. }