0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

Merge branch 'master' into icon_paths

Conflicts:
	dist/css/bootstrap.css.map
	docs/dist/css/bootstrap.css.map
This commit is contained in:
Mark Otto 2014-05-22 23:01:42 -07:00
commit d66b65ddde
39 changed files with 113 additions and 54 deletions

File diff suppressed because one or more lines are too long

View File

@ -2629,11 +2629,14 @@ select[multiple].input-lg {
.form-inline .radio,
.form-inline .checkbox {
display: inline-block;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio label,
.form-inline .checkbox label {
padding-left: 0;
}
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
float: none;
@ -3971,11 +3974,14 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
.navbar-form .radio,
.navbar-form .checkbox {
display: inline-block;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .radio label,
.navbar-form .checkbox label {
padding-left: 0;
}
.navbar-form .radio input[type="radio"],
.navbar-form .checkbox input[type="checkbox"] {
float: none;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12
dist/js/bootstrap.js vendored
View File

@ -1074,7 +1074,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if ($this.is('a')) e.preventDefault()
Plugin.call($target, option, this)
$target.one('hide', function () {
$target.one('hide.bs.modal', function () {
$this.is(':visible') && $this.trigger('focus')
})
})
@ -1944,7 +1944,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
var Affix = function (element, options) {
this.options = $.extend({}, Affix.DEFAULTS, options)
this.$window = $(window)
this.$target = $(this.options.target)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
@ -1961,13 +1962,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Affix.RESET = 'affix affix-top affix-bottom'
Affix.DEFAULTS = {
offset: 0
offset: 0,
target: window
}
Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop = this.$window.scrollTop()
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
return (this.pinnedOffset = position.top - scrollTop)
}
@ -1980,7 +1982,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
var scrollTop = this.$window.scrollTop()
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var offset = this.options.offset
var offsetTop = offset.top

File diff suppressed because one or more lines are too long

View File

@ -349,6 +349,18 @@
<h2 id="tables-responsive">Responsive tables</h2>
<p>Create responsive tables by wrapping any <code>.table</code> in <code>.table-responsive</code> to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.</p>
<div class="bs-callout bs-callout-warning">
<h4>Firefox and fieldsets</h4>
<p>Firefox has some awkward fieldset styling involving <code>width</code> that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we <strong>don't</strong> provide in Bootstrap:</p>
{% highlight css %}
@-moz-document url-prefix() {
fieldset { display: table-cell; }
}
{% endhighlight %}
<p>For more information, read <a href="http://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685">this Stack Overflow answer</a>.</p>
</div>
<div class="bs-example">
<div class="table-responsive">
<table class="table">

View File

@ -15,6 +15,10 @@
<!-- Bootstrap core CSS -->
<link href="../dist/css/bootstrap.min.css" rel="stylesheet">
{% if page.slug == "css" or page.slug == "components" or page.slug == "js" %}
<!-- Optional Bootstrap Theme -->
<link href="data:text/css;charset=utf-8," data-href="../dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">
{% endif %}
<!-- Documentation extras -->
<link href="../assets/css/docs.min.css" rel="stylesheet">
@ -31,7 +35,7 @@
<!-- Favicons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="icon" href="../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../assets/ico/favicon.ico">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

View File

@ -7,7 +7,7 @@
<hr class="bs-docs-separator">
<h2 id="affix-usage">Usage</h2>
<p>Use the affix plugin via data attributes or manually with your own JavaScript. <strong>In both situations, you must provide CSS for the positioning of your content.</strong></p>
<p>Use the affix plugin via data attributes or manually with your own JavaScript. <strong class="text-danger">In both situations, you must provide CSS for the positioning and width of your affixed content.</strong></p>
<h3>Positioning via CSS</h3>
<p>The affix plugin toggles between three classes, each representing a particular state: <code>.affix</code>, <code>.affix-top</code>, and <code>.affix-bottom</code>. You must provide the styles for these classes yourself (independent of this plugin) to handle the actual positions.</p>

View File

@ -47,10 +47,14 @@
<a class="back-to-top" href="#top">
Back to top
</a>
{% if page.slug == "css" or page.slug == "components" or page.slug == "js" %}
<a href="#" class="bs-docs-theme-toggle">
Preview theme
</a>
{% endif %}
</div>
</div>
</div>
</div>
{% include footer.html %}

View File

@ -583,7 +583,8 @@ body {
}
/* Back to top (hidden on mobile) */
.back-to-top {
.back-to-top,
.bs-docs-theme-toggle {
display: none;
padding: 4px 10px;
margin-top: 10px;
@ -592,13 +593,18 @@ body {
font-weight: 500;
color: #999;
}
.back-to-top:hover {
.back-to-top:hover,
.bs-docs-theme-toggle:hover {
color: #563d7c;
text-decoration: none;
}
.bs-docs-theme-toggle {
margin-top: 0;
}
@media (min-width: 768px) {
.back-to-top {
.back-to-top,
.bs-docs-theme-toggle {
display: block;
}
}
@ -666,7 +672,9 @@ h1[id] {
.bs-callout {
padding: 20px;
margin: 20px 0;
border-left: 3px solid #eee;
border: 1px solid #eee;
border-left-width: 5px;
border-radius: 3px;
}
.bs-callout h4 {
margin-top: 0;
@ -676,28 +684,29 @@ h1[id] {
margin-bottom: 0;
}
.bs-callout code {
background-color: #fff;
border-radius: 3px;
}
/* Tighten up space between multiple callouts */
.bs-callout + .bs-callout {
margin-top: -5px;
}
/* Variations */
.bs-callout-danger {
background-color: #fdf7f7;
border-color: #d9534f;
border-left-color: #d9534f;
}
.bs-callout-danger h4 {
color: #d9534f;
}
.bs-callout-warning {
background-color: #fcf8f2;
border-color: #f0ad4e;
border-left-color: #f0ad4e;
}
.bs-callout-warning h4 {
color: #f0ad4e;
}
.bs-callout-info {
background-color: #f4f8fa;
border-color: #5bc0de;
border-left-color: #5bc0de;
}
.bs-callout-info h4 {
color: #5bc0de;

File diff suppressed because one or more lines are too long

View File

@ -53,6 +53,23 @@
$('.bs-top').affix()
}, 100)
// theme toggler
;(function () {
var stylesheetLink = $('#bs-theme-stylesheet')
var themeBtn = $('.bs-docs-theme-toggle')
themeBtn.click(function () {
var href = stylesheetLink.attr('href');
if (!href || href.indexOf('data') === 0) {
stylesheetLink.attr('href', stylesheetLink.attr('data-href'))
themeBtn.text('Disable theme preview')
}
else {
stylesheetLink.attr('href', '')
themeBtn.text('Preview theme')
}
})
})();
// tooltip demo
$('.tooltip-demo').tooltip({
selector: '[data-toggle="tooltip"]',

View File

@ -13,4 +13,4 @@ var Holder=Holder||{};!function(a,b){function c(a,b,c){b=parseInt(b,10),a=parseI
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
!function(a){a(function(){var b=a(window),c=a(document.body);c.scrollspy({target:".bs-docs-sidebar"}),b.on("load",function(){c.scrollspy("refresh")}),a(".bs-docs-container [href=#]").click(function(a){a.preventDefault()}),setTimeout(function(){var b=a(".bs-docs-sidebar");b.affix({offset:{top:function(){var c=b.offset().top,d=parseInt(b.children(0).css("margin-top"),10),e=a(".bs-docs-nav").height();return this.top=c-e-d},bottom:function(){return this.bottom=a(".bs-docs-footer").outerHeight(!0)}}})},100),setTimeout(function(){a(".bs-top").affix()},100),a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a(".tooltip-test").tooltip(),a(".popover-test").popover(),a(".bs-docs-navbar").tooltip({selector:'a[data-toggle="tooltip"]',container:".bs-docs-navbar .nav"}),a(".bs-docs-popover").popover(),a(".bs-docs-popover-dismiss").popover({trigger:"focus"}),a("#loading-example-btn").click(function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)})})}(jQuery);
!function(a){a(function(){var b=a(window),c=a(document.body);c.scrollspy({target:".bs-docs-sidebar"}),b.on("load",function(){c.scrollspy("refresh")}),a(".bs-docs-container [href=#]").click(function(a){a.preventDefault()}),setTimeout(function(){var b=a(".bs-docs-sidebar");b.affix({offset:{top:function(){var c=b.offset().top,d=parseInt(b.children(0).css("margin-top"),10),e=a(".bs-docs-nav").height();return this.top=c-e-d},bottom:function(){return this.bottom=a(".bs-docs-footer").outerHeight(!0)}}})},100),setTimeout(function(){a(".bs-top").affix()},100),function(){var b=a("#bs-theme-stylesheet"),c=a(".bs-docs-theme-toggle");c.click(function(){var a=b.attr("href");a&&0!==a.indexOf("data")?(b.attr("href",""),c.text("Preview theme")):(b.attr("href",b.attr("data-href")),c.text("Disable theme preview"))})}(),a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a(".tooltip-test").tooltip(),a(".popover-test").popover(),a(".bs-docs-navbar").tooltip({selector:'a[data-toggle="tooltip"]',container:".bs-docs-navbar .nav"}),a(".bs-docs-popover").popover(),a(".bs-docs-popover-dismiss").popover({trigger:"focus"}),a("#loading-example-btn").click(function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)})})}(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Blog Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Carousel Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Cover Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Dashboard Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Equal Height Columns Example for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Grid Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Narrow Jumbotron Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Jumbotron Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Justified Nav Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Fixed Top Navbar Example for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Static Top Navbar Example for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Navbar Template for Bootstrap</title>

View File

@ -8,7 +8,7 @@
<!-- Note there is no responsive meta tag here -->
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Non-responsive Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Off Canvas Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Signin Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Starter Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Sticky Footer Navbar Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Sticky Footer Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Theme Template for Bootstrap</title>

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../assets/ico/favicon.ico">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
<title>Tooltip Viewport Example for Bootstrap</title>

View File

@ -165,9 +165,11 @@ input[type="search"] {
}
// Special styles for iOS date input
// Special styles for iOS temporal inputs
//
// In Mobile Safari, date inputs require a pixel line-height that matches the
// In Mobile Safari, setting `display: block` on temporal inputs causes the
// text within the input to become vertically misaligned.
// As a workaround, we set a pixel line-height that matches the
// given height of the input. Since this fucks up everything else, we have to
// appropriately reset it for Internet Explorer and the size variations.
@ -410,8 +412,11 @@ input[type="checkbox"],
display: inline-block;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
vertical-align: middle;
label {
padding-left: 0;
}
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {