0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Fix input sizing and increase vertical padding on textareas

This commit is contained in:
Mark Otto 2014-07-08 01:44:09 -07:00
parent ea59c3c31a
commit 6fda409853
8 changed files with 31 additions and 25 deletions

View File

@ -1713,7 +1713,7 @@ output {
.form-control { .form-control {
display: block; display: block;
width: 100%; width: 100%;
height: 27px; height: 2.6rem;
padding: .5rem 1rem; padding: .5rem 1rem;
font-size: 1rem; font-size: 1rem;
line-height: 1.5; line-height: 1.5;
@ -1753,6 +1753,8 @@ fieldset[disabled] .form-control {
} }
textarea.form-control { textarea.form-control {
height: auto; height: auto;
padding-top: 1rem;
padding-bottom: 1rem;
} }
input[type="search"] { input[type="search"] {
-webkit-appearance: none; -webkit-appearance: none;
@ -1761,7 +1763,7 @@ input[type="date"],
input[type="time"], input[type="time"],
input[type="datetime-local"], input[type="datetime-local"],
input[type="month"] { input[type="month"] {
line-height: 27px; line-height: 2.6rem;
line-height: 1.5 \0; line-height: 1.5 \0;
} }
input[type="date"].input-sm, input[type="date"].input-sm,
@ -1892,7 +1894,7 @@ select[multiple].form-group-lg .form-control {
position: relative; position: relative;
} }
.has-feedback .form-control { .has-feedback .form-control {
padding-right: 33.75px; padding-right: 3.25rem;
} }
.form-control-feedback { .form-control-feedback {
position: absolute; position: absolute;
@ -1900,9 +1902,9 @@ select[multiple].form-group-lg .form-control {
right: 0; right: 0;
z-index: 2; z-index: 2;
display: block; display: block;
width: 27px; width: 2.6rem;
height: 27px; height: 2.6rem;
line-height: 27px; line-height: 2.6rem;
text-align: center; text-align: center;
} }
.input-lg + .form-control-feedback { .input-lg + .form-control-feedback {
@ -3382,9 +3384,9 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
} }
.navbar-form { .navbar-form {
padding: 10px 15px; padding: 10px 15px;
margin-top: 11.5px; margin-top: 23.7px;
margin-right: -15px; margin-right: -15px;
margin-bottom: 11.5px; margin-bottom: 23.7px;
margin-left: -15px; margin-left: -15px;
border-top: 1px solid transparent; border-top: 1px solid transparent;
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
@ -3465,8 +3467,8 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
.navbar-btn { .navbar-btn {
margin-top: 11.5px; margin-top: 23.7px;
margin-bottom: 11.5px; margin-bottom: 23.7px;
} }
.navbar-btn.btn-sm { .navbar-btn.btn-sm {
margin-top: 23.2px; margin-top: 23.2px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1713,7 +1713,7 @@ output {
.form-control { .form-control {
display: block; display: block;
width: 100%; width: 100%;
height: 27px; height: 2.6rem;
padding: .5rem 1rem; padding: .5rem 1rem;
font-size: 1rem; font-size: 1rem;
line-height: 1.5; line-height: 1.5;
@ -1753,6 +1753,8 @@ fieldset[disabled] .form-control {
} }
textarea.form-control { textarea.form-control {
height: auto; height: auto;
padding-top: 1rem;
padding-bottom: 1rem;
} }
input[type="search"] { input[type="search"] {
-webkit-appearance: none; -webkit-appearance: none;
@ -1761,7 +1763,7 @@ input[type="date"],
input[type="time"], input[type="time"],
input[type="datetime-local"], input[type="datetime-local"],
input[type="month"] { input[type="month"] {
line-height: 27px; line-height: 2.6rem;
line-height: 1.5 \0; line-height: 1.5 \0;
} }
input[type="date"].input-sm, input[type="date"].input-sm,
@ -1892,7 +1894,7 @@ select[multiple].form-group-lg .form-control {
position: relative; position: relative;
} }
.has-feedback .form-control { .has-feedback .form-control {
padding-right: 33.75px; padding-right: 3.25rem;
} }
.form-control-feedback { .form-control-feedback {
position: absolute; position: absolute;
@ -1900,9 +1902,9 @@ select[multiple].form-group-lg .form-control {
right: 0; right: 0;
z-index: 2; z-index: 2;
display: block; display: block;
width: 27px; width: 2.6rem;
height: 27px; height: 2.6rem;
line-height: 27px; line-height: 2.6rem;
text-align: center; text-align: center;
} }
.input-lg + .form-control-feedback { .input-lg + .form-control-feedback {
@ -3382,9 +3384,9 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
} }
.navbar-form { .navbar-form {
padding: 10px 15px; padding: 10px 15px;
margin-top: 11.5px; margin-top: 23.7px;
margin-right: -15px; margin-right: -15px;
margin-bottom: 11.5px; margin-bottom: 23.7px;
margin-left: -15px; margin-left: -15px;
border-top: 1px solid transparent; border-top: 1px solid transparent;
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
@ -3465,8 +3467,8 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
.navbar-btn { .navbar-btn {
margin-top: 11.5px; margin-top: 23.7px;
margin-bottom: 11.5px; margin-bottom: 23.7px;
} }
.navbar-btn.btn-sm { .navbar-btn.btn-sm {
margin-top: 23.2px; margin-top: 23.2px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -149,6 +149,8 @@ output {
// Reset height for `textarea`s // Reset height for `textarea`s
textarea& { textarea& {
height: auto; height: auto;
padding-top: @padding-base-horizontal;
padding-bottom: @padding-base-horizontal;
} }
} }

View File

@ -193,7 +193,7 @@
@input-color-placeholder: @gray-light; @input-color-placeholder: @gray-light;
//** Default `.form-control` height //** Default `.form-control` height
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); @input-height-base: ((@font-size-base * @line-height-base) + (@padding-base-vertical * 2) + .1);
//** Large `.form-control` height //** Large `.form-control` height
@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2); @input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
//** Small `.form-control` height //** Small `.form-control` height