Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper input group sizing and alignment in flexbox mode #21032

Merged
merged 2 commits into from
Oct 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion scss/_input-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@include hover-focus-active {
z-index: 3;
}

@if $enable-flex {
flex: 1;
} @else {
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down