index.less 2.19 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 {
6
  height: 64px;
niko's avatar
niko committed
7
  padding: 0 12px 0 0;
afc163's avatar
afc163 committed
8
  background: #fff;
jim's avatar
jim committed
9
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
afc163's avatar
afc163 committed
10
  position: relative;
11 12
}

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

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

guihua's avatar
guihua committed
36
i.trigger {
37 38
  font-size: 20px;
  line-height: 64px;
39
  height: 64px;
40
  cursor: pointer;
jim's avatar
jim committed
41
  transition: all 0.3s, padding 0s;
Crazy Urus's avatar
Crazy Urus committed
42
  padding: 22px 24px;
43
  &:hover {
afc163's avatar
afc163 committed
44
    background: @pro-header-hover-bg;
45 46 47 48 49 50
  }
}

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

jim's avatar
jim committed
85
.dark {
jim's avatar
jim committed
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
  height: 64px;
  .action {
    color: rgba(255, 255, 255, 0.85);
    > i {
      color: rgba(255, 255, 255, 0.85);
    }
    &:hover,
    &:global(.ant-popover-open) {
      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
    }
    .logo {
114
      padding-left: 12px;
jiang's avatar
jiang committed
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
      padding-right: 12px;
      position: relative;
    }
    .right {
      position: absolute;
      right: 12px;
      top: 0;
      background: #fff;
      .account {
        .avatar {
          margin-right: 0;
        }
      }
    }
  }
}