index.less 1.79 KB
Newer Older
dengxiaofeng's avatar
dengxiaofeng committed
1 2 3 4 5 6 7 8 9 10 11 12
@import '~antd/es/style/themes/default.less';
@pro-header-hover-bg: rgba(0, 0, 0, 0.025);

.menu {
  :global(.anticon) {
    margin-right: 8px;
  }
  :global(.ant-dropdown-menu-item) {
    min-width: 160px;
  }
}

13 14 15 16
.lineHeight{
  line-height: 48px;
}

dengxiaofeng's avatar
dengxiaofeng committed
17
.right {
dengxiaofeng's avatar
dengxiaofeng committed
18
  display: flex;
19 20
  // flex: 100;
  width: 100%;
dengxiaofeng's avatar
dengxiaofeng committed
21 22 23 24
  float: right;
  height: 48px;
  margin-left: auto;
  overflow: hidden;
dengxiaofeng's avatar
dengxiaofeng committed
25
  .action {
dengxiaofeng's avatar
dengxiaofeng committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.3s;
    > span {
      vertical-align: middle;
    }
    &:hover {
      background: @pro-header-hover-bg;
    }
    &:global(.opened) {
      background: @pro-header-hover-bg;
    }
  }
dengxiaofeng's avatar
dengxiaofeng committed
42
  .search {
dengxiaofeng's avatar
dengxiaofeng committed
43 44 45 46 47
    padding: 0 12px;
    &:hover {
      background: transparent;
    }
  }
dengxiaofeng's avatar
dengxiaofeng committed
48
  .account {
dengxiaofeng's avatar
dengxiaofeng committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
    .avatar {
      margin: ~'calc((@{layout-header-height} - 24px) / 2)' 0;
      margin-right: 8px;
      color: @primary-color;
      vertical-align: top;
      background: rgba(255, 255, 255, 0.85);
    }
  }
}

.dark {
  .action {
    color: rgba(255, 255, 255, 0.85);
    > span {
      color: rgba(255, 255, 255, 0.85);
    }
    &:hover,
    &:global(.opened) {
      background: @primary-color;
    }
  }
}

:global(.ant-pro-global-header) {
  .dark {
    .action {
      color: @text-color;
      > span {
        color: @text-color;
      }
      &:hover {
        color: rgba(255, 255, 255, 0.85);
        > span {
          color: rgba(255, 255, 255, 0.85);
        }
      }
    }
  }
}

@media only screen and (max-width: @screen-md) {
  :global(.ant-divider-vertical) {
    vertical-align: unset;
  }
  .name {
    display: none;
  }
  .right {
    position: absolute;
    top: 0;
    right: 12px;
    .account {
      .avatar {
        margin-right: 0;
      }
    }
    .search {
      display: none;
    }
  }
}