input-groups.less 2.28 KB
Newer Older
reynaldi adriantama's avatar
reynaldi adriantama committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
/* ------------------------------------------------------------------------------
*
*  # Input groups component
*
*  Overrides for input groups bootstrap component
*
*  Version: 1.1
*  Latest update: Mar 10, 2016
*
* ---------------------------------------------------------------------------- */


// Base
// -------------------------

.input-group {

    // Make icon to be always on top
    .form-control-feedback {
        z-index: 3;
    }
}

// Sizing options
// -------------------------

// XLarge size
.input-group-xlg > .form-control,
.input-group-xlg > .input-group-addon,
.input-group-xlg > .input-group-btn > .btn {
    height: @input-height-xlarge;
    padding: @padding-xlarge-vertical @padding-xlarge-horizontal;
    font-size: @font-size-xlarge;
    line-height: @line-height-xlarge;
}

// Mini size
.input-group-xs > .form-control,
.input-group-xs > .input-group-addon,
.input-group-xs > .input-group-btn > .btn {
    height: @input-height-mini;
    padding: @padding-xs-vertical @padding-xs-horizontal;
    font-size: @font-size-small;
    line-height: @line-height-small;
}


// Transparent input group
// -------------------------

.input-group-transparent {
    .input-group-addon {
        background-color: transparent;
        border-color: transparent;
        padding: 0;
    }

    .form-control {
        background-color: transparent;
        border-color: transparent;
        cursor: pointer;
        width: auto;
        padding: 0;

        &:hover,
        &:focus {
            border-color: transparent;
        }
    }
}


// Text input groups
// -------------------------
.input-group-addon {

    // Icon
    > i {
        display: block;
        top: 0;
    }

    // Checkbox, radio
    .checker,
    .choice {
        display: block;
        margin-top: ((@line-height-computed - @checkbox-size) / 2);
    }

    // Sizing
    &.input-xlg {
        padding: (@padding-large-vertical + 2) @padding-large-horizontal;
        font-size: @font-size-large;
        border-radius: @border-radius-base;
    }
    &.input-xs {
        padding: @padding-xs-vertical @padding-xs-horizontal;
        font-size: @font-size-base;
        border-radius: @border-radius-small;
    }
    &.input-sm {
        font-size: @font-size-base;
    }
    &.input-lg {
        border-radius: @border-radius-base;
    }
}