index.less 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. align-items: center;
  8. justify-content: space-between;
  9. height: @header-height;
  10. margin-left: -1px;
  11. padding: 0;
  12. background-color: @white;
  13. color: @white;
  14. line-height: @header-height;
  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. z-index: @layout-header-fixed-z-index;
  39. top: 0;
  40. left: 0;
  41. width: 100%;
  42. }
  43. &-logo {
  44. min-width: 192px;
  45. height: @header-height;
  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. align-items: center;
  57. height: 100%;
  58. .@{header-trigger-prefix-cls} {
  59. display: flex;
  60. align-items: center;
  61. height: 100%;
  62. padding: 1px 10px 0;
  63. cursor: pointer;
  64. .anticon {
  65. font-size: 16px;
  66. }
  67. &.light {
  68. &:hover {
  69. background-color: @header-light-bg-hover-color;
  70. }
  71. svg {
  72. fill: #000;
  73. }
  74. }
  75. &.dark {
  76. &:hover {
  77. background-color: @header-dark-bg-hover-color;
  78. }
  79. }
  80. }
  81. }
  82. &-menu {
  83. flex: 1;
  84. align-items: center;
  85. min-width: 0;
  86. height: 100%;
  87. }
  88. &-action {
  89. display: flex;
  90. // padding-right: 12px;
  91. align-items: center;
  92. min-width: 180px;
  93. &__item {
  94. display: flex !important;
  95. align-items: center;
  96. height: @header-height;
  97. padding: 0 2px;
  98. font-size: 1.2em;
  99. cursor: pointer;
  100. .ant-badge {
  101. height: @header-height;
  102. line-height: @header-height;
  103. }
  104. .ant-badge-dot {
  105. top: 14px;
  106. right: 2px;
  107. }
  108. }
  109. span[role='img'] {
  110. padding: 0 8px;
  111. }
  112. }
  113. &--light {
  114. border-bottom: 1px solid @header-light-bottom-border-color;
  115. border-left: 1px solid @header-light-bottom-border-color;
  116. background-color: @white !important;
  117. .@{header-prefix-cls}-logo {
  118. color: @text-color-base;
  119. &:hover {
  120. background-color: @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-color: @header-light-bg-hover-color;
  132. }
  133. }
  134. &-icon,
  135. span[role='img'] {
  136. color: @text-color-base;
  137. }
  138. }
  139. }
  140. &--dark {
  141. // border-bottom: 1px solid @border-color-base;
  142. border-left: 1px solid @border-color-base;
  143. background-color: @header-dark-bg-color !important;
  144. .@{header-prefix-cls}-logo {
  145. &:hover {
  146. background-color: @header-dark-bg-hover-color;
  147. }
  148. }
  149. .@{header-prefix-cls}-action {
  150. &__item {
  151. .app-iconify {
  152. padding: 0 10px;
  153. font-size: 16px !important;
  154. }
  155. .ant-badge {
  156. span {
  157. color: @white;
  158. }
  159. }
  160. &:hover {
  161. background-color: @header-dark-bg-hover-color;
  162. }
  163. }
  164. }
  165. }
  166. }