|
3 | 3 | white-space: nowrap;
|
4 | 4 | vertical-align: middle; // Match the inputs
|
5 | 5 | }
|
| 6 | + |
| 7 | +// |
| 8 | +// RTL Support |
| 9 | +// |
| 10 | +*[dir="rtl"] { |
| 11 | + |
| 12 | + .input-group { |
| 13 | + > .form-control, |
| 14 | + > .custom-select { |
| 15 | + @include border-radius($input-border-radius, 0); |
| 16 | + &:not(:last-child) { |
| 17 | + @include border-left-radius(0); |
| 18 | + } |
| 19 | + &:not(:first-child) { |
| 20 | + @include border-right-radius(0); |
| 21 | + } |
| 22 | + } |
| 23 | + } |
| 24 | + |
| 25 | + .input-group-prepend { |
| 26 | + margin-left: -$input-border-width; |
| 27 | + } |
| 28 | + .input-group-append { |
| 29 | + margin-right: -$input-border-width; |
| 30 | + } |
| 31 | + |
| 32 | + // Prepend and append rounded corners |
| 33 | + // |
| 34 | + // These rulesets must come after the sizing ones to properly override sm and lg |
| 35 | + // border-radius values when extending. They're more specific than we'd like |
| 36 | + // with the `.input-group >` part, but without it, we cannot override the sizing. |
| 37 | + |
| 38 | + .input-group > .input-group-prepend > .btn, |
| 39 | + .input-group > .input-group-prepend > .input-group-text, |
| 40 | + .input-group > .input-group-append:not(:last-child) > .btn, |
| 41 | + .input-group > .input-group-append:not(:last-child) > .input-group-text, |
| 42 | + .input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle), |
| 43 | + .input-group > .input-group-append:last-child > .input-group-text:not(:last-child) { |
| 44 | + @include border-radius($input-border-radius, 0); |
| 45 | + @include border-left-radius(0); |
| 46 | + } |
| 47 | + |
| 48 | + .input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle), |
| 49 | + .input-group > .input-group-append:last-child > .input-group-text:not(:last-child) { |
| 50 | + @include border-right-radius(0); |
| 51 | + } |
| 52 | + |
| 53 | + .input-group > .input-group-append > .btn, |
| 54 | + .input-group > .input-group-append > .input-group-text, |
| 55 | + .input-group > .input-group-prepend:not(:first-child) > .btn, |
| 56 | + .input-group > .input-group-prepend:not(:first-child) > .input-group-text, |
| 57 | + .input-group > .input-group-prepend:first-child > .btn:not(:first-child), |
| 58 | + .input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) { |
| 59 | + @include border-radius($input-border-radius, 0); |
| 60 | + @include border-right-radius(0); |
| 61 | + } |
| 62 | + |
| 63 | + .input-group > .input-group-prepend:first-child > .btn:not(:first-child), |
| 64 | + .input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) { |
| 65 | + @include border-left-radius(0); |
| 66 | + } |
| 67 | + |
| 68 | +} |
0 commit comments