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

Fixes #15074: Fix the nesting problem with form control size variants

This commit is contained in:
Mark Otto 2014-11-29 20:57:04 -08:00
parent 80d7be1126
commit 7c71b4874b
4 changed files with 47 additions and 14 deletions

View File

@ -2494,7 +2494,21 @@ fieldset[disabled] .checkbox label {
padding-right: 0;
padding-left: 0;
}
.input-sm,
.input-sm {
height: 30px;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
select.input-sm {
height: 30px;
line-height: 30px;
}
textarea.input-sm,
select[multiple].input-sm {
height: auto;
}
.form-group-sm .form-control {
height: 30px;
padding: 5px 10px;
@ -2502,18 +2516,29 @@ fieldset[disabled] .checkbox label {
line-height: 1.5;
border-radius: 3px;
}
select.input-sm,
select.form-group-sm .form-control {
height: 30px;
line-height: 30px;
}
textarea.input-sm,
textarea.form-group-sm .form-control,
select[multiple].input-sm,
select[multiple].form-group-sm .form-control {
height: auto;
}
.input-lg,
.input-lg {
height: 46px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 6px;
}
select.input-lg {
height: 46px;
line-height: 46px;
}
textarea.input-lg,
select[multiple].input-lg {
height: auto;
}
.form-group-lg .form-control {
height: 46px;
padding: 10px 16px;
@ -2521,14 +2546,11 @@ select[multiple].form-group-sm .form-control {
line-height: 1.33;
border-radius: 6px;
}
select.input-lg,
select.form-group-lg .form-control {
height: 46px;
line-height: 46px;
}
textarea.input-lg,
textarea.form-group-lg .form-control,
select[multiple].input-lg,
select[multiple].form-group-lg .form-control {
height: auto;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -309,16 +309,27 @@ input[type="checkbox"] {
//
// Build on `.form-control` with modifier classes to decrease or increase the
// height and font-size of form controls.
//
// The `.form-group-* form-control` variations are sadly duplicated to avoid the
// issue documented in https://github.com/twbs/bootstrap/issues/15074.
.input-sm,
.form-group-sm .form-control {
.input-sm {
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
}
.form-group-sm {
.form-control {
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
}
}
.input-lg,
.form-group-lg .form-control {
.input-lg {
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
}
.form-group-lg {
.form-control {
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
}
}
// Form control feedback states