/**Variable**/

.s-table {
  .s-table--header-wrapper {
    .s-table--header-border-line {
      position: absolute;
      left: 0;
      bottom: 0;
      height: 0;
      border-bottom: 1px solid $s-table-border-color;
    }
  }
  /*排序*/
  .s-cell--sort {
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    text-align: center;
    display: inline-block;
    position: relative;
    .s-sort--asc-btn,
    .s-sort--desc-btn {
      position: absolute;
      left: 0.35em;
      color: $s-table-column-icon-border-color;
      width: 1em;
      text-align: center;
      cursor: pointer;
      &:hover {
        color: $s-font-color;
      }
      &.sort--active {
        color: $s-primary-color;
      }
    }
    .s-sort--asc-btn {
      top: -0.04em;
    }
    .s-sort--desc-btn {
      bottom: -0.04em;
    }
  }
}

.s-header--column {
  position: relative;
  user-select: none;
  &.col--ellipsis {
    & > .s-cell {
      display: flex;
      align-items: center;
      .s-cell--title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      & > i,
      & > span {
        &:not(.s-cell--title) {
          flex-shrink: 0;
        }
      }
    }
  }
  .s-required-icon {
    display: inline-block;
    color: $s-table-validate-error-color;
    vertical-align: middle;
    width: 0.85em;
    height: 1em;
    line-height: 1em;
    font-family: $s-icon-font-family;
    font-weight: normal;
    position: relative;
    &:before {
      content: "*";
      position: absolute;
      left: 0;
      top: 0.05em;
    }
  }
  .s-edit-icon {
    margin-right: 0.2em;
  }
  .s-resizable {
    position: absolute;
    right: -7px;
    bottom: 0;
    width: 14px;
    height: 100%;
    text-align: center;
    z-index: 1;
    cursor: col-resize;
    &.is--line {
      &:before,
      &:after {
        content: "";
        display: inline-block;
        vertical-align: middle;
      }
      &:before {
        width: 1px;
        height: 50%;
        background-color: $s-table-resizable-color;
      }
      &:after {
        width: 0;
        height: 100%;
      }
    }
  }
}

.s-table--fixed-right-wrapper {
  .s-header--column {
    .s-resizable {
      right: auto;
      left: -7px;
    }
  }
}
