@tag-prefix-cls: ~"@{css-prefix}tag";
@tag-close-prefix-cls: ivu-icon-ios-close-empty;
@tag-selects-cls: ~"@{css-prefix}tag";
@colorNames: "blue", "green", "red", "yellow", "grey", "cyan", "purple", "brown";
@colors: @link-color, @success-color, @error-color, @warning-color, @text-color,@cyan, @purple,@brown;
@count: length(@colorNames);
.@{tag-prefix-cls} {
    display: inline-block;
    height: 22px;
    line-height: 22px;
    margin: 2px 4px 2px 0;
    padding: 0 8px;
    border: 1px solid @border-color-split;
    border-radius: @btn-border-radius-small;
    // background: @background-color-base;
    font-size: @tag-font-size;
    vertical-align: middle;
    //opacity: 1;
    overflow: hidden;
    cursor: pointer;
    //transition: all @transition-time @ease-in-out;

    &-dot{
        height: 32px;
        line-height: 32px;
        border: 1px solid @border-color-split !important;
        color: @text-color !important;
        background: #fff !important;
        padding: 0 12px;

        &-inner{
            display: inline-block;
            width: 12px;
            height: 12px;
            margin-right: 8px;
            border-radius: 50%;
            background: @border-color-split;
            position: relative;
            top: 1px;
        }
        .@{tag-close-prefix-cls} {
            color: #666 !important;
            margin-left: 12px !important;
        }
    }

    &-border{
        height: 24px;
        line-height: 24px;
        border: 1px solid @border-color-split !important;
        color: @text-color !important;
        background: #fff !important;
        position: relative;

        .@{tag-close-prefix-cls} {
            color: #666 !important;
            margin-left: 12px !important;
        }

        &:after{
            content: "";
            display: none;
            width: 1px;
            background: @border-color-split;
            position: absolute;
            top: 0;
            bottom: 0;
            right: 22px;
        }

        &.@{tag-prefix-cls}-closable {
            &:after{
                display: block;
            }
            .@{tag-close-prefix-cls} {
                margin-left: 18px !important;
            }
        }

        .border-style(@count);

        .border-style(@n, @i: 1) when (@i =< @n) {
            @color: e(extract(@colorNames, @i));
            &.@{tag-prefix-cls} {
                &-@{color}{
                   color: extract(@colors, @i) !important;
                   border: 1px solid extract(@colors, @i) !important;
                   &:after{
                       background: extract(@colors, @i);
                   }
                   .@{tag-close-prefix-cls}{
                       color: extract(@colors, @i) !important;
                   }
                }
            }
           .border-style(@n, (@i + 1));
        }
    }

    &,
    a,
    a:hover {
        color: @text-color;
    }

    &-text {
        a:first-child:last-child {
            display: inline-block;
            margin: 0 -8px;
            padding: 0 8px;
        }
    }

    .@{tag-close-prefix-cls} {
        .iconfont-size-under-12px(20px);
        cursor: pointer;
        margin-left: 8px;
        color: #666;
        //opacity: 0.66;
        position: relative;
        top: 1px;
    }

    .color-style(@count);
    .color-style(@n, @i: 1) when (@i =< @n) {
        @color: e(extract(@colorNames, @i));
        &-@{color}{
           border: 0;
           background: tint(extract(@colors, @i), 90%);
           color: extract(@colors, @i);
           @{tag-close-prefix-cls} {
               color: extract(@colors, @i);
           }
        }
       .color-style(@n, (@i + 1));
    }
    &-white {
        background: @link-color;
        color: @white;
        border: 0;
        .@{tag-close-prefix-cls},
        .@{tag-close-prefix-cls}:hover {
            color: @white;
        }
    }
    
    .dot-style(@count);
    .dot-style(@n, @i: 1) when (@i =< @n) {
        @color: e(extract(@colorNames, @i));
        &-@{color}&-dot &-dot-inner{
           background: extract(@colors, @i);
        }
       .dot-style(@n, (@i + 1));
    }
}
/*根据新样式定制*/
// .@{tag-selects-cls}{
//     display: inline-block;
//     height: 26px;
//     line-height: 26px;
//     margin: 2px 4px 2px 0;
//     padding: 0 8px;
//     //border: 1px solid @border-color-split;
//     border-radius: @btn-border-radius-small;
//     // background: @selected-color;
//     color: #fff;
//     font-size: @tag-font-size;
//     vertical-align: middle;
//     //opacity: 1;
//     overflow: hidden;
//     cursor: pointer;
//     .@{tag-close-prefix-cls} {
//         .iconfont-size-under-12px(20px);
//         cursor: pointer;
//         margin-left: 8px;
//         color: #fff;
//         //opacity: 0.66;
//         position: relative;
//         top: 1px;
//         //transition: all @transition-time @ease-in-out;

//         &:hover {
//             //opacity: 1;
//         }
//     }
// }

