/**
 * 排序
 * style.less
 * @author wangbo
 * @since 2019-02-20
 */

@import "../../css/mixins";

[grid-manager], .gm-dreamland-div{
    th[sorting] .th-wrap {
        padding-right: 20px;
    }
    // 排序与表头筛选同时存在时，需要将样式重置
    th[sorting][filter] .th-wrap {
        padding-right: 45px;
        .gm-sorting-action{
            right: 25px;
        }
    }
}
.gm-sorting-action{
    display: block;
    width: 14px;
    height: 18px;
    position: absolute;
    top: calc(50% - 9px);
    right: 5px;
    cursor: pointer;
    color: #444;
    opacity: .7;
    &:hover {
        color: #000;
        opacity: 1;
    }
    &.sorting-up {
        .sa-up {
            opacity: 1;
        }
        .sa-down {
            opacity: 0.1;
        }
    }
    &.sorting-down {
        .sa-up {
            opacity: 0.1;
        }
        .sa-down {
            opacity: 1;
        }
    }
    .sa-icon {
        display: block;
        height: 10px;
        position: absolute;
        font-size: var(--gm-font-size);
        line-height: 10px;
    }
    .sa-up {
        top: 0;
        right: 0;
    }
    .sa-down {
        bottom: 0;
        right: 0;
    }
}

// 表头的icon图标跟随文本
.gm-icon-follow-text{
    .gm-sorting-action{
        display: inline-block;
        width: 18px;
        position: relative;
        top: 0;
        left: 0;
        vertical-align: middle;
        text-align: center;
        .sa-icon{
            right: 4px;
        }
    }
}
