@import '../style/theme.less';
@tab-prefix-cls: ~"@{ant-prefix}-tabs";
.ie-rotate-via-degrees(@degrees) {
    /* IE6-IE8 */
    @radians: ~`parseInt("@{degrees}") * Math.PI * 2 / 360`;
    @costheta: ~`Math.cos("@{radians}")`;
    @sintheta: ~`Math.sin("@{radians}")`;
    @negsintheta: ~`"@{sintheta}" * -1`;
    -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=@{costheta}, M12=@{negsintheta}, M21=@{sintheta}, M22=@{costheta})";
    zoom: 1;
     :root & {
        filter: none;
    }
}

.iconfont-size-under-12px(@size, @rotate: 0deg) {
    display: inline-block;
    @font-scale: unit(@size / 12px);
    font-size: @font-size-base; // ie8-9
    font-size:~"@{size} \9"; // lesshint duplicateProperty: false
    transform: scale(@font-scale) rotate(@rotate);
    .ie-rotate-via-degrees(@rotate);
     :root & {
        font-size: @font-size-base; // reset ie9 and above
    }
}

// card style
.@{tab-prefix-cls} {
    &&-line>&-bar &-tab .@{iconfont-css-prefix}-close {
        margin-right: 0;
        color: @text-color-secondary;
        transition: all 0.3s @ease-in-out;
        .iconfont-size-under-12px(9px);
        transform-origin: 100% 50%;
        width: 0;
        text-align: right;
        vertical-align: middle;
        overflow: hidden;
        &:hover {
            color: #404040;
            font-weight: bold;
        }
    }
    &&-line>&-bar &-tab-active .@{iconfont-css-prefix}-close,
    &&-line>&-bar &-tab:hover .@{iconfont-css-prefix}-close {
        width: 16px;
        transform: translateZ(0);
    }
}