index.less 2.32 KB
Newer Older
jim's avatar
jim committed
1
@import '~antd/lib/style/themes/default.less';
2

afc163's avatar
afc163 committed
3 4
@pro-header-hover-bg: rgba(0, 0, 0, 0.025);

5
.header {
Yu's avatar
Yu committed
6
  position: relative;
7
  height: @layout-header-height;
8
  padding: 0;
afc163's avatar
afc163 committed
9
  background: #fff;
jim's avatar
jim committed
10
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
11 12
}

jiang's avatar
jiang committed
13
.logo {
Yu's avatar
Yu committed
14
  display: inline-block;
15
  height: @layout-header-height;
Yu's avatar
Yu committed
16 17
  padding: 0 0 0 24px;
  font-size: 20px;
18
  line-height: @layout-header-height;
jiang's avatar
jiang committed
19 20 21 22 23 24 25 26
  vertical-align: top;
  cursor: pointer;
  img {
    display: inline-block;
    vertical-align: middle;
  }
}

偏右's avatar
偏右 committed
27 28 29 30 31
.menu {
  :global(.anticon) {
    margin-right: 8px;
  }
  :global(.ant-dropdown-menu-item) {
JoeyKo's avatar
JoeyKo committed
32
    min-width: 160px;
33 34 35
  }
}

36 37
.trigger {
  height: @layout-header-height;
Yu's avatar
Yu committed
38 39
  padding: ~'calc((@{layout-header-height} - 20px) / 2)' 24px;
  font-size: 20px;
40
  cursor: pointer;
jim's avatar
jim committed
41
  transition: all 0.3s, padding 0s;
42
  &:hover {
afc163's avatar
afc163 committed
43
    background: @pro-header-hover-bg;
44 45 46 47 48 49
  }
}

.right {
  float: right;
  height: 100%;
50
  overflow: hidden;
51 52 53
  .action {
    display: inline-block;
    height: 100%;
Yu's avatar
Yu committed
54 55 56
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.3s;
57
    > i {
afc163's avatar
afc163 committed
58
      color: @text-color;
Yu's avatar
Yu committed
59
      vertical-align: middle;
60
    }
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
61
    &:hover {
afc163's avatar
afc163 committed
62
      background: @pro-header-hover-bg;
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
63
    }
64
    &:global(.opened) {
afc163's avatar
afc163 committed
65
      background: @pro-header-hover-bg;
66 67
    }
  }
afc163's avatar
afc163 committed
68
  .search {
jim's avatar
jim committed
69
    padding: 0 12px;
afc163's avatar
afc163 committed
70 71 72
    &:hover {
      background: transparent;
    }
73 74 75
  }
  .account {
    .avatar {
76 77
      margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
      margin-right: 8px;
78
      color: @primary-color;
afc163's avatar
afc163 committed
79
      vertical-align: top;
Yu's avatar
Yu committed
80
      background: rgba(255, 255, 255, 0.85);
81 82 83
    }
  }
}
jiang's avatar
jiang committed
84

jim's avatar
jim committed
85
.dark {
86
  height: @layout-header-height;
jim's avatar
jim committed
87 88 89 90 91 92
  .action {
    color: rgba(255, 255, 255, 0.85);
    > i {
      color: rgba(255, 255, 255, 0.85);
    }
    &:hover,
93
    &:global(.opened) {
jim's avatar
jim committed
94 95 96 97 98 99 100 101
      background: @primary-color;
    }
    :global(.ant-badge) {
      color: rgba(255, 255, 255, 0.85);
    }
  }
}

jiang's avatar
jiang committed
102 103 104 105 106 107 108 109 110
@media only screen and (max-width: @screen-md) {
  .header {
    :global(.ant-divider-vertical) {
      vertical-align: unset;
    }
    .name {
      display: none;
    }
    i.trigger {
Crazy Urus's avatar
Crazy Urus committed
111
      padding: 22px 12px;
jiang's avatar
jiang committed
112 113 114
    }
    .logo {
      position: relative;
Yu's avatar
Yu committed
115 116
      padding-right: 12px;
      padding-left: 12px;
jiang's avatar
jiang committed
117 118 119 120
    }
    .right {
      position: absolute;
      top: 0;
Yu's avatar
Yu committed
121
      right: 12px;
jiang's avatar
jiang committed
122 123 124 125 126 127 128 129 130
      background: #fff;
      .account {
        .avatar {
          margin-right: 0;
        }
      }
    }
  }
}