0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +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;
min-width: 16px;
height: 18px;
margin-right: -1px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
@ -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;
@ -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;

View File

@ -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;
@ -395,6 +394,11 @@ select:focus:required:invalid {
border-color: @green;
}
}
.input-prepend {
.add-on {
margin-right: -1px;
}
}
.input-append {
input,
select
@ -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);
}