index.less 3.14 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 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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
@import 'variables';

.@{stepsPrefixClass} {
  font-size: 0;
  width: 100%;
  line-height: 1.5;
  display: flex;

  &,
  * {
    box-sizing: border-box;
  }
}

.@{stepsPrefixClass}-item {
  position: relative;
  display: inline-block;
  vertical-align: top;
  flex: 1;
  overflow: hidden;

  &:last-child {
    flex: none;
  }

  &:last-child &-tail,
  &:last-child &-title:after {
    display: none;
  }

  &-icon,
  &-content {
    display: inline-block;
    vertical-align: top;
  }

  &-icon {
    border: 1px solid @wait-icon-color;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 26px;
    font-size: 14px;
    margin-right: 8px;
    transition: background-color 0.3s, border-color 0.3s;

    > .@{stepsPrefixClass}-icon {
      line-height: 1;
      top: -1px;
      color: @primary-color;
      position: relative;

      &.rcicon {
        font-size: 12px;
        position: relative;
        top: -2px;
      }
    }
  }

  &-tail {
    position: absolute;
    left: 0;
    width: 100%;
    top: 12px;
    padding: 0 10px;
    &:after {
      content: '';
      display: inline-block;
      background: @wait-tail-color;
      height: 1px;
      border-radius: 1px;
      width: 100%;
      transition: background 0.3s;
    }
  }
  &-content {
    margin-top: 3px;
  }
  &-title {
    font-size: 14px;
    margin-bottom: 4px;
    color: #666;
    font-weight: bold;
    display: inline-block;
    padding-right: 10px;
    position: relative;
    &:after {
      content: '';
      height: 1px;
      width: 1000px;
      background: @wait-tail-color;
      display: block;
      position: absolute;
      top: 0.55em;
      left: 100%;
    }
  }
  &-description {
    font-size: 12px;
    color: #999;
  }
  .step-item-status(wait);
  .step-item-status(process);
  &-process &-icon {
    background: @process-icon-color;
    > .@{stepsPrefixClass}-icon {
      color: #fff;
    }
  }
  .step-item-status(finish);
  .step-item-status(error);

  &.@{stepsPrefixClass}-next-error .@{stepsPrefixClass}-item-title:after {
    background: @error-icon-color;
  }
}

.@{stepsPrefixClass}-horizontal:not(.@{stepsPrefixClass}-label-vertical) {
  .@{stepsPrefixClass}-item {
    margin-right: 10px;
    &:last-child {
      margin-right: 0;
    }
    &-tail {
      display: none;
    }
    &-description {
      max-width: @stepDescriptionMaxWidth;
    }
  }
}

.step-item-status(@status) {
  @icon-color: '@{status}-icon-color';
  @title-color: '@{status}-title-color';
  @description-color: '@{status}-description-color';
  @tail-color: '@{status}-tail-color';
  &-@{status} &-icon {
    border-color: @@icon-color;
    background-color: #fff;
    > .@{stepsPrefixClass}-icon {
      color: @@icon-color;
      .@{stepsPrefixClass}-icon-dot {
        background: @@icon-color;
      }
    }
  }
  &-@{status} &-title {
    color: @@title-color;
    &:after {
      background-color: @@tail-color;
    }
  }
  &-@{status} &-description {
    color: @@description-color;
  }
  &-@{status} &-tail:after {
    background-color: @@tail-color;
  }
}

@import 'custom-icon';
@import 'small';
@import 'vertical';
@import 'label-placement';
@import 'progress-dot';