mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
fixes #13021: add .form-group-sm/-lg
This commit is contained in:
parent
46e8a5817d
commit
74a264fb98
16
dist/css/bootstrap.css
vendored
16
dist/css/bootstrap.css
vendored
@ -2480,7 +2480,8 @@ fieldset[disabled] .radio label,
|
||||
fieldset[disabled] .checkbox label {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.input-sm {
|
||||
.input-sm,
|
||||
.form-horizontal .form-group-sm .form-control {
|
||||
height: 30px;
|
||||
padding: 5px 10px;
|
||||
font-size: 12px;
|
||||
@ -2495,7 +2496,8 @@ textarea.input-sm,
|
||||
select[multiple].input-sm {
|
||||
height: auto;
|
||||
}
|
||||
.input-lg {
|
||||
.input-lg,
|
||||
.form-horizontal .form-group-lg .form-control {
|
||||
height: 46px;
|
||||
padding: 10px 16px;
|
||||
font-size: 18px;
|
||||
@ -2705,6 +2707,16 @@ select[multiple].input-lg {
|
||||
top: 0;
|
||||
right: 15px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.form-horizontal .form-group-lg .control-label {
|
||||
padding-top: 14.3px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.form-horizontal .form-group-sm .control-label {
|
||||
padding-top: 6px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
|
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -670,6 +670,42 @@
|
||||
<select class="form-control input-sm">...</select>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>Horizontal form group sizes</h3>
|
||||
<p>Quickly size labels and form controls within <code>.form-horizontal</code> by adding <code>.form-group-lg</code> or <code>.form-group-sm</code>.</p>
|
||||
<div class="bs-example">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group form-group-lg">
|
||||
<label class="col-sm-2 control-label" for="formGroupInputLarge">Large label</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="formGroupInputLarge" placeholder="Large input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-group-sm">
|
||||
<label class="col-sm-2 control-label" for="formGroupInputSmall">Small label</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="formGroupInputSmall" placeholder="Small input">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.bs-example -->
|
||||
{% highlight html %}
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group form-group-lg">
|
||||
<label class="col-sm-2 control-label" for="formGroupInputLarge">Large label</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="formGroupInputLarge" placeholder="Large input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-group-sm">
|
||||
<label class="col-sm-2 control-label" for="formGroupInputSmall">Small label</label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="formGroupInputSmall" placeholder="Small input">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
<h3>Column sizing</h3>
|
||||
<p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
|
||||
<div class="bs-example">
|
||||
|
2
docs/dist/css/bootstrap.css.map
vendored
2
docs/dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css
vendored
2
docs/dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@ -507,4 +507,29 @@ input[type="checkbox"] {
|
||||
top: 0;
|
||||
right: (@grid-gutter-width / 2);
|
||||
}
|
||||
|
||||
// Form group sizes
|
||||
//
|
||||
// Quick utility class for applying `.input-lg` and `.input-sm` styles to the
|
||||
// inputs and labels within a `.form-group`.
|
||||
.form-group-lg {
|
||||
@media (min-width: @screen-sm-min) {
|
||||
.control-label {
|
||||
padding-top: ((@padding-large-vertical * @line-height-large) + 1);
|
||||
}
|
||||
}
|
||||
.form-control {
|
||||
&:extend(.input-lg);
|
||||
}
|
||||
}
|
||||
.form-group-sm {
|
||||
@media (min-width: @screen-sm-min) {
|
||||
.control-label {
|
||||
padding-top: (@padding-small-vertical + 1);
|
||||
}
|
||||
}
|
||||
.form-control {
|
||||
&:extend(.input-sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user