index.less 2.11 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);

jiang's avatar
jiang committed
5
.logo {
Yu's avatar
Yu committed
6
  display: inline-block;
7
  height: @layout-header-height;
Yu's avatar
Yu committed
8 9
  padding: 0 0 0 24px;
  font-size: 20px;
10
  line-height: @layout-header-height;
jiang's avatar
jiang committed
11 12 13 14 15 16 17 18
  vertical-align: top;
  cursor: pointer;
  img {
    display: inline-block;
    vertical-align: middle;
  }
}

偏右's avatar
偏右 committed
19 20 21 22 23
.menu {
  :global(.anticon) {
    margin-right: 8px;
  }
  :global(.ant-dropdown-menu-item) {
JoeyKo's avatar
JoeyKo committed
24
    min-width: 160px;
25 26 27
  }
}

28 29
.trigger {
  height: @layout-header-height;
Yu's avatar
Yu committed
30 31
  padding: ~'calc((@{layout-header-height} - 20px) / 2)' 24px;
  font-size: 20px;
32
  cursor: pointer;
jim's avatar
jim committed
33
  transition: all 0.3s, padding 0s;
34
  &:hover {
afc163's avatar
afc163 committed
35
    background: @pro-header-hover-bg;
36 37 38 39 40 41
  }
}

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

jim's avatar
jim committed
77
.dark {
78
  height: @layout-header-height;
jim's avatar
jim committed
79 80 81 82 83 84
  .action {
    color: rgba(255, 255, 255, 0.85);
    > i {
      color: rgba(255, 255, 255, 0.85);
    }
    &:hover,
85
    &:global(.opened) {
jim's avatar
jim committed
86 87 88 89 90 91 92 93
      background: @primary-color;
    }
    :global(.ant-badge) {
      color: rgba(255, 255, 255, 0.85);
    }
  }
}

jiang's avatar
jiang committed
94
@media only screen and (max-width: @screen-md) {
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
  :global(.ant-divider-vertical) {
    vertical-align: unset;
  }
  .name {
    display: none;
  }
  i.trigger {
    padding: 22px 12px;
  }
  .logo {
    position: relative;
    padding-right: 12px;
    padding-left: 12px;
  }
  .right {
    position: absolute;
    top: 0;
    right: 12px;
    background: #fff;
    .account {
      .avatar {
        margin-right: 0;
jiang's avatar
jiang committed
117 118 119 120
      }
    }
  }
}