Blame view

src/layouts/default/header/index.less 3.6 KB
vben authored
1
@header-trigger-prefix-cls: ~'@{namespace}-layout-header-trigger';
vben authored
2
@header-prefix-cls: ~'@{namespace}-layout-header';
3
4
@breadcrumb-prefix-cls: ~'@{namespace}-layout-breadcrumb';
@logo-prefix-cls: ~'@{namespace}-app-logo';
vben authored
5
vben authored
6
.@{header-prefix-cls} {
vben authored
7
8
  display: flex;
  height: @header-height;
vben authored
9
  padding: 0;
10
  margin-left: -1px;
vben authored
11
12
  line-height: @header-height;
  color: @white;
13
  background-color: @white;
vben authored
14
15
16
  align-items: center;
  justify-content: space-between;
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  &--mobile {
    .@{breadcrumb-prefix-cls},
    .error-action,
    .notify-item,
    .fullscreen-item {
      display: none;
    }

    .@{logo-prefix-cls} {
      min-width: unset;
      padding-right: 0;

      &__title {
        display: none;
      }
    }
    .@{header-trigger-prefix-cls} {
      padding: 0 4px 0 8px !important;
    }
    .@{header-prefix-cls}-action {
      padding-right: 4px;
    }
  }
vben authored
41
  &--fixed {
vben authored
42
43
44
    position: fixed;
    top: 0;
    left: 0;
vben authored
45
    z-index: @layout-header-fixed-z-index;
vben authored
46
47
48
    width: 100%;
  }
vben authored
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  &-logo {
    height: @header-height;
    min-width: 192px;
    padding: 0 10px;
    font-size: 14px;

    img {
      width: @logo-width;
      height: @logo-width;
      margin-right: 2px;
    }
  }

  &-left {
vben authored
63
    display: flex;
vben authored
64
    height: 100%;
vben authored
65
66
    align-items: center;
vben authored
67
    .@{header-trigger-prefix-cls} {
vben authored
68
69
      display: flex;
      height: 100%;
vben authored
70
      padding: 1px 10px 0;
vben authored
71
      cursor: pointer;
vben authored
72
      align-items: center;
vben authored
73
74

      .anticon {
vben authored
75
        font-size: 16px;
vben authored
76
77
78
79
      }

      &.light {
        &:hover {
80
          background-color: @header-light-bg-hover-color;
vben authored
81
82
83
84
85
86
87
88
89
        }

        svg {
          fill: #000;
        }
      }

      &.dark {
        &:hover {
90
          background-color: @header-dark-bg-hover-color;
vben authored
91
92
93
94
95
        }
      }
    }
  }
vben authored
96
  &-menu {
vben authored
97
    height: 100%;
vben authored
98
99
    min-width: 0;
    flex: 1;
vben authored
100
101
102
    align-items: center;
  }
vben authored
103
104
  &-action {
    display: flex;
105
    min-width: 180px;
vben authored
106
    // padding-right: 12px;
vben authored
107
    align-items: center;
vben authored
108
vben authored
109
    &__item {
vben authored
110
      display: flex !important;
vben authored
111
112
113
114
115
      height: @header-height;
      padding: 0 2px;
      font-size: 1.2em;
      cursor: pointer;
      align-items: center;
vben authored
116
vben authored
117
      .ant-badge {
vben authored
118
119
120
        height: @header-height;
        line-height: @header-height;
      }
vben authored
121
vben authored
122
123
124
      .ant-badge-dot {
        top: 10px;
        right: 2px;
vben authored
125
      }
vben authored
126
    }
vben authored
127
vben authored
128
129
    span[role='img'] {
      padding: 0 8px;
vben authored
130
    }
vben authored
131
  }
vben authored
132
vben authored
133
  &--light {
134
    background-color: @white !important;
vben authored
135
    border-bottom: 1px solid @header-light-bottom-border-color;
136
    border-left: 1px solid @header-light-bottom-border-color;
vben authored
137
vben authored
138
139
    .@{header-prefix-cls}-logo {
      color: @text-color-base;
vben authored
140
141

      &:hover {
142
        background-color: @header-light-bg-hover-color;
vben authored
143
144
145
      }
    }
vben authored
146
147
    .@{header-prefix-cls}-action {
      &__item {
vben authored
148
149
150
151
152
        color: @text-color-base;

        .app-iconify {
          padding: 0 10px;
          font-size: 16px !important;
vben authored
153
        }
vben authored
154
vben authored
155
        &:hover {
156
          background-color: @header-light-bg-hover-color;
vben authored
157
        }
vben authored
158
159
      }
vben authored
160
161
      &-icon,
      span[role='img'] {
vben authored
162
163
164
165
166
        color: @text-color-base;
      }
    }
  }
vben authored
167
  &--dark {
168
    background-color: @header-dark-bg-color !important;
169
    // border-bottom: 1px solid @border-color-base;
Vben authored
170
    border-left: 1px solid @border-color-base;
vben authored
171
    .@{header-prefix-cls}-logo {
vben authored
172
      &:hover {
173
        background-color: @header-dark-bg-hover-color;
vben authored
174
175
176
      }
    }
vben authored
177
178
    .@{header-prefix-cls}-action {
      &__item {
179
180
181
182
183
        .app-iconify {
          padding: 0 10px;
          font-size: 16px !important;
        }
184
185
186
187
188
189
        .ant-badge {
          span {
            color: @white;
          }
        }
vben authored
190
        &:hover {
191
          background-color: @header-dark-bg-hover-color;
vben authored
192
        }
vben authored
193
194
195
196
      }
    }
  }
}