0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Merge pull request #21032 from twbs/flexbox-input-group

Proper input group sizing and alignment in flexbox mode
This commit is contained in:
Mark Otto 2016-10-27 21:23:48 -07:00 committed by GitHub
commit d23163a483

View File

@ -24,6 +24,7 @@
@include hover-focus-active {
z-index: 3;
}
@if $enable-flex {
flex: 1;
} @else {
@ -40,7 +41,12 @@
.input-group-addon,
.input-group-btn,
.input-group .form-control {
@if not $enable-flex {
@if $enable-flex {
// Vertically centers the content of the addons within the input group
display: flex;
flex-direction: column;
justify-content: center;
} @else {
display: table-cell;
}
@ -158,9 +164,16 @@
// element above the siblings.
> .btn {
position: relative;
@if $enable-flex {
// Vertically stretch the button and center its content
flex: 1;
}
+ .btn {
margin-left: (-$input-btn-border-width);
}
// Bring the "active" button to the front
@include hover-focus-active {
z-index: 3;