index.less 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. @header-trigger-prefix-cls: ~'@{namespace}-layout-header-trigger';
  2. @header-prefix-cls: ~'@{namespace}-layout-header';
  3. @breadcrumb-prefix-cls: ~'@{namespace}-layout-breadcrumb';
  4. @logo-prefix-cls: ~'@{namespace}-app-logo';
  5. .@{header-prefix-cls} {
  6. display: flex;
  7. height: @header-height;
  8. padding: 0;
  9. margin-left: -1px;
  10. line-height: @header-height;
  11. color: @white;
  12. background: @white;
  13. align-items: center;
  14. justify-content: space-between;
  15. &--mobile {
  16. .@{breadcrumb-prefix-cls},
  17. .error-action,
  18. .notify-item,
  19. .fullscreen-item {
  20. display: none;
  21. }
  22. .@{logo-prefix-cls} {
  23. min-width: unset;
  24. padding-right: 0;
  25. &__title {
  26. display: none;
  27. }
  28. }
  29. .@{header-trigger-prefix-cls} {
  30. padding: 0 4px 0 8px !important;
  31. }
  32. .@{header-prefix-cls}-action {
  33. padding-right: 4px;
  34. }
  35. }
  36. &--fixed {
  37. position: fixed;
  38. top: 0;
  39. left: 0;
  40. z-index: @layout-header-fixed-z-index;
  41. width: 100%;
  42. }
  43. &-logo {
  44. height: @header-height;
  45. min-width: 192px;
  46. padding: 0 10px;
  47. font-size: 14px;
  48. img {
  49. width: @logo-width;
  50. height: @logo-width;
  51. margin-right: 2px;
  52. }
  53. }
  54. &-left {
  55. display: flex;
  56. height: 100%;
  57. align-items: center;
  58. .@{header-trigger-prefix-cls} {
  59. display: flex;
  60. height: 100%;
  61. padding: 1px 10px 0 10px;
  62. cursor: pointer;
  63. align-items: center;
  64. .anticon {
  65. font-size: 16px;
  66. }
  67. &.light {
  68. &:hover {
  69. background: @header-light-bg-hover-color;
  70. }
  71. svg {
  72. fill: #000;
  73. }
  74. }
  75. &.dark {
  76. &:hover {
  77. background: @header-dark-bg-hover-color;
  78. }
  79. }
  80. }
  81. }
  82. &-menu {
  83. height: 100%;
  84. min-width: 0;
  85. flex: 1;
  86. align-items: center;
  87. }
  88. &-action {
  89. display: flex;
  90. min-width: 180px;
  91. // padding-right: 12px;
  92. align-items: center;
  93. &__item {
  94. display: flex !important;
  95. height: @header-height;
  96. padding: 0 2px;
  97. font-size: 1.2em;
  98. cursor: pointer;
  99. align-items: center;
  100. .ant-badge {
  101. height: @header-height;
  102. line-height: @header-height;
  103. }
  104. .ant-badge-dot {
  105. top: 10px;
  106. right: 2px;
  107. }
  108. }
  109. span[role='img'] {
  110. padding: 0 8px;
  111. }
  112. }
  113. &--light {
  114. background: @white;
  115. border-bottom: 1px solid @header-light-bottom-border-color;
  116. border-left: 1px solid @header-light-bottom-border-color;
  117. .@{header-prefix-cls}-logo {
  118. color: @text-color-base;
  119. &:hover {
  120. background: @header-light-bg-hover-color;
  121. }
  122. }
  123. .@{header-prefix-cls}-action {
  124. &__item {
  125. color: @text-color-base;
  126. .app-iconify {
  127. padding: 0 10px;
  128. font-size: 16px !important;
  129. }
  130. &:hover {
  131. background: @header-light-bg-hover-color;
  132. }
  133. }
  134. &-icon,
  135. span[role='img'] {
  136. color: @text-color-base;
  137. }
  138. }
  139. }
  140. &--dark {
  141. background: @header-dark-bg-color;
  142. .@{header-prefix-cls}-logo {
  143. &:hover {
  144. background: @header-dark-bg-hover-color;
  145. }
  146. }
  147. .@{header-prefix-cls}-action {
  148. &__item {
  149. &:hover {
  150. background: @header-dark-bg-hover-color;
  151. }
  152. }
  153. }
  154. }
  155. }