Commit a4fa8d07 authored by Mark Otto's avatar Mark Otto
Browse files

grunt dist

parents 9488bd58 00cc1666
4 merge requests!28721Hot test,!16605Test pull please ignore,!22103test,!25326Adjust examples
Showing with 84 additions and 11 deletions
+84 -11
...@@ -2480,7 +2480,8 @@ fieldset[disabled] .radio label, ...@@ -2480,7 +2480,8 @@ fieldset[disabled] .radio label,
fieldset[disabled] .checkbox label { fieldset[disabled] .checkbox label {
cursor: not-allowed; cursor: not-allowed;
} }
.input-sm { .input-sm,
.form-horizontal .form-group-sm .form-control {
height: 30px; height: 30px;
padding: 5px 10px; padding: 5px 10px;
font-size: 12px; font-size: 12px;
...@@ -2495,7 +2496,8 @@ textarea.input-sm, ...@@ -2495,7 +2496,8 @@ textarea.input-sm,
select[multiple].input-sm { select[multiple].input-sm {
height: auto; height: auto;
} }
.input-lg { .input-lg,
.form-horizontal .form-group-lg .form-control {
height: 46px; height: 46px;
padding: 10px 16px; padding: 10px 16px;
font-size: 18px; font-size: 18px;
...@@ -2705,6 +2707,16 @@ select[multiple].input-lg { ...@@ -2705,6 +2707,16 @@ select[multiple].input-lg {
top: 0; top: 0;
right: 15px; 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 { .btn {
display: inline-block; display: inline-block;
padding: 6px 12px; padding: 6px 12px;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -492,7 +492,7 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue ...@@ -492,7 +492,7 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var href var href
var $this = $(this) var $this = $(this)
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
var options = $.extend({}, $target.data(), $this.data()) var options = $.extend({}, $target.data(), $this.data())
var slideIndex = $this.attr('data-slide-to') var slideIndex = $this.attr('data-slide-to')
if (slideIndex) options.interval = false if (slideIndex) options.interval = false
...@@ -675,7 +675,7 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue ...@@ -675,7 +675,7 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue
var $this = $(this) var $this = $(this)
var target = $this.attr('data-target') var target = $this.attr('data-target')
|| e.preventDefault() || e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
var $target = $(target) var $target = $(target)
var data = $target.data('bs.collapse') var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data() var option = data ? 'toggle' : $this.data()
...@@ -802,7 +802,7 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue ...@@ -802,7 +802,7 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue
if (!selector) { if (!selector) {
selector = $this.attr('href') selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
} }
var $parent = selector && $(selector) var $parent = selector && $(selector)
...@@ -1121,13 +1121,13 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue ...@@ -1121,13 +1121,13 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this) var $this = $(this)
var href = $this.attr('href') var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
if ($this.is('a')) e.preventDefault() if ($this.is('a')) e.preventDefault()
$target.one('show.bs.modal', function (showEvent) { $target.one('show.bs.modal', function (showEvent) {
if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
$target.one('hidden.bs.modal', function () { $target.one('hidden.bs.modal', function () {
$this.is(':visible') && $this.trigger('focus') $this.is(':visible') && $this.trigger('focus')
}) })
...@@ -1932,7 +1932,7 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue ...@@ -1932,7 +1932,7 @@ if (typeof define == 'undefined' && typeof exports == 'undefined' && typeof jQue
if (!selector) { if (!selector) {
selector = $this.attr('href') selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
} }
if ($this.parent('li').hasClass('active')) return if ($this.parent('li').hasClass('active')) return
......
...@@ -670,6 +670,42 @@ ...@@ -670,6 +670,42 @@
<select class="form-control input-sm">...</select> <select class="form-control input-sm">...</select>
{% endhighlight %} {% 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" id="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" id="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" id="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" id="formGroupInputSmall" placeholder="Small input">
</div>
</div>
</form>
{% endhighlight %}
<h3>Column sizing</h3> <h3>Column sizing</h3>
<p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p> <p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p>
<div class="bs-example"> <div class="bs-example">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -507,4 +507,29 @@ input[type="checkbox"] { ...@@ -507,4 +507,29 @@ input[type="checkbox"] {
top: 0; top: 0;
right: (@grid-gutter-width / 2); 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);
}
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment