index.less 1.5 KB
Newer Older
liang ce committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 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
@import '../../style/themes/default';
@import '../../style/mixins/index';

@anchor-border-width: 2px;

.@{ant-prefix}-anchor {
  .reset-component;
  position: relative;
  padding-left: @anchor-border-width;

  &-wrapper {
    background-color: @component-background;
    overflow: auto;
    padding-left: 4px;
    margin-left: -4px;
  }

  &-ink {
    position: absolute;
    height: 100%;
    left: 0;
    top: 0;
    &:before {
      content: ' ';
      position: relative;
      width: @anchor-border-width;
      height: 100%;
      display: block;
      background-color: @border-color-split;
      margin: 0 auto;
    }
    &-ball {
      display: none;
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 8px;
      border: 2px solid @primary-color;
      background-color: @component-background;
      left: 50%;
      transition: top 0.3s ease-in-out;
      transform: translateX(-50%);
      &.visible {
        display: inline-block;
      }
    }
  }

  &.fixed &-ink &-ink-ball {
    display: none;
  }

  &-link {
    padding: 7px 0 7px 16px;
    line-height: 1.143;

    &-title {
      display: block;
      position: relative;
      transition: all 0.3s;
      color: @text-color;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 6px;

      &:only-child {
        margin-bottom: 0;
      }
    }

    &-active > &-title {
      color: @primary-color;
    }
  }

  &-link &-link {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}