_input-group.scss 2.57 KB
Newer Older
1
2
3
4
5
6
7
8
9
//
// Extenstion to input groups so we can use them in pieforms
// --------------------------------------------------
.form-inline  {
    // if one item in an input group has a label, push others down
    .no-label {
        margin-top: 17px;
    }
}
10

11
12
13
.pieform .input-group {
    max-width:100%;

14
15
16
    // Chrome bug - flex container doesn't work on fieldset tag
    fieldset.input-group {
      display: block;
17
      .input-group-append {
18
        display: inline-block;
19
        height: $input-height;
20
        width: auto;
21
22
      }
    }
23
24
25
26
27
28
    .pieform-fieldset > .form-group {
        border: none;
        padding: 0;
        box-shadow: none;
        float: left;
        .form-control {
29
30
            border-top-left-radius: $border-radius;
            border-bottom-left-radius: $border-radius;
31
32
33
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
            max-width: 100%;
34
35
36
            &.text {
                height: $input-height;
            }
37
38
39
40
41
        }
        ~ .form-group {
            .form-control {
                @include border-left-radius(0);
                margin-left: -1px;
42
                @include media-breakpoint-up(sm) {
43
44
45
46
47
                    border-left:0;
                }
            }
            &:last-child {
                .form-control {
48
                    @include border-right-radius($border-radius);
49
50
51
52
53
54
55
56
57
58
59
60
                }
            }
        }
    }
    label {
        display: block;
    }
    // if one item in an input group has a label, push others down
    .no-label {
        margin-top: 5px;
        // For screen size smaller than xs
        @media (min-width: 321px) {
61
            margin-top: 10.5px;
62
        }
63
        @include media-breakpoint-up(md) {
64
65
            margin-top: 10.5px;
        }
66
67
68
        @include media-breakpoint-down(xs) {
            margin-top: 14.5px;
        }
69
70
71
72
73
74
    }

    .form-group,
    .form-control {
        display: inline-block;
        width: auto;
75
        flex: 0 1 auto;
76
    }
77
78

    .input-group-prepend {
Evonne Cheung's avatar
Evonne Cheung committed
79
        padding: 9px 14px;
80
81
82
        text-align: center;
        background-color: $gray-100;
        border: 1px solid $input-border-color;
83
        border-radius: $border-radius-sm;
84
85
86
87
88
89
90
91
        border-bottom-right-radius: 0;
        border-top-right-radius: 0;
        border-right: 0;
        + .select select {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }
    }
92
}
93
.pieform .input-group-append {
94
95
96
97
98
99
    font-size: inherit;
    float:left;
    &.form-group {
        display: block;
    }
}
100
101
102
103
104
105


// Fixes the buttons overlapping the input
button.input-group-append {
    margin-left: 0;
}