index.less 1.49 KB
Newer Older
陈帅's avatar
陈帅 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
@import '~antd/lib/style/themes/default.less';

.descriptionList {
  // offset the padding-bottom of last row
  :global {
    .ant-row {
      margin-bottom: -16px;
      overflow: hidden;
    }
  }
  // fix margin top error of following descriptionList
  & + & {
    :global {
      .ant-row {
        margin-top: 16px;
      }
    }
  }

  .title {
    margin-bottom: 16px;
    color: @heading-color;
    font-weight: 500;
    font-size: 14px;
  }

  .term {
    display: table-cell;
    padding-bottom: 16px;
    color: @heading-color;
    // Line-height is 22px IE dom height will calculate error
    line-height: 20px;
    white-space: nowrap;

    &::after {
      position: relative;
      top: -0.5px;
      margin: 0 8px 0 2px;
      content: ':';
    }
  }

  .detail {
    display: table-cell;
    width: 100%;
    padding-bottom: 16px;
    color: @text-color;
    line-height: 20px;
  }

  &.small {
    // offset the padding-bottom of last row
    :global {
      .ant-row {
        margin-bottom: -8px;
      }
    }
    // fix margin top error of following descriptionList
    & + .descriptionList {
      :global {
        .ant-row {
          margin-top: 8px;
        }
      }
    }
    .title {
      margin-bottom: 12px;
      color: @text-color;
    }
    .term,
    .detail {
      padding-bottom: 8px;
    }
  }

  &.large {
    .title {
      font-size: 16px;
    }
  }

  &.vertical {
    .term {
      display: block;
      padding-bottom: 8px;
    }

    .detail {
      display: block;
    }
  }
}