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

Input group - fix margins #26710

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/4.1/components/input-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ Place one add-on or button on either side of an input. You may also place one on
</div>
</div>

<div class="input-group mb-3">
<input type="text" class="form-control" aria-label="Min value" placeholder="Min value">
<div class="input-group-prepend">
<span class="input-group-text">to</span>
</div>
<input type="text" class="form-control" aria-label="Max value" placeholder="Max value">
</div>

<label for="basic-url">Your vanity URL</label>
<div class="input-group mb-3">
<div class="input-group-prepend">
Expand Down
10 changes: 8 additions & 2 deletions scss/_input-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,14 @@
}
}

.input-group-prepend { margin-right: -$input-border-width; }
.input-group-append { margin-left: -$input-border-width; }
.input-group-prepend,
.input-group-append:not(:last-child) {
margin-right: -$input-border-width;
}
.input-group-append,
.input-group-prepend:not(:first-child) {
margin-left: -$input-border-width;
}


// Textual addons
Expand Down