.border(@prop: '', @width: 1px, @bColor: @borderColor) {
    & when not (@prop = '') {
        border-@{prop}: @width solid @bColor;
    }
    & when (@prop = '') {
        border: @width solid @bColor;
    }
}

.button-colorized(@baseColor) {
    background: @baseColor;
    border-color: darken(@baseColor, 5%) darken(@baseColor, 9%) darken(@baseColor, 9%);
    -webkit-box-shadow: 0 1px 0 darken(@baseColor, 9%);
    box-shadow: 0 1px 0 darken(@baseColor, 9%);
    color: #fff;
    text-decoration: none;
    text-shadow: 0 -1px 1px darken(@baseColor, 9%), 1px 0 1px darken(@baseColor, 9%), 0 1px 1px darken(@baseColor, 9%), -1px 0 1px darken(@baseColor, 9%);

    &.hover,
    &:hover,
    &.focus,
    &:focus {
        background: lighten(@baseColor, 2%);
        border-color: darken(@baseColor, 9%);
        color: #fff;
    }

    &.focus,
    &:focus {
        -webkit-box-shadow: 0 1px 0 darken(@baseColor, 5%), 0 0 2px 1px darken(@baseColor, 17%);
        box-shadow: 0 1px 0 darken(@baseColor, 5%), 0 0 2px 1px darken(@baseColor, 17%);
    }


    &.active,
    &.active:hover,
    &.active:focus,
    &:active {
        background: darken(@baseColor, 5%);
        border-color: darken(@baseColor, 9%);
        -webkit-box-shadow: inset 0 2px 0 darken(@baseColor, 9%);
        box-shadow: inset 0 2px 0 darken(@baseColor, 9%);
        vertical-align: top;
    }

    &[disabled],
    &:disabled,
    &-disabled,
    &.disabled {
        color: lighten(@baseColor, 27%) !important;
        background: lighten(@baseColor, 2%) !important;
        border-color: lighten(@baseColor, 3%) !important;
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.1 ) !important;
        cursor: default;
    }
}

// copied from selectize
.vertical-gradient (@color-top, @color-bottom) {
    background-color: mix(@color-top, @color-bottom, 60%);
    background-image: -moz-linear-gradient(top, @color-top, @color-bottom); // FF 3.6+
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@color-top), to(@color-bottom)); // Safari 4+, Chrome 2+
    background-image: -webkit-linear-gradient(top, @color-top, @color-bottom); // Safari 5.1+, Chrome 10+
    background-image: -o-linear-gradient(top, @color-top, @color-bottom); // Opera 11.10
    background-image: linear-gradient(to bottom, @color-top, @color-bottom); // Standard, IE10
    background-repeat: repeat-x;
    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@color-top),argb(@color-bottom))); // IE9 and down
}
