Skip to content

Commit 3e00c12

Browse files
committed
allow .input-prepend/.input-append to work in .navbar per twbs#1681
1 parent be6fdd9 commit 3e00c12

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

docs/assets/bootstrap.zip

73 Bytes
Binary file not shown.

docs/assets/css/bootstrap.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,6 +2530,13 @@ button.btn.small, input[type="submit"].btn.small {
25302530
.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
25312531
margin-top: 3px;
25322532
}
2533+
.navbar-form .input-append, .navbar-form .input-prepend {
2534+
margin-top: 6px;
2535+
white-space: nowrap;
2536+
}
2537+
.navbar-form .input-append input, .navbar-form .input-prepend input {
2538+
margin-top: 0;
2539+
}
25332540
.navbar-search {
25342541
position: relative;
25352542
float: left;

less/navbar.less

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
margin-top: 5px; // make buttons vertically centered in navbar
8282
}
8383
.btn-group .btn {
84-
margin-top: 0;
84+
margin-top: 0; // then undo the margin here so we don't accidentally double it
8585
}
8686
}
8787

@@ -104,6 +104,14 @@
104104
input[type="radio"] {
105105
margin-top: 3px;
106106
}
107+
.input-append,
108+
.input-prepend {
109+
margin-top: 6px;
110+
white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
111+
input {
112+
margin-top: 0; // remove the margin on top since it's on the parent
113+
}
114+
}
107115
}
108116

109117
// Navbar search

0 commit comments

Comments
 (0)