Skip to content

Commit

Permalink
resolve twbs#1972, allowing add-ons at beginning and end of input-pre…
Browse files Browse the repository at this point in the history
…pend/append
  • Loading branch information
mdo committed Mar 12, 2012
1 parent 5eed370 commit 7c2ed0c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
Binary file modified docs/assets/bootstrap.zip
Binary file not shown.
24 changes: 22 additions & 2 deletions docs/assets/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,6 @@ select:focus:required:invalid:focus {
width: auto;
min-width: 16px;
height: 18px;
margin-right: -1px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
Expand All @@ -1031,6 +1030,9 @@ select:focus:required:invalid:focus {
background-color: #a9dba9;
border-color: #46a546;
}
.input-prepend .add-on {
margin-right: -1px;
}
.input-append input,
.input-append select .uneditable-input {
-webkit-border-radius: 3px 0 0 3px;
Expand All @@ -1042,7 +1044,25 @@ select:focus:required:invalid:focus {
border-right-color: #ccc;
}
.input-append .add-on {
margin-right: 0;
margin-left: -1px;
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.input-prepend.input-append input,
.input-prepend.input-append select,
.input-prepend.input-append .uneditable-input {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.input-prepend.input-append .add-on:first-child {
margin-right: -1px;
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.input-prepend.input-append .add-on:last-child {
margin-left: -1px;
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
Expand Down
23 changes: 21 additions & 2 deletions less/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ select:focus:required:invalid {
width: auto;
min-width: 16px;
height: @baseLineHeight;
margin-right: -1px;
padding: 4px 5px;
font-weight: normal;
line-height: @baseLineHeight;
Expand All @@ -395,6 +394,11 @@ select:focus:required:invalid {
border-color: @green;
}
}
.input-prepend {
.add-on {
margin-right: -1px;
}
}
.input-append {
input,
select
Expand All @@ -406,7 +410,22 @@ select:focus:required:invalid {
border-right-color: #ccc;
}
.add-on {
margin-right: 0;
margin-left: -1px;
.border-radius(0 3px 3px 0);
}
}
// Remove all border-radius for inputs with both prepend and append
.input-prepend.input-append {
input,
select,
.uneditable-input {
.border-radius(0);
}
.add-on:first-child {
margin-right: -1px;
.border-radius(3px 0 0 3px);
}
.add-on:last-child {
margin-left: -1px;
.border-radius(0 3px 3px 0);
}
Expand Down

0 comments on commit 7c2ed0c

Please sign in to comment.