0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

resolve #1972, allowing add-ons at beginning and end of input-prepend/append

This commit is contained in:
Mark Otto 2012-03-11 23:21:38 -07:00
parent 5eed370856
commit 7c2ed0c095
3 changed files with 43 additions and 4 deletions

Binary file not shown.

View File

@ -1013,7 +1013,6 @@ select:focus:required:invalid:focus {
width: auto; width: auto;
min-width: 16px; min-width: 16px;
height: 18px; height: 18px;
margin-right: -1px;
padding: 4px 5px; padding: 4px 5px;
font-weight: normal; font-weight: normal;
line-height: 18px; line-height: 18px;
@ -1031,6 +1030,9 @@ select:focus:required:invalid:focus {
background-color: #a9dba9; background-color: #a9dba9;
border-color: #46a546; border-color: #46a546;
} }
.input-prepend .add-on {
margin-right: -1px;
}
.input-append input, .input-append input,
.input-append select .uneditable-input { .input-append select .uneditable-input {
-webkit-border-radius: 3px 0 0 3px; -webkit-border-radius: 3px 0 0 3px;
@ -1042,7 +1044,25 @@ select:focus:required:invalid:focus {
border-right-color: #ccc; border-right-color: #ccc;
} }
.input-append .add-on { .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; margin-left: -1px;
-webkit-border-radius: 0 3px 3px 0; -webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0; -moz-border-radius: 0 3px 3px 0;

View File

@ -379,7 +379,6 @@ select:focus:required:invalid {
width: auto; width: auto;
min-width: 16px; min-width: 16px;
height: @baseLineHeight; height: @baseLineHeight;
margin-right: -1px;
padding: 4px 5px; padding: 4px 5px;
font-weight: normal; font-weight: normal;
line-height: @baseLineHeight; line-height: @baseLineHeight;
@ -395,6 +394,11 @@ select:focus:required:invalid {
border-color: @green; border-color: @green;
} }
} }
.input-prepend {
.add-on {
margin-right: -1px;
}
}
.input-append { .input-append {
input, input,
select select
@ -406,7 +410,22 @@ select:focus:required:invalid {
border-right-color: #ccc; border-right-color: #ccc;
} }
.add-on { .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; margin-left: -1px;
.border-radius(0 3px 3px 0); .border-radius(0 3px 3px 0);
} }