index.less 3.3 KB

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