0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

Merge branch 'master' into derp

Conflicts:
	Gruntfile.js
	_config.yml
	dist/css/bootstrap-theme.css
	dist/css/bootstrap-theme.css.map
	dist/css/bootstrap-theme.min.css
	dist/css/bootstrap.css
	dist/css/bootstrap.css.map
	dist/css/bootstrap.min.css
	docs/_includes/components/button-groups.html
	docs/_includes/components/jumbotron.html
	docs/_includes/components/media.html
	docs/_includes/components/navs.html
	docs/_includes/customizer-variables.html
	docs/_includes/footer.html
	docs/_includes/getting-started/browser-device-support.html
	docs/_includes/js/carousel.html
	docs/_includes/js/dropdowns.html
	docs/_includes/js/modal.html
	docs/_includes/js/popovers.html
	docs/_includes/js/tooltips.html
	docs/_includes/nav/getting-started.html
	docs/_includes/nav/javascript.html
	docs/_layouts/default.html
	docs/assets/css/docs.min.css
	docs/assets/css/src/docs.css
	docs/assets/js/customize.min.js
	docs/assets/js/docs.min.js
	docs/assets/js/raw-files.min.js
	docs/browser-bugs.html
	docs/dist/css/bootstrap-theme.css
	docs/dist/css/bootstrap-theme.css.map
	docs/dist/css/bootstrap-theme.min.css
	docs/dist/css/bootstrap.css
	docs/dist/css/bootstrap.css.map
	docs/dist/css/bootstrap.min.css
	docs/examples/justified-nav/index.html
	less/_forms.less
	less/_tooltip.less
	less/navs.less
	less/theme.less
This commit is contained in:
Mark Otto 2014-11-09 22:02:53 -08:00
commit 86af1f39ab
91 changed files with 19656 additions and 581 deletions

View File

@ -20,8 +20,8 @@ after_script:
- if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py upload rubygems; fi
env:
global:
- JEKYLL_VERSION: 2.3.0
- ROUGE_VERSION: 1.6.2
- JEKYLL_VERSION: 2.4.0
- ROUGE_VERSION: 1.7.2
- SAUCE_USERNAME: bootstrap
- secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
- secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="

View File

@ -88,6 +88,10 @@ When feasible, we aim to report such upstream bugs to the relevant browser vendo
| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://code.google.com/p/chromium/issues/list | Click the "New issue" button. |
| Microsoft | Internet Explorer | Trident | https://connect.microsoft.com/IE/feedback/LoadSubmitFeedbackForm | |
### Issues bots
[@twbs-lmvtfy](https://github.com/twbs-lmvtfy) is a Bootstrap bot that hangs out in our GitHub issue tracker and automatically checks for HTML validation errors in live examples (e.g. jsFiddles, JS Bins, Bootplys, Plunks, CodePens, etc.) posted in issue comments. If it finds any errors, it will post a follow-up comment on the issue and point out the errors. If this happens with an example you've posted, please fix the errors and post an updated live example. If you opened a bug report, please check whether the bug still occurs with your revised, valid live example. If the bug no longer occurs, it was probably due to your invalid HTML rather than something in Bootstrap and we'd appreciate it if you could close out the GitHub issue.
## Feature requests
@ -112,6 +116,17 @@ Please adhere to the [coding guidelines](#code-guidelines) used throughout the
project (indentation, accurate comments, etc.) and any other requirements
(such as test coverage).
**Do not edit `bootstrap.css`, `bootstrap-theme.css`, or `bootstrap.js`
directly!** Those files are automatically generated. You should edit the
source files in [`/bootstrap/less/`](https://github.com/twbs/bootstrap/tree/master/less)
and/or [`/bootstrap/js/`](https://github.com/twbs/bootstrap/tree/master/js) instead.
Similarly, when contributing to Bootstrap's documentation, you should edit the
documentation source files in
[the `/bootstrap/docs/` directory of the `master` branch](https://github.com/twbs/bootstrap/tree/master/docs).
**Do not edit the `gh-pages` branch.** That branch is generated from the
documentation source files and is managed separately by the Bootstrap Core Team.
Adhering to the following process is the best way to get your work
included in the project:
@ -165,6 +180,13 @@ included in the project:
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
license your work under the terms of the [MIT License](LICENSE.md).
### Pull request checker bot: Rorschach
[@twbs-rorschach](https://github.com/twbs-rorschach) is a Bootstrap bot that hangs out in our GitHub issue tracker and automatically checks all pull requests for a few simple common mistakes. It's possible that Rorschach might leave a comment on your pull request and then close it. If that happens, simply fix the problem(s) mentioned in the comment (there should be link(s) in the comment explaining the problem(s) in detail) and then either:
* Push the revised version to your pull request's branch and post a comment on the pull request saying that you've fixed the problem(s). One of the Bootstrap Core Team members will then come along and reopen your pull request.
* Or you can just open a new pull request for your revised version.
## Code guidelines

View File

@ -27,6 +27,13 @@ module.exports = function (grunt) {
};
var generateRawFiles = require('./grunt/bs-raw-files-generator.js');
var generateCommonJSModule = require('./grunt/bs-commonjs-generator.js');
var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
Object.keys(configBridge.paths).forEach(function (key) {
configBridge.paths[key].forEach(function (val, i, arr) {
arr[i] = path.join('./docs/assets', val);
});
});
// Project configuration.
grunt.initConfig({
@ -38,21 +45,8 @@ module.exports = function (grunt) {
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
' */\n',
// NOTE: This jqueryCheck/jqueryVersionCheck code is duplicated in customizer.js;
// if making changes here, be sure to update the other copy too.
jqueryCheck: [
'if (typeof jQuery === \'undefined\') {',
' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\')',
'}\n'
].join('\n'),
jqueryVersionCheck: [
'+function ($) {',
' var version = $.fn.jquery.split(\' \')[0].split(\'.\')',
' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {',
' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery version 1.9.1 or higher\')',
' }',
'}(jQuery);\n\n'
].join('\n'),
jqueryCheck: configBridge.config.jqueryCheck.join('\n'),
jqueryVersionCheck: configBridge.config.jqueryVersionCheck.join('\n'),
// Task configuration.
clean: {
@ -138,24 +132,11 @@ module.exports = function (grunt) {
dest: 'dist/js/<%= pkg.name %>.min.js'
},
customize: {
src: [
'docs/assets/js/vendor/less.min.js',
'docs/assets/js/vendor/jszip.min.js',
'docs/assets/js/vendor/uglify.min.js',
'docs/assets/js/vendor/Blob.js',
'docs/assets/js/vendor/FileSaver.js',
'docs/assets/js/raw-files.min.js',
'docs/assets/js/src/customizer.js'
],
src: configBridge.paths.customizerJs,
dest: 'docs/assets/js/customize.min.js'
},
docsJs: {
// NOTE: This src list is duplicated in footer.html; if making changes here, be sure to update the other copy too.
src: [
'docs/assets/js/vendor/holder.js',
'docs/assets/js/vendor/ZeroClipboard.min.js',
'docs/assets/js/src/application.js'
],
src: configBridge.paths.docsJs,
dest: 'docs/assets/js/docs.min.js'
}
},
@ -191,16 +172,7 @@ module.exports = function (grunt) {
autoprefixer: {
options: {
browsers: [
'Android 2.3',
'Android >= 4',
'Chrome >= 20',
'Firefox >= 24', // Firefox 24 is the latest ESR
'Explorer >= 9',
'iOS >= 6',
'Opera >= 12',
'Safari >= 6'
]
browsers: configBridge.config.autoprefixerBrowsers
},
core: {
options: {

View File

@ -24,7 +24,7 @@ To get started, check out <http://getbootstrap.com>!
Four quick start options are available:
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.2.0.zip).
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.0.zip).
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
- Install with [Bower](http://bower.io): `bower install bootstrap`.
- Install with [npm](https://www.npmjs.org): `npm install bootstrap`.
@ -67,7 +67,7 @@ Bootstrap's documentation, included in this repo in the root directory, is built
### Running documentation locally
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.3.x).
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.4.x).
- **Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.
2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.

View File

@ -13,28 +13,26 @@ source: docs
destination: _gh_pages
host: 0.0.0.0
port: 9001
baseurl: /
url: http://getbootstrap.com
encoding: UTF-8
exclude: [assets/less/, assets/js/src/]
# Custom vars
current_version: 3.2.0
current_version: 3.3.0
repo: https://github.com/twbs/bootstrap
sass_repo: https://github.com/twbs/bootstrap-sass
download:
source: https://github.com/twbs/bootstrap/archive/v3.2.0.zip
dist: https://github.com/twbs/bootstrap/releases/download/v3.2.0/bootstrap-3.2.0-dist.zip
sass: https://github.com/twbs/bootstrap-sass/archive/v3.2.0.tar.gz
source: https://github.com/twbs/bootstrap/archive/v3.3.0.zip
dist: https://github.com/twbs/bootstrap/releases/download/v3.3.0/bootstrap-3.3.0-dist.zip
sass: https://github.com/twbs/bootstrap-sass/archive/v3.3.0.tar.gz
blog: http://blog.getbootstrap.com
expo: http://expo.getbootstrap.com
cdn:
css: https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css
css_theme: https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css
js: https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js
css: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css
js: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js
jquery: //code.jquery.com/jquery-2.1.1.min.js
bug:

View File

@ -1,7 +1,7 @@
{
"name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"version": "3.2.0",
"version": "3.3.0",
"keywords": [
"css",
"js",

View File

@ -28,7 +28,7 @@
"license": "MIT",
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev"
"dev-master": "3.3.x-dev"
}
},
"replace": {

189
dist/js/bootstrap.js vendored
View File

@ -1,5 +1,5 @@
/*!
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Bootstrap v3.3.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@ -16,7 +16,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: transition.js v3.2.0
* Bootstrap: transition.js v3.3.0
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -76,7 +76,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.2.0
* Bootstrap: alert.js v3.3.0
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -95,7 +95,7 @@ if (typeof jQuery === 'undefined') {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.2.0'
Alert.VERSION = '3.3.0'
Alert.TRANSITION_DURATION = 150
@ -171,7 +171,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: button.js v3.2.0
* Bootstrap: button.js v3.3.0
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -191,7 +191,7 @@ if (typeof jQuery === 'undefined') {
this.isLoading = false
}
Button.VERSION = '3.2.0'
Button.VERSION = '3.3.0'
Button.DEFAULTS = {
loadingText: 'loading...'
@ -207,10 +207,10 @@ if (typeof jQuery === 'undefined') {
if (data.resetText == null) $el.data('resetText', $el[val]())
$el[val](data[state] == null ? this.options[state] : data[state])
// push to event loop to allow forms to submit
setTimeout($.proxy(function () {
$el[val](data[state] == null ? this.options[state] : data[state])
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
@ -282,13 +282,13 @@ if (typeof jQuery === 'undefined') {
e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
})
}(jQuery);
/* ========================================================================
* Bootstrap: carousel.js v3.2.0
* Bootstrap: carousel.js v3.3.0
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -319,7 +319,7 @@ if (typeof jQuery === 'undefined') {
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.2.0'
Carousel.VERSION = '3.3.0'
Carousel.TRANSITION_DURATION = 600
@ -331,6 +331,7 @@ if (typeof jQuery === 'undefined') {
}
Carousel.prototype.keydown = function (e) {
if (/input|textarea/i.test(e.target.tagName)) return
switch (e.which) {
case 37: this.prev(); break
case 39: this.next(); break
@ -496,7 +497,7 @@ if (typeof jQuery === 'undefined') {
// CAROUSEL DATA-API
// =================
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var clickHandler = function (e) {
var href
var $this = $(this)
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
@ -512,7 +513,11 @@ if (typeof jQuery === 'undefined') {
}
e.preventDefault()
})
}
$(document)
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
$(window).on('load', function () {
$('[data-ride="carousel"]').each(function () {
@ -524,7 +529,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: collapse.js v3.2.0
* Bootstrap: collapse.js v3.3.0
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -541,18 +546,25 @@ if (typeof jQuery === 'undefined') {
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
this.transitioning = null
if (this.options.parent) this.$parent = $(this.options.parent)
if (this.options.parent) {
this.$parent = this.getParent()
} else {
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
}
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.2.0'
Collapse.VERSION = '3.3.0'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = {
toggle: true
toggle: true,
trigger: '[data-toggle="collapse"]'
}
Collapse.prototype.dimension = function () {
@ -587,6 +599,10 @@ if (typeof jQuery === 'undefined') {
.addClass('collapsing')[dimension](0)
.attr('aria-expanded', true)
this.$trigger
.removeClass('collapsed')
.attr('aria-expanded', true)
this.transitioning = 1
var complete = function () {
@ -623,6 +639,10 @@ if (typeof jQuery === 'undefined') {
.removeClass('collapse in')
.attr('aria-expanded', false)
this.$trigger
.addClass('collapsed')
.attr('aria-expanded', false)
this.transitioning = 1
var complete = function () {
@ -645,6 +665,33 @@ if (typeof jQuery === 'undefined') {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
Collapse.prototype.getParent = function () {
return $(this.options.parent)
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
.each($.proxy(function (i, element) {
var $element = $(element)
this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
}, this))
.end()
}
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
var isOpen = $element.hasClass('in')
$element.attr('aria-expanded', isOpen)
$trigger
.toggleClass('collapsed', !isOpen)
.attr('aria-expanded', isOpen)
}
function getTargetFromTrigger($trigger) {
var href
var target = $trigger.attr('data-target')
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
return $(target)
}
// COLLAPSE PLUGIN DEFINITION
// ==========================
@ -680,22 +727,13 @@ if (typeof jQuery === 'undefined') {
// =================
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
var href
var $this = $(this)
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
var $target = $(target)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data()
var parent = $this.attr('data-parent')
var $parent = parent && $(parent)
if (!data || !data.transitioning) {
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed').attr('aria-expanded', false)
var isCollapsed = $target.hasClass('in')
$this.toggleClass('collapsed', isCollapsed).attr('aria-expanded', !isCollapsed)
}
if (!$this.attr('data-target')) e.preventDefault()
var $target = getTargetFromTrigger($this)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
Plugin.call($target, option)
})
@ -703,7 +741,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: dropdown.js v3.2.0
* Bootstrap: dropdown.js v3.3.0
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -723,7 +761,7 @@ if (typeof jQuery === 'undefined') {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.2.0'
Dropdown.VERSION = '3.3.0'
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
@ -858,12 +896,14 @@ if (typeof jQuery === 'undefined') {
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.2.0
* Bootstrap: modal.js v3.3.0
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -894,7 +934,7 @@ if (typeof jQuery === 'undefined') {
}
}
Modal.VERSION = '3.2.0'
Modal.VERSION = '3.3.0'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@ -920,10 +960,11 @@ if (typeof jQuery === 'undefined') {
this.isShown = true
this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')
this.setScrollbar()
this.escape()
this.resize()
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
@ -938,6 +979,9 @@ if (typeof jQuery === 'undefined') {
.show()
.scrollTop(0)
if (that.options.backdrop) that.adjustBackdrop()
that.adjustDialog()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
@ -972,6 +1016,7 @@ if (typeof jQuery === 'undefined') {
this.isShown = false
this.escape()
this.resize()
$(document).off('focusin.bs.modal')
@ -1007,11 +1052,20 @@ if (typeof jQuery === 'undefined') {
}
}
Modal.prototype.resize = function () {
if (this.isShown) {
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
} else {
$(window).off('resize.bs.modal')
}
}
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
@ -1068,13 +1122,43 @@ if (typeof jQuery === 'undefined') {
}
}
// these following methods are used to handle overflowing modals
Modal.prototype.handleUpdate = function () {
if (this.options.backdrop) this.adjustBackdrop()
this.adjustDialog()
}
Modal.prototype.adjustBackdrop = function () {
this.$backdrop
.css('height', 0)
.css('height', this.$element[0].scrollHeight)
}
Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}
Modal.prototype.resetAdjustments = function () {
this.$element.css({
paddingLeft: '',
paddingRight: ''
})
}
Modal.prototype.checkScrollbar = function () {
this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
this.scrollbarWidth = this.measureScrollbar()
}
Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
}
Modal.prototype.resetScrollbar = function () {
@ -1082,7 +1166,6 @@ if (typeof jQuery === 'undefined') {
}
Modal.prototype.measureScrollbar = function () { // thx walsh
if (document.body.clientWidth >= window.innerWidth) return 0
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)
@ -1145,7 +1228,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tooltip.js v3.2.0
* Bootstrap: tooltip.js v3.3.0
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
@ -1171,7 +1254,7 @@ if (typeof jQuery === 'undefined') {
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.2.0'
Tooltip.VERSION = '3.3.0'
Tooltip.TRANSITION_DURATION = 150
@ -1624,7 +1707,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: popover.js v3.2.0
* Bootstrap: popover.js v3.3.0
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -1644,7 +1727,7 @@ if (typeof jQuery === 'undefined') {
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.2.0'
Popover.VERSION = '3.3.0'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
@ -1744,7 +1827,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: scrollspy.js v3.2.0
* Bootstrap: scrollspy.js v3.3.0
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -1775,7 +1858,7 @@ if (typeof jQuery === 'undefined') {
this.process()
}
ScrollSpy.VERSION = '3.2.0'
ScrollSpy.VERSION = '3.3.0'
ScrollSpy.DEFAULTS = {
offset: 10
@ -1920,7 +2003,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tab.js v3.2.0
* Bootstrap: tab.js v3.3.0
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -1938,7 +2021,7 @@ if (typeof jQuery === 'undefined') {
this.element = $(element)
}
Tab.VERSION = '3.2.0'
Tab.VERSION = '3.3.0'
Tab.TRANSITION_DURATION = 150
@ -2062,15 +2145,19 @@ if (typeof jQuery === 'undefined') {
// TAB DATA-API
// ============
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
})
}
$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);
/* ========================================================================
* Bootstrap: affix.js v3.2.0
* Bootstrap: affix.js v3.3.0
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -2099,7 +2186,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition()
}
Affix.VERSION = '3.2.0'
Affix.VERSION = '3.3.0'
Affix.RESET = 'affix affix-top affix-bottom'

File diff suppressed because one or more lines are too long

2
dist/js/npm.js vendored
View File

@ -1,4 +1,4 @@
// This file is generated. You can require() it in a CommonJS environment.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')

201
docs/_data/browser-bugs.yml Normal file
View File

@ -0,0 +1,201 @@
-
browser: >
Internet Explorer 11
summary: >
Hovered element still remains in `:hover` state after scrolling away.
upstream_bug: >
IE#926665
origin: >
Bootstrap#14211
-
browser: >
Internet Explorer 11
summary: >
When hovering over a `<select>` menu item, the cursor for the element underneath the menu is displayed.
upstream_bug: >
IE#963961
origin: >
Bootstrap#14528
-
browser: >
Firefox
summary: >
`.table-bordered` with an empty `<tbody>` is missing borders.
upstream_bug: >
Mozilla#1023761
origin: >
Bootstrap#13453
-
browser: >
Firefox
summary: >
`max-width: 100%;` doesn't work inside tables.
upstream_bug: >
Mozilla#975632
origin: >
Bootstrap#10690
-
browser: >
Firefox (Windows)
summary: >
Java applets that are descendants of elements with forced hardware acceleration using `translate3d(0,0,0)` are invisible.
upstream_bug: >
Mozilla#1048279
origin: >
Bootstrap#14124
-
browser: >
Firefox
summary: >
Button elements with `width: 100%` become cropped in long tables.
upstream_bug: >
Mozilla#1060131
origin: >
Bootstrap#14320
-
browser: >
Firefox
summary: >
If the disabled state of a form control is changed via JavaScript, the normal state doesn't return after refreshing the page.
upstream_bug: >
Mozilla#654072
origin: >
Bootstrap#793
-
browser: >
Chrome (OS X)
summary: >
Clicking above `<input type="number">` increment button flashes the decrement button.
upstream_bug: >
Chromium#419108
origin: >
Offshoot of Bootstrap#8350 & Chromium#337668
-
browser: >
Chrome
summary: >
`display: table;` within `display: block;` forces sibling content to new line.
upstream_bug: >
Chromium#309483
origin: >
Bootstrap#9950
-
browser: >
Chrome
summary: >
Incorrect viewport size used for media queries when printing.
upstream_bug: >
Chromium#273306
origin: >
Bootstrap#12078
-
browser: >
Safari (OS X)
summary: >
Scrollbar clipped in `select[multiple]` with padding.
upstream_bug: >
WebKit#128489
origin: >
Bootstrap#12536
-
browser: >
Chrome
summary: >
`display: table-cell; width: 100%;` doesn't work correctly on `<input type="date">`.
upstream_bug: >
Chromium#346051
origin: >
Bootstrap#12548
-
browser: >
Chrome
summary: >
`<input type="password">` sporadically causes bad widths on floated elements.
upstream_bug: >
Chromium#377346
origin: >
Bootstrap#13892
-
browser: >
Chrome
summary: >
CSS infinite linear animation with alpha transparency leaks memory.
upstream_bug: >
Chromium#429375
origin: >
Bootstrap#14409
-
browser: >
Safari (OS X)
summary: >
Weird button behavior with some `<input type="number">` elements.
upstream_bug: >
WebKit#137269
origin: >
Bootstrap#8350,
Normalize#283,
Chromium#337668
-
browser: >
Safari (OS X)
summary: >
`display: table-cell;` within media query renders incorrectly when resizing the window.
upstream_bug: >
WebKit#138167
origin: >
Bootstrap#9774
-
browser: >
Safari (iOS)
summary: >
`transform: translate3d(0,0,0);` rendering bug.
upstream_bug: >
WebKit#138162, Safari#18804973
origin: >
Bootstrap#14603
-
browser: >
Safari (OS X)
summary: >
Small font size when printing webpage with fixed-width `.container`.
upstream_bug: >
WebKit#138192
origin: >
Bootstrap#14868
-
browser: >
Safari (iOS)
summary: >
Text input's cursor doesn't move while scrolling the page.
upstream_bug: >
WebKit#138201, Safari#18819624
origin: >
Bootstrap#14708
-
browser: >
Chrome (Windows & Linux)
summary: >
Body content can be scrolled even though `overflow: hidden;` is applied to it.
upstream_bug: >
Chromium#429604
origin: >
Bootstrap#14972

View File

@ -1,7 +1,12 @@
- name: Red Antler
url: http://www.redantler.com/
expo_url: http://expo.getbootstrap.com/2014/02/24/redantler/
img: redantler
- name: Lyft
url: https://www.lyft.com
expo_url: http://expo.getbootstrap.com/2014/10/29/lyft/
img: lyft
- name: Vogue
url: http://www.vogue.com
expo_url: http://expo.getbootstrap.com/2014/09/30/vogue/
img: vogue
- name: Riot Design
url: http://riotdesign.eu/en/
@ -12,8 +17,3 @@
url: http://www.newsweek.com/
expo_url: http://expo.getbootstrap.com/2014/02/12/newsweek/
img: newsweek
- name: Robinhood
url: https://www.robinhood.com
expo_url: http://expo.getbootstrap.com/2014/02/26/robinhood/
img: robinhood

View File

@ -33,21 +33,31 @@
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
{% if jekyll.environment == "development" %}
<script src="{{ site.baseurl }}dist/js/bootstrap.min.js"></script>
{% if site.github %}
<script src="../dist/js/bootstrap.min.js"></script>
{% else %}
<script src="{{ site.baseurl }}dist/js/bootstrap.js"></script>
<script src="../dist/js/bootstrap.js"></script>
{% endif %}
{% if jekyll.environment == "development" %}
<script src="{{ site.baseurl }}assets/js/docs.min.js"></script>
{% if site.github %}
<script src="../assets/js/docs.min.js"></script>
{% else %}
<script src="{{ site.baseurl }}assets/js/vendor/holder.js"></script>
<script src="{{ site.baseurl }}assets/js/vendor/ZeroClipboard.min.js"></script>
<script src="{{ site.baseurl }}assets/js/src/application.js"></script>
{% for file in site.data.configBridge.paths.docsJs %}
<script src="{{ file }}"></script>
{% endfor %}
{% endif %}
{% if page.slug == "customize" %}
<script src="{{ site.baseurl }}assets/js/customize.min.js"></script>
<script>var __configBridge = {{ site.data.configBridge.config | jsonify }}</script>
{% if site.github %}
<script src="../assets/js/customize.min.js"></script>
{% else %}
{% for file in site.data.configBridge.paths.customizerJs %}
<script src="{{ file }}"></script>
{% endfor %}
{% endif %}
{% endif %}
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../assets/js/ie10-viewport-bug-workaround.js"></script>

View File

@ -2,5 +2,5 @@
<h1 id="tools" class="page-header">Tools</h1>
<h2 id="tools-bootlint">Bootlint</h2>
<p><strong><a href="https://github.com/twbs/bootlint">Bootlint</a></strong> is an official Bootstrap HTML <a href="http://en.wikipedia.org/wiki/Lint_(software)">linter</a> tool. It automatically checks for several common HTML mistakes in webpages that are using Bootstrap in a fairly "vanilla" way. Vanilla Bootstrap's components/widgets require their parts of the DOM to conform to certain structures. Bootlint checks that instances of Bootstrap components have correctly-structured HTML. Consider adding Bootlint to your Bootstrap web development toolchain so that none of the common mistakes slow down your project's development.</p>
<p><strong><a href="https://github.com/twbs/bootlint">Bootlint</a></strong> is the official Bootstrap HTML <a href="http://en.wikipedia.org/wiki/Lint_(software)">linter</a> tool. It automatically checks for several common HTML mistakes in webpages that are using Bootstrap in a fairly "vanilla" way. Vanilla Bootstrap's components/widgets require their parts of the DOM to conform to certain structures. Bootlint checks that instances of Bootstrap components have correctly-structured HTML. Consider adding Bootlint to your Bootstrap web development toolchain so that none of the common mistakes slow down your project's development.</p>
</div>

View File

@ -6,7 +6,7 @@
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<title>
{% if page.url == site.baseurl %}
{% if page.layout == "home" %}
{{ page.title }}
{% else %}
{{ page.title }} &middot; Bootstrap

View File

@ -0,0 +1,303 @@
<div class="bs-docs-section">
<h1 id="popovers" class="page-header">Popovers <small>popover.js</small></h1>
<h2 id="popovers-examples">Examples</h2>
<p>Add small overlays of content, like those on the iPad, to any element for housing secondary information.</p>
<p>Popovers whose both title and content are zero-length are never displayed.</p>
<div class="bs-callout bs-callout-danger">
<h4>Plugin dependency</h4>
<p>Popovers require the <a href="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p>
</div>
<div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>One way to initialize all popovers on a page would be to select them by their <code>data-toggle</code> attribute:</p>
{% highlight js %}
$(function () {
$('[data-toggle="popover"]').popover()
})
{% endhighlight %}
</div>
<div class="bs-callout bs-callout-warning">
<h4>Popovers in button groups and input groups require special setting</h4>
<p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p>
</div>
<div class="bs-callout bs-callout-warning">
<h4>Don't try to show popovers on hidden elements</h4>
<p>Invoking <code>$(...).popover('show')</code> when the target element is <code>display: none;</code> will cause the popover to be incorrectly positioned.</p>
</div>
<div class="bs-callout bs-callout-info">
<h4>Popovers on disabled elements require wrapper elements</h4>
<p>To add a popover to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code>&lt;div&gt;</code> and apply the popover to that <code>&lt;div&gt;</code> instead.</p>
</div>
<div class="bs-callout bs-callout-info">
<h4>Multiple-line links</h4>
<p>Sometimes you want to add a popover to a hyperlink that wraps multiple lines. The default behavior of the popover plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
</div>
<h3>Static popover</h3>
<p>Four options are available: top, right, bottom, and left aligned.</p>
<div class="bs-example bs-example-popover">
<div class="popover top">
<div class="arrow"></div>
<h3 class="popover-title">Popover top</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover right">
<div class="arrow"></div>
<h3 class="popover-title">Popover right</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover bottom">
<div class="arrow"></div>
<h3 class="popover-title">Popover bottom</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="popover left">
<div class="arrow"></div>
<h3 class="popover-title">Popover left</h3>
<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
</div>
<div class="clearfix"></div>
</div>
<h3>Live demo</h3>
<div class="bs-example" style="padding-bottom: 24px;">
<button type="button" class="btn btn-lg btn-danger bs-docs-popover" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
</div>
{% highlight html %}
<button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
{% endhighlight %}
<h4>Four directions</h4>
<div class="bs-example popover-demo">
<div class="bs-example-popovers">
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on left
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on top
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on bottom
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on right
</button>
</div>
</div><!-- /example -->
{% highlight html %}
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on left
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on top
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus
sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on bottom
</button>
<button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Popover on right
</button>
{% endhighlight %}
<h4>Dismiss on next click</h4>
<p>Use the <code>focus</code> trigger to dismiss popovers on the next click that the user makes.</p>
<div class="bs-callout bs-callout-danger">
<h4>Specific markup required for dismiss-on-next-click</h4>
<p>For proper cross-browser and cross-platform behavior, you must use the <code>&lt;a&gt;</code> tag, <i>not</i> the <code>&lt;button&gt;</code> tag, and you also must include a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#tabindex"><code>tabindex</code></a> attribute.</p>
</div>
<div class="bs-example" style="padding-bottom: 24px;">
<a href="#" tabindex="0" class="btn btn-lg btn-danger bs-docs-popover" role="button" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
</div>
{% highlight html %}
<a href="#" tabindex="0" class="btn btn-lg btn-danger" role="button" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
{% endhighlight %}
<h2 id="popovers-usage">Usage</h2>
<p>Enable popovers via JavaScript:</p>
{% highlight js %}$('#example').popover(options){% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">Type</th>
<th style="width: 50px;">Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>animation</td>
<td>boolean</td>
<td>true</td>
<td>Apply a CSS fade transition to the popover</td>
</tr>
<tr>
<td>container</td>
<td>string | false</td>
<td>false</td>
<td>
<p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element - which will prevent the popover from floating away from the triggering element during a window resize.</p>
</td>
</tr>
<tr>
<td>content</td>
<td>string | function</td>
<td>''</td>
<td>
<p>Default content value if <code>data-content</code> attribute isn't present.</p>
<p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
</td>
</tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { "show": 500, "hide": 100 }</code></p>
</td>
</tr>
<tr>
<td>html</td>
<td>boolean</td>
<td>false</td>
<td>Insert HTML into the popover. If false, jQuery's <code>text</code> method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td>
</tr>
<tr>
<td>placement</td>
<td>string | function</td>
<td>'right'</td>
<td>
<p>How to position the popover - top | bottom | left | right | auto.<br>When "auto" is specified, it will dynamically reorient the popover. For example, if placement is "auto left", the popover will display to the left when possible, otherwise it will display right.</p>
<p>When a function is used to determine the placement, it is called with the popover DOM node as its first argument and the triggering element DOM node as its second. The <code>this</code> context is set to the popover instance.</p>
</td>
</tr>
<tr>
<td>selector</td>
<td>string</td>
<td>false</td>
<td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsbin.com/zopod/1/edit">an informative example</a>.</td>
</tr>
<tr>
<td>template</td>
<td>string</td>
<td><code>'&lt;div class="popover" role="tooltip"&gt;&lt;div class="arrow"&gt;&lt;/div&gt;&lt;h3 class="popover-title"&gt;&lt;/h3&gt;&lt;div class="popover-content"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
<td>
<p>Base HTML to use when creating the popover.</p>
<p>The popover's <code>title</code> will be injected into the <code>.popover-title</code>.</p>
<p>The popover's <code>content</code> will be injected into the <code>.popover-content</code>.</p>
<p><code>.arrow</code> will become the popover's arrow.</p>
<p>The outermost wrapper element should have the <code>.popover</code> class.</p>
</td>
</tr>
<tr>
<td>title</td>
<td>string | function</td>
<td>''</td>
<td>
<p>Default title value if <code>title</code> attribute isn't present.</p>
<p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'click'</td>
<td>How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
</tr>
<tr>
<td>viewport</td>
<td>string | object</td>
<td>{ selector: 'body', padding: 0 }</td>
<td>
<p>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
</td>
</tr>
</tbody>
</table>
</div><!-- /.table-responsive -->
<div class="bs-callout bs-callout-info">
<h4>Data attributes for individual popovers</h4>
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
</div>
<h3>Methods</h3>
<h4>$().popover(options)</h4>
<p>Initializes popovers for an element collection.</p>
<h4>.popover('show')</h4>
<p>Reveals an element's popover. Popovers whose both title and content are zero-length are never displayed.</p>
{% highlight js %}$('#element').popover('show'){% endhighlight %}
<h4>.popover('hide')</h4>
<p>Hides an element's popover.</p>
{% highlight js %}$('#element').popover('hide'){% endhighlight %}
<h4>.popover('toggle')</h4>
<p>Toggles an element's popover.</p>
{% highlight js %}$('#element').popover('toggle'){% endhighlight %}
<h4>.popover('destroy')</h4>
<p>Hides and destroys an element's popover.</p>
{% highlight js %}$('#element').popover('destroy'){% endhighlight %}
<h3>Events</h3>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 150px;">Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>show.bs.popover</td>
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
</tr>
<tr>
<td>shown.bs.popover</td>
<td>This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).</td>
</tr>
<tr>
<td>hide.bs.popover</td>
<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
</tr>
<tr>
<td>hidden.bs.popover</td>
<td>This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).</td>
</tr>
</tbody>
</table>
</div><!-- /.table-responsive -->
{% highlight js %}
$('#myPopover').on('hidden.bs.popover', function () {
// do something…
})
{% endhighlight %}
</div>

View File

@ -0,0 +1,266 @@
<div class="bs-docs-section">
<h1 id="tooltips" class="page-header">Tooltips <small>tooltip.js</small></h1>
<p>Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.</p>
<p>Tooltips with zero-length titles are never displayed.</p>
<h2 id="tooltips-examples">Examples</h2>
<p>Hover over the links below to see tooltips:</p>
<div class="bs-example tooltip-demo">
<p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
</p>
</div><!-- /example -->
<h3>Static tooltip</h3>
<p>Four options are available: top, right, bottom, and left aligned.</p>
<div class="bs-example bs-example-tooltip">
<div class="tooltip left" role="tooltip">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">
Tooltip on the left
</div>
</div>
<div class="tooltip top" role="tooltip">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">
Tooltip on the top
</div>
</div>
<div class="tooltip bottom" role="tooltip">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">
Tooltip on the bottom
</div>
</div>
<div class="tooltip right" role="tooltip">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">
Tooltip on the right
</div>
</div>
</div>
<h3>Four directions</h3>
<div class="bs-example tooltip-demo">
<div class="bs-example-tooltips">
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button>
</div>
</div><!-- /example -->
{% highlight html %}
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button>
{% endhighlight %}
<div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>One way to initialize all tooltips on a page would be to select them by their <code>data-toggle</code> attribute:</p>
{% highlight js %}
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
{% endhighlight %}
</div>
<div class="bs-callout bs-callout-warning">
<h4>Tooltips in button groups and input groups require special setting</h4>
<p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p>
</div>
<div class="bs-callout bs-callout-warning">
<h4>Don't try to show tooltips on hidden elements</h4>
<p>Invoking <code>$(...).tooltip('show')</code> when the target element is <code>display: none;</code> will cause the tooltip to be incorrectly positioned.</p>
</div>
<div class="bs-callout bs-callout-info">
<h4>Tooltips on disabled elements require wrapper elements</h4>
<p>To add a tooltip to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code>&lt;div&gt;</code> and apply the tooltip to that <code>&lt;div&gt;</code> instead.</p>
</div>
<h2 id="tooltips-usage">Usage</h2>
<p>The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element.</p>
<p>Trigger the tooltip via JavaScript:</p>
{% highlight js %}
$('#example').tooltip(options)
{% endhighlight %}
<h3>Markup</h3>
<p>The required markup for a tooltip is only a <code>data</code> attribute and <code>title</code> on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to <code>top</code> by the plugin).</p>
<div class="bs-callout bs-callout-warning">
<h4>Multiple-line links</h4>
<p>Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
</div>
{% highlight html %}
<!-- HTML to write -->
<a href="#" data-toggle="tooltip" title="Some tooltip text!">Hover over me</a>
<!-- Generated markup by the plugin -->
<div class="tooltip top" role="tooltip">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">
Some tooltip text!
</div>
</div>
{% endhighlight %}
<h3>Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 100px;">Name</th>
<th style="width: 100px;">Type</th>
<th style="width: 50px;">Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>animation</td>
<td>boolean</td>
<td>true</td>
<td>Apply a CSS fade transition to the tooltip</td>
</tr>
<tr>
<td>container</td>
<td>string | false</td>
<td>false</td>
<td>
<p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.</p>
</td>
</tr>
<tr>
<td>delay</td>
<td>number | object</td>
<td>0</td>
<td>
<p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
<p>If a number is supplied, delay is applied to both hide/show</p>
<p>Object structure is: <code>delay: { "show": 500, "hide": 100 }</code></p>
</td>
</tr>
<tr>
<td>html</td>
<td>boolean</td>
<td>false</td>
<td>Insert HTML into the tooltip. If false, jQuery's <code>text</code> method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td>
</tr>
<tr>
<td>placement</td>
<td>string | function</td>
<td>'top'</td>
<td>
<p>How to position the tooltip - top | bottom | left | right | auto.<br>When "auto" is specified, it will dynamically reorient the tooltip. For example, if placement is "auto left", the tooltip will display to the left when possible, otherwise it will display right.</p>
<p>When a function is used to determine the placement, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The <code>this</code> context is set to the tooltip instance.</p>
</td>
</tr>
<tr>
<td>selector</td>
<td>string</td>
<td>false</td>
<td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have tooltips added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsbin.com/zopod/1/edit">an informative example</a>.</td>
</tr>
<tr>
<td>template</td>
<td>string</td>
<td><code>'&lt;div class="tooltip" role="tooltip"&gt;&lt;div class="tooltip-arrow"&gt;&lt;/div&gt;&lt;div class="tooltip-inner"&gt;&lt;/div&gt;&lt;/div&gt;'</code></td>
<td>
<p>Base HTML to use when creating the tooltip.</p>
<p>The tooltip's <code>title</code> will be injected into the <code>.tooltip-inner</code>.</p>
<p><code>.tooltip-arrow</code> will become the tooltip's arrow.</p>
<p>The outermost wrapper element should have the <code>.tooltip</code> class.</p>
</td>
</tr>
<tr>
<td>title</td>
<td>string | function</td>
<td>''</td>
<td>
<p>Default title value if <code>title</code> attribute isn't present.</p>
<p>If a function is given, it will be called with its <code>this</code> reference set to the element that the tooltip is attached to.</p>
</td>
</tr>
<tr>
<td>trigger</td>
<td>string</td>
<td>'hover focus'</td>
<td>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
</tr>
<tr>
<td>viewport</td>
<td>string | object</td>
<td>{ selector: 'body', padding: 0 }</td>
<td>
<p>Keeps the tooltip within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
</td>
</tr>
</tbody>
</table>
</div><!-- /.table-responsive -->
<div class="bs-callout bs-callout-info">
<h4>Data attributes for individual tooltips</h4>
<p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p>
</div>
<h3>Methods</h3>
<h4>$().tooltip(options)</h4>
<p>Attaches a tooltip handler to an element collection.</p>
<h4>.tooltip('show')</h4>
<p>Reveals an element's tooltip. Tooltips with zero-length titles are never displayed.</p>
{% highlight js %}$('#element').tooltip('show'){% endhighlight %}
<h4>.tooltip('hide')</h4>
<p>Hides an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('hide'){% endhighlight %}
<h4>.tooltip('toggle')</h4>
<p>Toggles an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('toggle'){% endhighlight %}
<h4>.tooltip('destroy')</h4>
<p>Hides and destroys an element's tooltip.</p>
{% highlight js %}$('#element').tooltip('destroy'){% endhighlight %}
<h3>Events</h3>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width: 150px;">Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>show.bs.tooltip</td>
<td>This event fires immediately when the <code>show</code> instance method is called.</td>
</tr>
<tr>
<td>shown.bs.tooltip</td>
<td>This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).</td>
</tr>
<tr>
<td>hide.bs.tooltip</td>
<td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
</tr>
<tr>
<td>hidden.bs.tooltip</td>
<td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td>
</tr>
</tbody>
</table>
</div><!-- /.table-responsive -->
{% highlight js %}
$('#myTooltip').on('hidden.bs.tooltip', function () {
// do something…
})
{% endhighlight %}
</div>

View File

@ -8,8 +8,10 @@ each section in sections
if subsection.heading
h3(id=subsection.id)= subsection.heading
div.row
each variable in subsection.variables
div.bs-customizer-input
each variable, index in subsection.variables
if index > 0 && index % 3 === 0
div.clearfix
div.col-xs-4
label(for="input-" + variable.name)= variable.name
input.form-control(
id="input-" + variable.name

9
docs/_plugins/bridge.rb Normal file
View File

@ -0,0 +1,9 @@
require 'yaml'
module Bridge
class Generator < Jekyll::Generator
def generate(site)
site.data["configBridge"] = YAML.load_file("./grunt/configBridge.json")
end
end
end

25
docs/_plugins/bugify.rb Normal file
View File

@ -0,0 +1,25 @@
module Jekyll
module BugFilter
def bugify(input)
upstream_map = {
"Bootstrap" => "https://github.com/twbs/bootstrap/issues/",
"IE" => ["https://connect.microsoft.com/IE/feedback/details/", "IE bug"],
"Mozilla" => ["https://bugzilla.mozilla.org/show_bug.cgi?id=", "Mozilla bug"],
"Chromium" => ["https://code.google.com/p/chromium/issues/detail?id=", "Chromium issue"],
"WebKit" => ["https://bugs.webkit.org/show_bug.cgi?id=", "WebKit bug"],
"Safari" => ["https://openradar.appspot.com/", "Apple Safari Radar"],
"Normalize" => ["https://github.com/necolas/normalize.css/issues/", "Normalize"]
}
upstream_map.each do |key, data|
url = data.is_a?(Array) ? data[0] : data
label = data.is_a?(Array) ? "#{data[1]} " : ""
input = input.gsub(/#{key}#(\d+)/, "<a href=\"#{url}\\1\">#{label}#\\1</a>")
end
return input
end
end
end
Liquid::Template.register_filter(Jekyll::BugFilter)

1553
docs/assets/css/src/docs.css Normal file
View File

@ -0,0 +1,1553 @@
/*!
* Bootstrap Docs (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
/*
* Bootstrap Documentation
* Special styles for presenting Bootstrap's documentation and code examples.
*/
/*
* Scaffolding
*
* Update the basics of our documents to prep for docs content.
*/
body {
position: relative; /* For scrollspy */
}
/* Keep code small in tables on account of limited space */
.table code {
font-size: 13px;
font-weight: normal;
}
/* Outline button for use within the docs */
.btn-outline {
color: #563d7c;
background-color: transparent;
border-color: #563d7c;
}
.btn-outline:hover,
.btn-outline:focus,
.btn-outline:active {
color: #fff;
background-color: #563d7c;
border-color: #563d7c;
}
/* Inverted outline button (white on dark) */
.btn-outline-inverse {
color: #fff;
background-color: transparent;
border-color: #cdbfe3;
}
.btn-outline-inverse:hover,
.btn-outline-inverse:focus,
.btn-outline-inverse:active {
color: #563d7c;
text-shadow: none;
background-color: #fff;
border-color: #fff;
}
/* Bootstrap "B" icon */
.bs-docs-booticon {
display: block;
font-weight: 500;
color: #fff;
text-align: center;
cursor: default;
background-color: #563d7c;
border-radius: 15%;
}
.bs-docs-booticon-sm {
width: 30px;
height: 30px;
font-size: 20px;
line-height: 28px;
}
.bs-docs-booticon-lg {
width: 144px;
height: 144px;
font-size: 108px;
line-height: 140px;
}
.bs-docs-booticon-inverse {
color: #563d7c;
background-color: #fff;
}
.bs-docs-booticon-outline {
background-color: transparent;
border: 1px solid #cdbfe3;
}
/*
* Main navigation
*
* Turn the `.navbar` at the top of the docs purple.
*/
.bs-docs-nav {
margin-bottom: 0;
background-color: #fff;
border-bottom: 0;
}
.bs-home-nav .bs-nav-b {
display: none;
}
.bs-docs-nav .navbar-brand,
.bs-docs-nav .navbar-nav > li > a {
font-weight: 500;
color: #563d7c;
}
.bs-docs-nav .navbar-nav > li > a:hover,
.bs-docs-nav .navbar-nav > .active > a,
.bs-docs-nav .navbar-nav > .active > a:hover {
color: #463265;
background-color: #f9f9f9;
}
.bs-docs-nav .navbar-toggle .icon-bar {
background-color: #563d7c;
}
.bs-docs-nav .navbar-header .navbar-toggle {
border-color: #fff;
}
.bs-docs-nav .navbar-header .navbar-toggle:hover,
.bs-docs-nav .navbar-header .navbar-toggle:focus {
background-color: #f9f9f9;
border-color: #f9f9f9;
}
/*
* Footer
*
* Separated section of content at the bottom of all pages, save the homepage.
*/
.bs-docs-footer {
padding-top: 40px;
padding-bottom: 40px;
margin-top: 100px;
color: #777;
text-align: center;
border-top: 1px solid #e5e5e5;
}
.bs-docs-footer-links {
padding-left: 0;
margin-top: 20px;
color: #999;
}
.bs-docs-footer-links li {
display: inline;
padding: 0 2px;
}
.bs-docs-footer-links li:first-child {
padding-left: 0;
}
@media (min-width: 768px) {
.bs-docs-footer p {
margin-bottom: 0;
}
}
/*
* Social buttons
*
* Twitter and GitHub social action buttons (for homepage and footer).
*/
.bs-docs-social {
margin-bottom: 20px;
text-align: center;
}
.bs-docs-social-buttons {
display: inline-block;
padding-left: 0;
margin-bottom: 0;
list-style: none;
}
.bs-docs-social-buttons li {
display: inline-block;
padding: 5px 8px;
line-height: 1;
}
.bs-docs-social-buttons .twitter-follow-button {
width: 225px !important;
}
.bs-docs-social-buttons .twitter-share-button {
width: 98px !important;
}
/* Style the GitHub buttons via CSS instead of inline attributes */
.github-btn {
overflow: hidden;
border: 0;
}
/*
* Homepage
*
* Tweaks to the custom homepage and the masthead (main jumbotron).
*/
/* Share masthead with page headers */
.bs-docs-masthead,
.bs-docs-header {
position: relative;
padding: 30px 15px;
color: #cdbfe3;
text-align: center;
text-shadow: 0 1px 0 rgba(0,0,0,.1);
background-color: #6f5499;
background-image: -webkit-gradient(linear, left top, left bottom, from(#563d7c), to(#6f5499));
background-image: -webkit-linear-gradient(top, #563d7c 0%, #6f5499 100%);
background-image: -o-linear-gradient(top, #563d7c 0%, #6f5499 100%);
background-image: linear-gradient(to bottom, #563d7c 0%, #6f5499 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#563d7c', endColorstr='#6F5499', GradientType=0);
background-repeat: repeat-x;
}
/* Masthead (headings and download button) */
.bs-docs-masthead .bs-docs-booticon {
margin: 0 auto 30px;
}
.bs-docs-masthead h1 {
font-weight: 300;
line-height: 1;
color: #fff;
}
.bs-docs-masthead .lead {
margin: 0 auto 30px;
font-size: 20px;
color: #fff;
}
.bs-docs-masthead .version {
margin-top: -15px;
margin-bottom: 30px;
color: #9783b9;
}
.bs-docs-masthead .btn {
width: 100%;
padding: 15px 30px;
font-size: 20px;
}
@media (min-width: 480px) {
.bs-docs-masthead .btn {
width: auto;
}
}
@media (min-width: 768px) {
.bs-docs-masthead {
padding: 80px 0;
}
.bs-docs-masthead h1 {
font-size: 60px;
}
.bs-docs-masthead .lead {
font-size: 24px;
}
}
@media (min-width: 992px) {
.bs-docs-masthead .lead {
width: 80%;
font-size: 30px;
}
}
/*
* Page headers
*
* Jumbotron-esque headers at the top of every page that's not the homepage.
*/
/* Page headers */
.bs-docs-header {
margin-bottom: 40px;
font-size: 20px;
}
.bs-docs-header h1 {
margin-top: 0;
color: #fff;
}
.bs-docs-header p {
margin-bottom: 0;
font-weight: 300;
line-height: 1.4;
}
.bs-docs-header .container {
position: relative;
}
@media (min-width: 768px) {
.bs-docs-header {
padding-top: 60px;
padding-bottom: 60px;
font-size: 24px;
text-align: left;
}
.bs-docs-header h1 {
font-size: 60px;
line-height: 1;
}
}
@media (min-width: 992px) {
.bs-docs-header h1,
.bs-docs-header p {
margin-right: 380px;
}
}
/*
* Carbon ads
*
* Single display ad that shows on all pages (except homepage) in page headers.
* The hella `!important` is required for any pre-set property.
*/
.carbonad {
width: auto !important;
height: auto !important;
padding: 20px !important;
margin: 30px -30px -31px !important;
overflow: hidden; /* clearfix */
font-size: 13px !important;
line-height: 16px !important;
text-align: left;
background: transparent !important;
border: solid #866ab3 !important;
border-width: 1px 0 !important;
}
.carbonad-img {
margin: 0 !important;
}
.carbonad-text,
.carbonad-tag {
display: block !important;
float: none !important;
width: auto !important;
height: auto !important;
margin-left: 145px !important;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}
.carbonad-text {
padding-top: 0 !important;
}
.carbonad-tag {
color: inherit !important;
text-align: left !important;
}
.carbonad-text a,
.carbonad-tag a {
color: #fff !important;
}
.carbonad #azcarbon > img {
display: none; /* hide what I assume are tracking images */
}
@media (min-width: 480px) {
.carbonad {
width: 330px !important;
margin: 20px auto !important;
border-width: 1px !important;
border-radius: 4px;
}
.bs-docs-masthead .carbonad {
margin: 50px auto 0 !important;
}
}
@media (min-width: 768px) {
.carbonad {
margin-right: 0 !important;
margin-left: 0 !important;
}
}
@media (min-width: 992px) {
.carbonad {
position: absolute;
top: 0;
right: 15px; /* 15px instead of 0 since box-sizing */
width: 330px !important;
padding: 15px !important;
margin: 0 !important;
}
.bs-docs-masthead .carbonad {
position: static;
}
}
/*
* Homepage featurettes
*
* Reasons to use Bootstrap, entries from the Expo, and more.
*/
.bs-docs-featurette {
padding-top: 40px;
padding-bottom: 40px;
font-size: 16px;
line-height: 1.5;
color: #555;
text-align: center;
background-color: #fff;
border-bottom: 1px solid #e5e5e5;
}
.bs-docs-featurette + .bs-docs-footer {
margin-top: 0;
border-top: 0;
}
.bs-docs-featurette-title {
margin-bottom: 5px;
font-size: 30px;
font-weight: normal;
color: #333;
}
.half-rule {
width: 100px;
margin: 40px auto;
}
.bs-docs-featurette h3 {
margin-bottom: 5px;
font-weight: normal;
color: #333;
}
.bs-docs-featurette-img {
display: block;
margin-bottom: 20px;
color: #333;
}
.bs-docs-featurette-img:hover {
color: #428bca;
text-decoration: none;
}
.bs-docs-featurette-img img {
display: block;
margin-bottom: 15px;
}
@media (min-width: 480px) {
.bs-docs-featurette .img-responsive {
margin-top: 30px;
}
}
@media (min-width: 768px) {
.bs-docs-featurette {
padding-top: 100px;
padding-bottom: 100px;
}
.bs-docs-featurette-title {
font-size: 40px;
}
.bs-docs-featurette .lead {
max-width: 80%;
margin-right: auto;
margin-left: auto;
}
.bs-docs-featurette .img-responsive {
margin-top: 0;
}
}
/*
* Featured sites
*
* Homepage thumbnails from the Expo.
*/
.bs-docs-featured-sites {
margin-right: -1px;
margin-left: -1px;
}
.bs-docs-featured-sites .col-xs-6 {
padding: 1px;
}
.bs-docs-featured-sites .img-responsive {
margin-top: 0;
}
@media (min-width: 768px) {
.bs-docs-featured-sites .col-sm-3:first-child img {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.bs-docs-featured-sites .col-sm-3:last-child img {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
}
/*
* Examples
*
* Linked docs examples.
*/
.bs-examples .thumbnail {
margin-bottom: 10px;
}
.bs-examples h4 {
margin-bottom: 5px;
}
.bs-examples p {
margin-bottom: 20px;
}
@media (max-width: 480px) {
.bs-examples {
margin-right: -10px;
margin-left: -10px;
}
.bs-examples > [class^="col-"] {
padding-right: 10px;
padding-left: 10px;
}
}
/*
* Side navigation
*
* Scrollspy and affixed enhanced navigation to highlight sections and secondary
* sections of docs content.
*/
/* By default it's not affixed in mobile views, so undo that */
.bs-docs-sidebar.affix {
position: static;
}
@media (min-width: 768px) {
.bs-docs-sidebar {
padding-left: 20px;
}
}
/* First level of nav */
.bs-docs-sidenav {
margin-top: 20px;
margin-bottom: 20px;
}
/* All levels of nav */
.bs-docs-sidebar .nav > li > a {
display: block;
padding: 4px 20px;
font-size: 13px;
font-weight: 500;
color: #999;
}
.bs-docs-sidebar .nav > li > a:hover,
.bs-docs-sidebar .nav > li > a:focus {
padding-left: 19px;
color: #563d7c;
text-decoration: none;
background-color: transparent;
border-left: 1px solid #563d7c;
}
.bs-docs-sidebar .nav > .active > a,
.bs-docs-sidebar .nav > .active:hover > a,
.bs-docs-sidebar .nav > .active:focus > a {
padding-left: 18px;
font-weight: bold;
color: #563d7c;
background-color: transparent;
border-left: 2px solid #563d7c;
}
/* Nav: second level (shown on .active) */
.bs-docs-sidebar .nav .nav {
display: none; /* Hide by default, but at >768px, show it */
padding-bottom: 10px;
}
.bs-docs-sidebar .nav .nav > li > a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 30px;
font-size: 12px;
font-weight: normal;
}
.bs-docs-sidebar .nav .nav > li > a:hover,
.bs-docs-sidebar .nav .nav > li > a:focus {
padding-left: 29px;
}
.bs-docs-sidebar .nav .nav > .active > a,
.bs-docs-sidebar .nav .nav > .active:hover > a,
.bs-docs-sidebar .nav .nav > .active:focus > a {
padding-left: 28px;
font-weight: 500;
}
/* Back to top (hidden on mobile) */
.back-to-top,
.bs-docs-theme-toggle {
display: none;
padding: 4px 10px;
margin-top: 10px;
margin-left: 10px;
font-size: 12px;
font-weight: 500;
color: #999;
}
.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,
.bs-docs-theme-toggle {
display: block;
}
}
/* Show and affix the side nav when space allows it */
@media (min-width: 992px) {
.bs-docs-sidebar .nav > .active > ul {
display: block;
}
/* Widen the fixed sidebar */
.bs-docs-sidebar.affix,
.bs-docs-sidebar.affix-bottom {
width: 213px;
}
.bs-docs-sidebar.affix {
position: fixed; /* Undo the static from mobile first approach */
top: 20px;
}
.bs-docs-sidebar.affix-bottom {
position: absolute; /* Undo the static from mobile first approach */
}
.bs-docs-sidebar.affix-bottom .bs-docs-sidenav,
.bs-docs-sidebar.affix .bs-docs-sidenav {
margin-top: 0;
margin-bottom: 0;
}
}
@media (min-width: 1200px) {
/* Widen the fixed sidebar again */
.bs-docs-sidebar.affix-bottom,
.bs-docs-sidebar.affix {
width: 263px;
}
}
/*
* Docs sections
*
* Content blocks for each component or feature.
*/
/* Space things out */
.bs-docs-section {
margin-bottom: 60px;
}
.bs-docs-section:last-child {
margin-bottom: 0;
}
h1[id] {
padding-top: 20px;
margin-top: 0;
}
/*
* Callouts
*
* Not quite alerts, but custom and helpful notes for folks reading the docs.
* Requires a base and modifier class.
*/
/* Common styles for all types */
.bs-callout {
padding: 20px;
margin: 20px 0;
border: 1px solid #eee;
border-left-width: 5px;
border-radius: 3px;
}
.bs-callout h4 {
margin-top: 0;
margin-bottom: 5px;
}
.bs-callout p:last-child {
margin-bottom: 0;
}
.bs-callout code {
border-radius: 3px;
}
/* Tighten up space between multiple callouts */
.bs-callout + .bs-callout {
margin-top: -5px;
}
/* Variations */
.bs-callout-danger {
border-left-color: #d9534f;
}
.bs-callout-danger h4 {
color: #d9534f;
}
.bs-callout-warning {
border-left-color: #f0ad4e;
}
.bs-callout-warning h4 {
color: #f0ad4e;
}
.bs-callout-info {
border-left-color: #5bc0de;
}
.bs-callout-info h4 {
color: #5bc0de;
}
/*
* Color swatches
*
* Color swatches and associated values for our grayscale and brand colors.
*/
.color-swatches {
margin: 0 -5px;
overflow: hidden; /* clearfix */
}
.color-swatch {
float: left;
width: 60px;
height: 60px;
margin: 0 5px;
border-radius: 3px;
}
@media (min-width: 768px) {
.color-swatch {
width: 100px;
height: 100px;
}
}
/* Framework colors */
.color-swatches .gray-darker {
background-color: #222;
}
.color-swatches .gray-dark {
background-color: #333;
}
.color-swatches .gray {
background-color: #555;
}
.color-swatches .gray-light {
background-color: #999;
}
.color-swatches .gray-lighter {
background-color: #eee;
}
.color-swatches .brand-primary {
background-color: #428bca;
}
.color-swatches .brand-success {
background-color: #5cb85c;
}
.color-swatches .brand-warning {
background-color: #f0ad4e;
}
.color-swatches .brand-danger {
background-color: #d9534f;
}
.color-swatches .brand-info {
background-color: #5bc0de;
}
/* Docs colors */
.color-swatches .bs-purple {
background-color: #563d7c;
}
.color-swatches .bs-purple-light {
background-color: #c7bfd3;
}
.color-swatches .bs-purple-lighter {
background-color: #e5e1ea;
}
.color-swatches .bs-gray {
background-color: #f9f9f9;
}
/*
* Team members
*
* Avatars, names, and usernames for core team.
*/
.bs-team .team-member {
line-height: 32px;
color: #555;
}
.bs-team .team-member:hover {
color: #333;
text-decoration: none;
}
.bs-team .github-btn {
float: right;
width: 180px;
height: 20px;
margin-top: 6px;
}
.bs-team img {
float: left;
width: 32px;
margin-right: 10px;
border-radius: 4px;
}
/*
* Wall of Browser Bugs
*
* Better display for the responsive table on the Wall of Browser Bugs.
*/
.bs-docs-browser-bugs td p {
margin-bottom: 0;
}
.bs-docs-browser-bugs th:first-child {
width: 18%;
}
/*
* Grid examples
*
* Highlight the grid columns within the docs so folks can see their padding,
* alignment, sizing, etc.
*/
.show-grid {
margin-bottom: 15px;
}
.show-grid [class^="col-"] {
padding-top: 10px;
padding-bottom: 10px;
background-color: #eee;
background-color: rgba(86,61,124,.15);
border: 1px solid #ddd;
border: 1px solid rgba(86,61,124,.2);
}
/*
* Examples
*
* Isolated sections of example content for each component or feature. Usually
* followed by a code snippet.
*/
.bs-example {
position: relative;
padding: 45px 15px 15px;
margin: 0 -15px 15px;
border-color: #e5e5e5 #eee #eee;
border-style: solid;
border-width: 1px 0;
-webkit-box-shadow: inset 0 3px 6px rgba(0,0,0,.05);
box-shadow: inset 0 3px 6px rgba(0,0,0,.05);
}
/* Echo out a label for the example */
.bs-example:after {
position: absolute;
top: 15px;
left: 15px;
font-size: 12px;
font-weight: bold;
color: #959595;
text-transform: uppercase;
letter-spacing: 1px;
content: "Example";
}
/* Tweak display of the code snippets when following an example */
.bs-example + .highlight,
.bs-example + .zero-clipboard + .highlight {
margin: -15px -15px 15px;
border-width: 0 0 1px;
border-radius: 0;
}
/* Make the examples and snippets not full-width */
@media (min-width: 768px) {
.bs-example {
margin-right: 0;
margin-left: 0;
background-color: #fff;
border-color: #ddd;
border-width: 1px;
border-radius: 4px 4px 0 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.bs-example + .highlight,
.bs-example + .zero-clipboard + .highlight {
margin-top: -16px;
margin-right: 0;
margin-left: 0;
border-width: 1px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.bs-example-standalone {
border-radius: 4px;
}
}
/* Undo width of container */
.bs-example .container {
width: auto;
}
/* Tweak content of examples for optimum awesome */
.bs-example > p:last-child,
.bs-example > ul:last-child,
.bs-example > ol:last-child,
.bs-example > blockquote:last-child,
.bs-example > .form-control:last-child,
.bs-example > .table:last-child,
.bs-example > .navbar:last-child,
.bs-example > .jumbotron:last-child,
.bs-example > .alert:last-child,
.bs-example > .panel:last-child,
.bs-example > .list-group:last-child,
.bs-example > .well:last-child,
.bs-example > .progress:last-child,
.bs-example > .table-responsive:last-child > .table {
margin-bottom: 0;
}
.bs-example > p > .close {
float: none;
}
/* Typography */
.bs-example-type .table .type-info {
color: #999;
vertical-align: middle;
}
.bs-example-type .table td {
padding: 15px 0;
border-color: #eee;
}
.bs-example-type .table tr:first-child td {
border-top: 0;
}
.bs-example-type h1,
.bs-example-type h2,
.bs-example-type h3,
.bs-example-type h4,
.bs-example-type h5,
.bs-example-type h6 {
margin: 0;
}
/* Contextual background colors */
.bs-example-bg-classes p {
padding: 15px;
}
/* Images */
.bs-example > .img-circle,
.bs-example > .img-rounded,
.bs-example > .img-thumbnail {
margin: 5px;
}
/* Tables */
.bs-example > .table-responsive > .table {
background-color: #fff;
}
/* Buttons */
.bs-example > .btn,
.bs-example > .btn-group {
margin-top: 5px;
margin-bottom: 5px;
}
.bs-example > .btn-toolbar + .btn-toolbar {
margin-top: 10px;
}
/* Forms */
.bs-example-control-sizing select,
.bs-example-control-sizing input[type="text"] + input[type="text"] {
margin-top: 10px;
}
.bs-example-form .input-group {
margin-bottom: 10px;
}
.bs-example > textarea.form-control {
resize: vertical;
}
/* List groups */
.bs-example > .list-group {
max-width: 400px;
}
/* Navbars */
.bs-example .navbar:last-child {
margin-bottom: 0;
}
.bs-navbar-top-example,
.bs-navbar-bottom-example {
z-index: 1;
padding: 0;
overflow: hidden; /* cut the drop shadows off */
}
.bs-navbar-top-example .navbar-header,
.bs-navbar-bottom-example .navbar-header {
margin-left: 0;
}
.bs-navbar-top-example .navbar-fixed-top,
.bs-navbar-bottom-example .navbar-fixed-bottom {
position: relative;
margin-right: 0;
margin-left: 0;
}
.bs-navbar-top-example {
padding-bottom: 45px;
}
.bs-navbar-top-example:after {
top: auto;
bottom: 15px;
}
.bs-navbar-top-example .navbar-fixed-top {
top: -1px;
}
.bs-navbar-bottom-example {
padding-top: 45px;
}
.bs-navbar-bottom-example .navbar-fixed-bottom {
bottom: -1px;
}
.bs-navbar-bottom-example .navbar {
margin-bottom: 0;
}
@media (min-width: 768px) {
.bs-navbar-top-example .navbar-fixed-top,
.bs-navbar-bottom-example .navbar-fixed-bottom {
position: absolute;
}
}
/* Pagination */
.bs-example .pagination {
margin-top: 10px;
margin-bottom: 10px;
}
/* Pager */
.bs-example > .pager {
margin-top: 0;
}
/* Example modals */
.bs-example-modal {
background-color: #f5f5f5;
}
.bs-example-modal .modal {
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
z-index: 1;
display: block;
}
.bs-example-modal .modal-dialog {
left: auto;
margin-right: auto;
margin-left: auto;
}
/* Example dropdowns */
.bs-example > .dropdown > .dropdown-toggle {
float: left;
}
.bs-example > .dropdown > .dropdown-menu {
position: static;
display: block;
margin-bottom: 5px;
clear: left;
}
/* Example tabbable tabs */
.bs-example-tabs .nav-tabs {
margin-bottom: 15px;
}
/* Tooltips */
.bs-example-tooltips {
text-align: center;
}
.bs-example-tooltips > .btn {
margin-top: 5px;
margin-bottom: 5px;
}
.bs-example-tooltip .tooltip {
position: relative;
display: inline-block;
margin: 10px 20px;
opacity: 1;
}
/* Popovers */
.bs-example-popover {
padding-bottom: 24px;
background-color: #f9f9f9;
}
.bs-example-popover .popover {
position: relative;
display: block;
float: left;
width: 260px;
margin: 20px;
}
/* Scrollspy demo on fixed height div */
.scrollspy-example {
position: relative;
height: 200px;
margin-top: 10px;
overflow: auto;
}
/*
* Code snippets
*
* Generated via Pygments and Jekyll, these are snippets of HTML, CSS, and JS.
*/
.highlight {
padding: 9px 14px;
margin-bottom: 14px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
border-radius: 4px;
}
.highlight pre {
padding: 0;
margin-top: 0;
margin-bottom: 0;
word-break: normal;
white-space: nowrap;
background-color: transparent;
border: 0;
}
.highlight pre code {
font-size: inherit;
color: #333; /* Effectively the base text color */
}
.highlight pre code:first-child {
display: inline-block;
padding-right: 45px;
}
/*
* Responsive tests
*
* Generate a set of tests to show the responsive utilities in action.
*/
/* Responsive (scrollable) doc tables */
.table-responsive .highlight pre {
white-space: normal;
}
/* Utility classes table */
.bs-table th small,
.responsive-utilities th small {
display: block;
font-weight: normal;
color: #999;
}
.responsive-utilities tbody th {
font-weight: normal;
}
.responsive-utilities td {
text-align: center;
}
.responsive-utilities td.is-visible {
color: #468847;
background-color: #dff0d8 !important;
}
.responsive-utilities td.is-hidden {
color: #ccc;
background-color: #f9f9f9 !important;
}
/* Responsive tests */
.responsive-utilities-test {
margin-top: 5px;
}
.responsive-utilities-test .col-xs-6 {
margin-bottom: 10px;
}
.responsive-utilities-test span {
display: block;
padding: 15px 10px;
font-size: 14px;
font-weight: bold;
line-height: 1.1;
text-align: center;
border-radius: 4px;
}
.visible-on .col-xs-6 .hidden-xs,
.visible-on .col-xs-6 .hidden-sm,
.visible-on .col-xs-6 .hidden-md,
.visible-on .col-xs-6 .hidden-lg,
.hidden-on .col-xs-6 .hidden-xs,
.hidden-on .col-xs-6 .hidden-sm,
.hidden-on .col-xs-6 .hidden-md,
.hidden-on .col-xs-6 .hidden-lg {
color: #999;
border: 1px solid #ddd;
}
.visible-on .col-xs-6 .visible-xs-block,
.visible-on .col-xs-6 .visible-sm-block,
.visible-on .col-xs-6 .visible-md-block,
.visible-on .col-xs-6 .visible-lg-block,
.hidden-on .col-xs-6 .visible-xs-block,
.hidden-on .col-xs-6 .visible-sm-block,
.hidden-on .col-xs-6 .visible-md-block,
.hidden-on .col-xs-6 .visible-lg-block {
color: #468847;
background-color: #dff0d8;
border: 1px solid #d6e9c6;
}
/*
* Glyphicons
*
* Special styles for displaying the icons and their classes in the docs.
*/
.bs-glyphicons {
margin: 0 -10px 20px;
overflow: hidden;
}
.bs-glyphicons-list {
padding-left: 0;
list-style: none;
}
.bs-glyphicons li {
float: left;
width: 25%;
height: 115px;
padding: 10px;
font-size: 10px;
line-height: 1.4;
text-align: center;
background-color: #f9f9f9;
border: 1px solid #fff;
}
.bs-glyphicons .glyphicon {
margin-top: 5px;
margin-bottom: 10px;
font-size: 24px;
}
.bs-glyphicons .glyphicon-class {
display: block;
text-align: center;
word-wrap: break-word; /* Help out IE10+ with class names */
}
.bs-glyphicons li:hover {
color: #fff;
background-color: #563d7c;
}
@media (min-width: 768px) {
.bs-glyphicons {
margin-right: 0;
margin-left: 0;
}
.bs-glyphicons li {
width: 12.5%;
font-size: 12px;
}
}
/*
* Customizer
*
* Since this is so form control heavy, we have quite a few styles to customize
* the display of inputs, headings, and more. Also included are all the download
* buttons and actions.
*/
.bs-customizer .toggle {
float: right;
margin-top: 25px;
}
/* Headings and form contrls */
.bs-customizer label {
margin-top: 10px;
font-weight: 500;
color: #555;
}
.bs-customizer h2 {
padding-top: 30px;
margin-top: 0;
margin-bottom: 5px;
}
.bs-customizer h3 {
margin-bottom: 0;
}
.bs-customizer h4 {
margin-top: 15px;
margin-bottom: 0;
}
.bs-customizer .bs-callout h4 {
margin-top: 0; /* lame, but due to specificity we have to duplicate */
margin-bottom: 5px;
}
.bs-customizer input[type="text"] {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
background-color: #fafafa;
}
.bs-customizer .help-block {
margin-bottom: 5px;
font-size: 12px;
}
/* For the variables, use regular weight */
#less-section label {
font-weight: normal;
}
/* Downloads */
.bs-customize-download .btn-outline {
padding: 20px;
}
/* Error handling */
.bs-customizer-alert {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 1030;
padding: 15px 0;
color: #fff;
background-color: #d9534f;
border-bottom: 1px solid #b94441;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.bs-customizer-alert .close {
margin-top: -4px;
font-size: 24px;
}
.bs-customizer-alert p {
margin-bottom: 0;
}
.bs-customizer-alert .glyphicon {
margin-right: 5px;
}
.bs-customizer-alert pre {
margin: 10px 0 0;
color: #fff;
background-color: #a83c3a;
border-color: #973634;
-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
box-shadow: inset 0 2px 4px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
}
.bs-dropzone {
position: relative;
padding: 20px;
margin-bottom: 20px;
color: #777;
text-align: center;
border: 2px dashed #eee;
border-radius: 4px;
}
.bs-dropzone h2 {
margin-top: 0;
margin-bottom: 5px;
}
.bs-dropzone hr {
width: 100px;
}
.bs-dropzone .lead {
margin-bottom: 10px;
font-weight: normal;
color: #333;
}
/*.bs-dropzone*/ #import-manual-trigger {
cursor: pointer;
}
.bs-dropzone p:last-child {
margin-bottom: 0;
}
/*
* Brand guidelines
*
* Extra styles for displaying wordmarks, logos, etc.
*/
/* Logo series wrapper */
.bs-brand-logos {
display: table;
width: 100%;
margin-bottom: 15px;
overflow: hidden;
color: #563d7c;
background-color: #f9f9f9;
border-radius: 4px;
}
/* Individual items */
.bs-brand-item {
padding: 60px 0;
text-align: center;
}
.bs-brand-item + .bs-brand-item {
border-top: 1px solid #fff;
}
.bs-brand-logos .inverse {
color: #fff;
background-color: #563d7c;
}
.bs-brand-item .svg {
width: 144px;
height: 144px;
}
/* Heading content within */
.bs-brand-item h1,
.bs-brand-item h3 {
margin-top: 0;
margin-bottom: 0;
}
.bs-brand-item .bs-docs-booticon {
margin-right: auto;
margin-left: auto;
}
/* Make the icons stand out on what is/isn't okay */
.bs-brand-item .glyphicon {
width: 30px;
height: 30px;
margin: 10px auto -10px;
line-height: 30px;
color: #fff;
border-radius: 50%;
}
.bs-brand-item .glyphicon-ok {
background-color: #5cb85c;
}
.bs-brand-item .glyphicon-remove {
background-color: #d9534f;
}
@media (min-width: 768px) {
.bs-brand-item {
display: table-cell;
width: 1%;
}
.bs-brand-item + .bs-brand-item {
border-top: 0;
border-left: 1px solid #fff;
}
.bs-brand-item h1 {
font-size: 60px;
}
}
/*
* ZeroClipboard styles
*/
.zero-clipboard {
position: relative;
display: none;
}
.btn-clipboard {
position: absolute;
top: 0;
right: 0;
z-index: 10;
display: block;
padding: 5px 8px;
font-size: 12px;
color: #777;
cursor: pointer;
background-color: #fff;
border: 1px solid #e1e1e8;
border-radius: 0 4px 0 4px;
}
.btn-clipboard-hover {
color: #fff;
background-color: #563d7c;
border-color: #563d7c;
}
@media (min-width: 768px) {
.zero-clipboard {
display: block;
}
.bs-example + .zero-clipboard .btn-clipboard {
top: -16px;
border-top-right-radius: 0;
}
}
/*
* Miscellaneous
*
* Odds and ends for optimum docs display.
*/
/* Pseudo :focus state for showing how it looks in the docs */
#focusedInput {
border-color: rgb(204,204,204); /* Restate unfocused value to make CSSLint happy that there's a pre-CSS3 fallback*/
border-color: rgba(82,168,236,.8);
outline: 0;
outline: thin dotted \9; /* IE6-9 */
-webkit-box-shadow: 0 0 8px rgba(82,168,236,.6);
box-shadow: 0 0 8px rgba(82,168,236,.6);
}

View File

@ -85,6 +85,17 @@
}, 3000)
})
// Modal relatedTarget demo
$('#exampleModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget) // Button that triggered the modal
var recipient = button.data('whatever') // Extract info from data-* attributes
// If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
// Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
var modal = $(this)
modal.find('.modal-title').text('New message to ' + recipient)
modal.find('.modal-body input').val(recipient)
})
// Activate animated progress bar
$('.bs-docs-activate-animated-progressbar').on('click', function () {
$(this).prev('.progress-striped').toggleClass('progress-animated')

View File

@ -6,13 +6,13 @@
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
/* global JSZip, less, saveAs, UglifyJS, __js, __less, __fonts */
/* global JSZip, less, autoprefixer, saveAs, UglifyJS, __configBridge, __js, __less, __fonts */
window.onload = function () { // wait for load in a dumb way because B-0
'use strict';
var cw = '/*!\n' +
' * Bootstrap v3.2.0 (http://getbootstrap.com)\n' +
' * Copyright 2011-2014 Twitter, Inc.\n' +
' * Bootstrap v3.3.0 (http://getbootstrap.com)\n' +
' * Copyright 2011-' + new Date().getFullYear() + ' Twitter, Inc.\n' +
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
' */\n\n'
@ -251,6 +251,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
}
function compileLESS(lessSource, baseFilename, intoResult) {
var promise = $.Deferred()
var parser = new less.Parser({
paths: ['variables.less', 'mixins.less'],
optimization: 0,
@ -259,14 +260,18 @@ window.onload = function () { // wait for load in a dumb way because B-0
parser.parse(lessSource, function (err, tree) {
if (err) {
return showError('<strong>Ruh roh!</strong> Could not parse less files.', err)
return promise.reject(err)
}
intoResult[baseFilename + '.css'] = cw + tree.toCSS()
intoResult[baseFilename + '.min.css'] = cw + tree.toCSS({ compress: true })
promise.resolve()
})
return promise.promise()
}
function generateCSS(preamble) {
var promise = $.Deferred()
var oneChecked = false
var lessFileIncludes = {}
$('#less-section input').each(function () {
@ -290,14 +295,22 @@ window.onload = function () { // wait for load in a dumb way because B-0
var bsLessSource = preamble + generateLESS('bootstrap.less', lessFileIncludes, vars)
var themeLessSource = preamble + generateLESS('theme.less', lessFileIncludes, vars)
try {
compileLESS(bsLessSource, 'bootstrap', result)
compileLESS(themeLessSource, 'bootstrap-theme', result)
} catch (err) {
return showError('<strong>Ruh roh!</strong> Could not parse less files.', err)
}
var prefixer = autoprefixer({ browsers: __configBridge.autoprefixerBrowsers })
return result
$.when(
compileLESS(bsLessSource, 'bootstrap', result),
compileLESS(themeLessSource, 'bootstrap-theme', result)
).done(function () {
for (var key in result) {
result[key] = prefixer.process(result[key]).css
}
promise.resolve(result)
}).fail(function (err) {
showError('<strong>Ruh roh!</strong> Could not parse less files.', err)
promise.reject()
})
return promise.promise()
}
function uglify(js) {
@ -319,19 +332,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
function generateJS(preamble) {
var $checked = $('#plugin-section input:checked')
var jqueryCheck = [
'if (typeof jQuery === \'undefined\') {',
' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery\')',
'}\n'
].join('\n')
var jqueryVersionCheck = [
'+function ($) {',
' var version = $.fn.jquery.split(\' \')[0].split(\'.\')',
' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {',
' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery version 1.9.1 or higher\')',
' }',
'}(jQuery);\n\n'
].join('\n')
var jqueryCheck = __configBridge.jqueryCheck.join('\n')
var jqueryVersionCheck = __configBridge.jqueryVersionCheck.join('\n')
if (!$checked.length) return false
@ -359,32 +361,26 @@ window.onload = function () { // wait for load in a dumb way because B-0
var file = (e.originalEvent.hasOwnProperty('dataTransfer')) ? e.originalEvent.dataTransfer.files[0] : e.originalEvent.target.files[0]
if (!file.type.match('application/json')) {
return showAlert('danger', '<strong>Ruh roh.</strong> We can only read <code>.json</code> files. Please try again.', importDropTarget)
}
var reader = new FileReader()
reader.onload = (function () {
return function (e) {
var text = e.target.result
reader.onload = function (e) {
var text = e.target.result
try {
var json = JSON.parse(text)
try {
var json = JSON.parse(text)
if (typeof json != 'object') {
throw new Error('JSON data from config file is not an object.')
}
updateCustomizerFromJson(json)
showAlert('success', '<strong>Woohoo!</strong> Your configuration was successfully uploaded. Tweak your settings, then hit Download.', importDropTarget)
} catch (err) {
return showAlert('danger', '<strong>Shucks.</strong> We can only read valid <code>.json</code> files. Please try again.', importDropTarget)
if (!$.isPlainObject(json)) {
throw new Error('JSON data from config file is not an object.')
}
}
})(file)
reader.readAsText(file)
updateCustomizerFromJson(json)
showAlert('success', '<strong>Woohoo!</strong> Your configuration was successfully uploaded. Tweak your settings, then hit Download.', importDropTarget)
} catch (err) {
return showAlert('danger', '<strong>Shucks.</strong> We can only read valid <code>.json</code> files. Please try again.', importDropTarget)
}
}
reader.readAsText(file, 'utf-8')
}
function handleConfigDragOver(e) {
@ -401,7 +397,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
.on('drop', handleConfigFileSelect)
}
$('#import-file-select').on('select', handleConfigFileSelect)
$('#import-file-select').on('change', handleConfigFileSelect)
$('#import-manual-trigger').on('click', removeImportAlerts)
var inputsComponent = $('#less-section input')
@ -464,9 +460,15 @@ window.onload = function () { // wait for load in a dumb way because B-0
' * Config saved to config.json and ' + gistUrl + '\n' +
' */\n'
generateZip(generateCSS(preamble), generateJS(preamble), generateFonts(), configJson, function (blob) {
$compileBtn.removeAttr('disabled')
saveAs(blob, 'bootstrap.zip')
$.when(
generateCSS(preamble),
generateJS(preamble),
generateFonts()
).done(function (css, js, fonts) {
generateZip(css, js, fonts, configJson, function (blob) {
$compileBtn.removeAttr('disabled')
setTimeout(function () { saveAs(blob, 'bootstrap.zip') }, 0)
})
})
})
});

16015
docs/assets/js/vendor/autoprefixer.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -840,6 +840,19 @@ body {
}
// Wall of Browser Bugs
//
// Better display for the responsive table on the Wall of Browser Bugs.
.bs-docs-browser-bugs {
td p {
margin-bottom: 0;
}
th:first-child {
width: 18%;
}
}
//
// Grid examples
//
@ -1232,13 +1245,6 @@ body {
font-weight: normal;
}
.bs-customizer-input {
float: left;
width: 33.333333%;
padding-right: 1rem;
padding-left: 1rem;
}
// Downloads
.bs-customize-download .btn-outline {
padding: 20px;

View File

@ -8,7 +8,7 @@ Bootstrap currently works around several outstanding browser bugs in major brows
We publicly list browser bugs that are impacting us here, in the hopes of expediting the process of fixing them. For information on Bootstrap's browser compatibility, [see our browser compatibility docs](../getting-started/#support).
<div class="table-responsive">
<table class="table table-bordered table-hover">
<table class="bs-docs-browser-bugs table table-bordered table-hover">
<thead>
<tr>
<th>Browser(s)</th>
@ -18,96 +18,14 @@ We publicly list browser bugs that are impacting us here, in the hopes of expedi
</tr>
</thead>
<tbody>
{% for bug in site.data.browser-bugs %}
<tr>
<td>Internet Explorer 11</td>
<td>Hovered element still remains in <code>:hover</code> state after scrolling away</td>
<td><a href="https://connect.microsoft.com/IE/feedback/details/926665/ie-11-hovering-over-an-element-and-then-scrolling-without-moving-the-mouse-pointer-leaves-the-element-in-hover-state">IE bug #926665</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/14211">#14211</a></td>
</tr>
<tr>
<td>Internet Explorer 11</td>
<td>When hovering over a <code>&lt;select&gt;</code> menu item, the cursor for the element underneath the menu is displayed</td>
<td><a href="https://connect.microsoft.com/IE/feedbackdetail/view/963961">IE bug #963961</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/14528">#14528</a></td>
</tr>
<tr>
<td>Firefox</td>
<td><code>.table-bordered</code> with an empty <code>&lt;tbody&gt;</code> is missing borders</td>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1023761">Mozilla bug #1023761</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/13453">#13453</a></td>
</tr>
<tr>
<td>Firefox</td>
<td><code>max-width: 100%;</code> doesn't work inside tables</td>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=975632">Mozilla bug #975632</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/10690">#10690</a></td>
</tr>
<tr>
<td>Firefox</td>
<td>Java applets that are descendants of elements with forced hardware acceleration using <code>translate3d(0,0,0)</code> are invisible on Windows</td>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1048279">Mozilla bug #1048279</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/14124">#14124</a></td>
</tr>
<tr>
<td>Firefox</td>
<td>Button elements with <code>width: 100%</code> become cropped in long tables.</td>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1060131">Mozilla bug #1060131</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/14320">#14320</a></td>
</tr>
<tr>
<td>Firefox</td>
<td>If the disabled state of a form control is changed via JavaScript, the normal state doesn't return after refreshing the page.</td>
<td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">Mozilla bug #654072</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/793">#793</a></td>
</tr>
<tr>
<td>Chrome</td>
<td>Clicking above <code>&lt;input type="number"&gt;</code> increment button flashes the decrement button</td>
<td><a href="https://code.google.com/p/chromium/issues/detail?id=419108"></a></td>
<td>Offshoot of <a href="https://github.com/twbs/bootstrap/issues/8350">#8350</a> &amp; <a href="https://code.google.com/p/chromium/issues/detail?id=337668">Chromium issue #337668</a></td>
</tr>
<tr>
<td>Chrome</td>
<td><code>display: table;</code> within <code>display: block;</code> forces sibling content to new line</td>
<td><a href="https://code.google.com/p/chromium/issues/detail?id=309483">Chromium issue #309483</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/9950">#9950</a></td>
</tr>
<tr>
<td>Chrome</td>
<td>Incorrect viewport size used for media queries when printing</td>
<td><a href="https://code.google.com/p/chromium/issues/detail?id=273306">Chromium issue #273306</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/12078">#12078</a></td>
</tr>
<tr>
<td>Chrome &amp; Safari</td>
<td>OS X scrollbar clipped in <code>select[multiple]</code> with padding</td>
<td><a href="https://code.google.com/p/chromium/issues/detail?id=342208">Chromium issue #342208</a>, <a href="https://bugs.webkit.org/show_bug.cgi?id=128489">WebKit bug #128489</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/12536">#12536</a></td>
</tr>
<tr>
<td>Chrome</td>
<td><code>display: table-cell; width: 100%;</code> doesn't work correctly on date <code>&lt;input&gt;</code></td>
<td><a href="https://code.google.com/p/chromium/issues/detail?id=346051">Chromium issue #346051</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/12548">#12548</a></td>
</tr>
<tr>
<td>Chrome</td>
<td><code>&lt;input type="password"&gt;</code> sporadically causes bad widths on floated elements</td>
<td><a href="https://code.google.com/p/chromium/issues/detail?id=377346">Chrome issue #377346</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/13892">#13892</a></td>
</tr>
<tr>
<td>Safari</td>
<td>Weird button behavior with some number <code>&lt;input&gt;</code>s</td>
<td><a href="https://bugs.webkit.org/show_bug.cgi?id=137269">WebKit bug #137269</a></td>
<td><a href="https://github.com/twbs/bootstrap/issues/8350">#8350</a>, <a href="https://github.com/necolas/normalize.css/issues/283">Normalize #283</a>, <a href="https://code.google.com/p/chromium/issues/detail?id=337668">Chromium issue #337668</a></td>
</tr>
<tr>
<td>Safari</td>
<td>Justified nav rendering bug</td>
<td>(No public bug tracker)</td>
<td><a href="https://github.com/twbs/bootstrap/issues/9774">#9774</a></td>
<td>{{ bug.browser }}</td>
<td>{{ bug.summary | markdownify | bugify }}</td>
<td>{{ bug.upstream_bug | bugify }}</td>
<td>{{ bug.origin | bugify }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

View File

@ -178,16 +178,16 @@ Just wrap a series of `.btn`s in `.btn-group.btn-group-justified`.
<div class="bs-example">
<div class="btn-group btn-group-justified">
<a class="btn btn-secondary" role="button">Left</a>
<a class="btn btn-secondary" role="button">Middle</a>
<a class="btn btn-secondary" role="button">Right</a>
<a class="btn btn-secondary" href="#" role="button">Left</a>
<a class="btn btn-secondary" href="#" role="button">Middle</a>
<a class="btn btn-secondary" href="#" role="button">Right</a>
</div>
<br>
<div class="btn-group btn-group-justified">
<a class="btn btn-secondary" role="button">Left</a>
<a class="btn btn-secondary" role="button">Middle</a>
<a class="btn btn-secondary" href="#" role="button">Left</a>
<a class="btn btn-secondary" href="#" role="button">Middle</a>
<div class="btn-group">
<a class="btn btn-secondary dropdown-toggle" data-toggle="dropdown">
<a class="btn btn-secondary dropdown-toggle" href="#" data-toggle="dropdown">
Dropdown
</a>
<ul class="dropdown-menu" role="menu">

View File

@ -9,7 +9,7 @@ A lightweight, flexible component that can optionally extend the entire viewport
<div class="jumbotron">
<h1 class="jumbotron-heading">Hello, world!</h1>
<p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
<p class="lead"><a class="btn btn-primary btn-lg" role="button">Learn more</a></p>
<p class="lead"><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
</div>
{% endexample %}
@ -30,6 +30,6 @@ Jumbotrons also come with an adaptive `hr`—just add `.jumbotron-hr` to the ele
<h1 class="jumbotron-heading">Jumbotron <code>hr</code></h1>
<p class="lead">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
<hr class="jumbotron-hr">
<p class="lead"><a class="btn btn-primary btn-lg" role="button">Learn more</a></p>
<p class="lead"><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
</div>
{% endexample %}

View File

@ -1,5 +1,5 @@
/*!
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Bootstrap v3.3.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@ -16,7 +16,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: transition.js v3.2.0
* Bootstrap: transition.js v3.3.0
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -76,7 +76,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.2.0
* Bootstrap: alert.js v3.3.0
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -95,7 +95,7 @@ if (typeof jQuery === 'undefined') {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.2.0'
Alert.VERSION = '3.3.0'
Alert.TRANSITION_DURATION = 150
@ -171,7 +171,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: button.js v3.2.0
* Bootstrap: button.js v3.3.0
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -191,7 +191,7 @@ if (typeof jQuery === 'undefined') {
this.isLoading = false
}
Button.VERSION = '3.2.0'
Button.VERSION = '3.3.0'
Button.DEFAULTS = {
loadingText: 'loading...'
@ -207,10 +207,10 @@ if (typeof jQuery === 'undefined') {
if (data.resetText == null) $el.data('resetText', $el[val]())
$el[val](data[state] == null ? this.options[state] : data[state])
// push to event loop to allow forms to submit
setTimeout($.proxy(function () {
$el[val](data[state] == null ? this.options[state] : data[state])
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
@ -282,13 +282,13 @@ if (typeof jQuery === 'undefined') {
e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
})
}(jQuery);
/* ========================================================================
* Bootstrap: carousel.js v3.2.0
* Bootstrap: carousel.js v3.3.0
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -319,7 +319,7 @@ if (typeof jQuery === 'undefined') {
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.2.0'
Carousel.VERSION = '3.3.0'
Carousel.TRANSITION_DURATION = 600
@ -331,6 +331,7 @@ if (typeof jQuery === 'undefined') {
}
Carousel.prototype.keydown = function (e) {
if (/input|textarea/i.test(e.target.tagName)) return
switch (e.which) {
case 37: this.prev(); break
case 39: this.next(); break
@ -496,7 +497,7 @@ if (typeof jQuery === 'undefined') {
// CAROUSEL DATA-API
// =================
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var clickHandler = function (e) {
var href
var $this = $(this)
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
@ -512,7 +513,11 @@ if (typeof jQuery === 'undefined') {
}
e.preventDefault()
})
}
$(document)
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
$(window).on('load', function () {
$('[data-ride="carousel"]').each(function () {
@ -524,7 +529,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: collapse.js v3.2.0
* Bootstrap: collapse.js v3.3.0
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -541,18 +546,25 @@ if (typeof jQuery === 'undefined') {
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
this.transitioning = null
if (this.options.parent) this.$parent = $(this.options.parent)
if (this.options.parent) {
this.$parent = this.getParent()
} else {
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
}
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.2.0'
Collapse.VERSION = '3.3.0'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = {
toggle: true
toggle: true,
trigger: '[data-toggle="collapse"]'
}
Collapse.prototype.dimension = function () {
@ -587,6 +599,10 @@ if (typeof jQuery === 'undefined') {
.addClass('collapsing')[dimension](0)
.attr('aria-expanded', true)
this.$trigger
.removeClass('collapsed')
.attr('aria-expanded', true)
this.transitioning = 1
var complete = function () {
@ -623,6 +639,10 @@ if (typeof jQuery === 'undefined') {
.removeClass('collapse in')
.attr('aria-expanded', false)
this.$trigger
.addClass('collapsed')
.attr('aria-expanded', false)
this.transitioning = 1
var complete = function () {
@ -645,6 +665,33 @@ if (typeof jQuery === 'undefined') {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
Collapse.prototype.getParent = function () {
return $(this.options.parent)
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
.each($.proxy(function (i, element) {
var $element = $(element)
this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
}, this))
.end()
}
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
var isOpen = $element.hasClass('in')
$element.attr('aria-expanded', isOpen)
$trigger
.toggleClass('collapsed', !isOpen)
.attr('aria-expanded', isOpen)
}
function getTargetFromTrigger($trigger) {
var href
var target = $trigger.attr('data-target')
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
return $(target)
}
// COLLAPSE PLUGIN DEFINITION
// ==========================
@ -680,22 +727,13 @@ if (typeof jQuery === 'undefined') {
// =================
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
var href
var $this = $(this)
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
var $target = $(target)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data()
var parent = $this.attr('data-parent')
var $parent = parent && $(parent)
if (!data || !data.transitioning) {
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed').attr('aria-expanded', false)
var isCollapsed = $target.hasClass('in')
$this.toggleClass('collapsed', isCollapsed).attr('aria-expanded', !isCollapsed)
}
if (!$this.attr('data-target')) e.preventDefault()
var $target = getTargetFromTrigger($this)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
Plugin.call($target, option)
})
@ -703,7 +741,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: dropdown.js v3.2.0
* Bootstrap: dropdown.js v3.3.0
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -723,7 +761,7 @@ if (typeof jQuery === 'undefined') {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.2.0'
Dropdown.VERSION = '3.3.0'
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
@ -858,12 +896,14 @@ if (typeof jQuery === 'undefined') {
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.2.0
* Bootstrap: modal.js v3.3.0
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -894,7 +934,7 @@ if (typeof jQuery === 'undefined') {
}
}
Modal.VERSION = '3.2.0'
Modal.VERSION = '3.3.0'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@ -920,10 +960,11 @@ if (typeof jQuery === 'undefined') {
this.isShown = true
this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')
this.setScrollbar()
this.escape()
this.resize()
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
@ -938,6 +979,9 @@ if (typeof jQuery === 'undefined') {
.show()
.scrollTop(0)
if (that.options.backdrop) that.adjustBackdrop()
that.adjustDialog()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
@ -972,6 +1016,7 @@ if (typeof jQuery === 'undefined') {
this.isShown = false
this.escape()
this.resize()
$(document).off('focusin.bs.modal')
@ -1007,11 +1052,20 @@ if (typeof jQuery === 'undefined') {
}
}
Modal.prototype.resize = function () {
if (this.isShown) {
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
} else {
$(window).off('resize.bs.modal')
}
}
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
@ -1068,13 +1122,43 @@ if (typeof jQuery === 'undefined') {
}
}
// these following methods are used to handle overflowing modals
Modal.prototype.handleUpdate = function () {
if (this.options.backdrop) this.adjustBackdrop()
this.adjustDialog()
}
Modal.prototype.adjustBackdrop = function () {
this.$backdrop
.css('height', 0)
.css('height', this.$element[0].scrollHeight)
}
Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}
Modal.prototype.resetAdjustments = function () {
this.$element.css({
paddingLeft: '',
paddingRight: ''
})
}
Modal.prototype.checkScrollbar = function () {
this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
this.scrollbarWidth = this.measureScrollbar()
}
Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
}
Modal.prototype.resetScrollbar = function () {
@ -1082,7 +1166,6 @@ if (typeof jQuery === 'undefined') {
}
Modal.prototype.measureScrollbar = function () { // thx walsh
if (document.body.clientWidth >= window.innerWidth) return 0
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)
@ -1145,7 +1228,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tooltip.js v3.2.0
* Bootstrap: tooltip.js v3.3.0
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
@ -1171,7 +1254,7 @@ if (typeof jQuery === 'undefined') {
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.2.0'
Tooltip.VERSION = '3.3.0'
Tooltip.TRANSITION_DURATION = 150
@ -1624,7 +1707,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: popover.js v3.2.0
* Bootstrap: popover.js v3.3.0
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -1644,7 +1727,7 @@ if (typeof jQuery === 'undefined') {
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.2.0'
Popover.VERSION = '3.3.0'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
@ -1744,7 +1827,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: scrollspy.js v3.2.0
* Bootstrap: scrollspy.js v3.3.0
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -1775,7 +1858,7 @@ if (typeof jQuery === 'undefined') {
this.process()
}
ScrollSpy.VERSION = '3.2.0'
ScrollSpy.VERSION = '3.3.0'
ScrollSpy.DEFAULTS = {
offset: 10
@ -1920,7 +2003,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tab.js v3.2.0
* Bootstrap: tab.js v3.3.0
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -1938,7 +2021,7 @@ if (typeof jQuery === 'undefined') {
this.element = $(element)
}
Tab.VERSION = '3.2.0'
Tab.VERSION = '3.3.0'
Tab.TRANSITION_DURATION = 150
@ -2062,15 +2145,19 @@ if (typeof jQuery === 'undefined') {
// TAB DATA-API
// ============
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
})
}
$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);
/* ========================================================================
* Bootstrap: affix.js v3.2.0
* Bootstrap: affix.js v3.3.0
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -2099,7 +2186,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition()
}
Affix.VERSION = '3.2.0'
Affix.VERSION = '3.3.0'
Affix.RESET = 'affix affix-top affix-bottom'

File diff suppressed because one or more lines are too long

2
docs/dist/js/npm.js vendored
View File

@ -1,4 +1,4 @@
// This file is generated. You can require() it in a CommonJS environment.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')

View File

@ -149,12 +149,12 @@
</div><!-- /.container -->
<div class="blog-footer">
<footer class="blog-footer">
<p>Blog template built for <a href="http://getbootstrap.com">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>.</p>
<p>
<a href="#">Back to top</a>
</p>
</div>
</footer>
<!-- Bootstrap core JavaScript

View File

@ -62,9 +62,9 @@
</div>
</div>
<div class="footer">
<footer class="footer">
<p>&copy; Company 2014</p>
</div>
</footer>
</div> <!-- /container -->

View File

@ -52,7 +52,7 @@
<div class="container">
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-lg" role="button">Learn more &raquo;</a></p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more &raquo;</a></p>
</div>
</div>

View File

@ -47,7 +47,7 @@
<div class="row">
<div class="col-lg-4">
<h2>Safari bug warning!</h2>
<p class="text-danger">As of v7.0.1, Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing.</p>
<p class="text-danger">As of v8.0, Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing.</p>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p>
</div>
@ -64,9 +64,9 @@
</div>
<!-- Site footer -->
<div class="footer">
<footer class="footer">
<p>&copy; Company 2014</p>
</div>
</footer>
</div> <!-- /container -->

View File

@ -65,11 +65,11 @@
<p>Back to <a href="../sticky-footer">the default sticky footer</a> minus the navbar.</p>
</div>
<div class="footer">
<footer class="footer">
<div class="container">
<p class="text-muted">Place sticky footer content here.</p>
</div>
</div>
</footer>
<!-- Bootstrap core JavaScript

View File

@ -31,11 +31,11 @@
<p>Use <a href="../sticky-footer-navbar">the sticky footer with a fixed navbar</a> if need be, too.</p>
</div>
<div class="footer">
<footer class="footer">
<div class="container">
<p class="text-muted">Place sticky footer content here.</p>
</div>
</div>
</footer>
<!-- Bootstrap core JavaScript

View File

@ -184,13 +184,21 @@ The `.dropdown-backdrop` element isn't used on iOS in the nav because of the com
Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.
### Printer viewports
### Printing
Even in some modern browsers, printing can be quirky. In particular, as of Chrome v32 and regardless of margin settings, Chrome uses a viewport width significantly narrower than the physical paper size when resolving media queries while printing a webpage. This can result in Bootstrap's extra-small grid being unexpectedly activated when printing. <a href="https://github.com/twbs/bootstrap/issues/12078">See #12078 for some details.</a> Suggested workarounds:
Even in some modern browsers, printing can be quirky.
- Embrace the extra-small grid and make sure your page looks acceptable under it.
- Customize the values of the `@screen-*` Less variables so that your printer paper is considered larger than extra-small.
- Add custom media queries to change the grid size breakpoints for print media only.
In particular, as of Chrome v32 and regardless of margin settings, Chrome uses a viewport width significantly narrower than the physical paper size when resolving media queries while printing a webpage. This can result in Bootstrap's extra-small grid being unexpectedly activated when printing. [See #12078 for some details.](https://github.com/twbs/bootstrap/issues/12078) Suggested workarounds:
Also, as of Safari v8.0, fixed-width <code>.container</code>s can cause Safari to use an unusually small font size when printing. See <a href="https://github.com/twbs/bootstrap/issues/14868">#14868</a> for more details. One potential workaround for this is adding the following CSS:</p>
{% highlight css %}
@media print {
.container {
width: auto;
}
}
{% endhighlight %}
### Android stock browser

View File

@ -125,7 +125,7 @@ Add `data-toggle="dropdown"` to a link or button to toggle a dropdown.
<div class="dropdown">
<button id="dLabel" type="button" data-toggle="dropdown">
Dropdown trigger
<span class="caret"></span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
...

View File

@ -224,6 +224,88 @@ For modals that simply appear rather than fade in to view, remove the `.fade` cl
</div>
{% endhighlight %}
## Varying modal content based on trigger button
Have a bunch of buttons that all trigger the same modal, just with slightly different contents? Use `event.relatedTarget` and [HTML `data-*` attributes](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes) (possibly [via jQuery](http://api.jquery.com/data/)) to vary the contents of the modal depending on which button was clicked. See the Modal Events docs for details on `relatedTarget`.
<div class="bs-example" style="padding-bottom: 24px;">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal for @mdo</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@fat">Open modal for @fat</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@twbootstrap">Open modal for @twbootstrap</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">New message</h4>
</div>
<div class="modal-body">
<form role="form">
<div class="form-group">
<label for="recipient-name" class="control-label">Recipient:</label>
<input type="text" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<label for="message-text" class="control-label">Message:</label>
<textarea class="form-control" id="message-text"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Send message</button>
</div>
</div>
</div>
</div>
</div>
{% highlight html %}
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal for @mdo</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@fat">Open modal for @fat</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@twbootstrap">Open modal for @twbootstrap</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="exampleModalLabel">New message</h4>
</div>
<div class="modal-body">
<form role="form">
<div class="form-group">
<label for="recipient-name" class="control-label">Recipient:</label>
<input type="text" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<label for="message-text" class="control-label">Message:</label>
<textarea class="form-control" id="message-text"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Send message</button>
</div>
</div>
</div>
</div>
{% endhighlight %}
{% highlight js %}
$('#exampleModal').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget) // Button that triggered the modal
var recipient = button.data('whatever') // Extract info from data-* attributes
// If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
// Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
var modal = $(this)
modal.find('.modal-title').text('New message to ' + recipient)
modal.find('.modal-body input').val(recipient)
})
{% endhighlight %}
## Usage
The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds `.modal-open` to the `<body>` to override default scrolling behavior and generates a `.modal-backdrop` to provide a click area for dismissing shown modals when clicking outside the modal.

View File

@ -14,6 +14,12 @@ Popovers whose both title and content are zero-length are never displayed.
<div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>One way to initialize all popovers on a page would be to select them by their <code>data-toggle</code> attribute:</p>
{% highlight js %}
$(function () {
$('[data-toggle="popover"]').popover()
})
{% endhighlight %}
</div>
<div class="bs-callout bs-callout-warning">
<h4>Popovers in button groups and input groups require special setting</h4>

View File

@ -78,6 +78,12 @@ Hover over the buttons below to see their tooltips.
<div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>One way to initialize all tooltips on a page would be to select them by their <code>data-toggle</code> attribute:</p>
{% highlight js %}
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
{% endhighlight %}
</div>
<div class="bs-callout bs-callout-warning">
<h4>Tooltips in button groups and input groups require special setting</h4>

View File

@ -11,7 +11,7 @@ The default media allow to float a media object (images, video, audio) to the le
{% example html %}
<div class="media">
<a class="pull-left" href="#">
<a class="media-left" href="#">
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
</a>
<div class="media-body">
@ -21,20 +21,20 @@ The default media allow to float a media object (images, video, audio) to the le
</div>
{% endexample %}
### Nested media
### Nesting
Media components can also be nested.
{% example html %}
<div class="media">
<a class="pull-left" href="#">
<a class="media-left" href="#">
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
</a>
<div class="media-body">
<h4 class="media-heading">Media heading</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
<div class="media">
<a class="pull-left" href="#">
<a class="media-left" href="#">
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
</a>
<div class="media-body">
@ -46,7 +46,7 @@ Media components can also be nested.
</div>
{% endexample %}
### Media alignment
### Alignment
The images or other media can be aligned top, middle, or bottom. The default is top aligned.
@ -96,7 +96,7 @@ With a bit of extra markup, you can use media inside list (useful for comment th
{% example html %}
<ul class="media-list">
<li class="media">
<a class="pull-left" href="#">
<a class="media-left" href="#">
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
</a>
<div class="media-body">
@ -104,7 +104,7 @@ With a bit of extra markup, you can use media inside list (useful for comment th
<p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>
<!-- Nested media object -->
<div class="media">
<a class="pull-left" href="#">
<a class="media-left" href="#">
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
</a>
<div class="media-body">
@ -112,7 +112,7 @@ With a bit of extra markup, you can use media inside list (useful for comment th
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
<!-- Nested media object -->
<div class="media">
<a class="pull-left" href="#">
<a class="media-left" href="#">
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
</a>
<div class="media-body">
@ -124,7 +124,7 @@ With a bit of extra markup, you can use media inside list (useful for comment th
</div>
<!-- Nested media object -->
<div class="media">
<a class="pull-left" href="#">
<a class="media-left" href="#">
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
</a>
<div class="media-body">
@ -135,7 +135,7 @@ With a bit of extra markup, you can use media inside list (useful for comment th
</div>
</li>
<li class="media">
<a class="pull-right" href="#">
<a class="media-right" href="#">
<img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
</a>
<div class="media-body">

View File

@ -2,7 +2,7 @@
var fs = require('fs');
var path = require('path');
var COMMONJS_BANNER = '// This file is generated. You can require() it in a CommonJS environment.\n';
var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n';
module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) {
var destDir = path.dirname(destFilepath);

View File

@ -6,11 +6,13 @@
*/
'use strict';
var markdown = require('markdown').markdown;
var Remarkable = require('remarkable');
function markdown2html(markdownString) {
var md = new Remarkable();
// the slice removes the <p>...</p> wrapper output by Markdown processor
return markdown.toHTML(markdownString.trim()).slice(3, -4);
return md.render(markdownString.trim()).slice(3, -5);
}
@ -33,9 +35,9 @@ Mini-language:
var CUSTOMIZABLE_HEADING = /^[/]{2}={2}(.*)$/;
var UNCUSTOMIZABLE_HEADING = /^[/]{2}-{2}(.*)$/;
var SUBSECTION_HEADING = /^[/]{2}={3}(.*)$/;
var SECTION_DOCSTRING = /^[/]{2}#{2}(.*)$/;
var VAR_ASSIGNMENT = /^(@[a-zA-Z0-9_-]+):[ ]*([^ ;][^;]+);[ ]*$/;
var VAR_DOCSTRING = /^[/]{2}[*]{2}(.*)$/;
var SECTION_DOCSTRING = /^[/]{2}#{2}(.+)$/;
var VAR_ASSIGNMENT = /^(@[a-zA-Z0-9_-]+):[ ]*([^ ;][^;]*);[ ]*$/;
var VAR_DOCSTRING = /^[/]{2}[*]{2}(.+)$/;
function Section(heading, customizable) {
this.heading = heading.trim();

44
grunt/configBridge.json Normal file
View File

@ -0,0 +1,44 @@
{
"paths": {
"customizerJs": [
"../assets/js/vendor/autoprefixer.js",
"../assets/js/vendor/less.min.js",
"../assets/js/vendor/jszip.min.js",
"../assets/js/vendor/uglify.min.js",
"../assets/js/vendor/Blob.js",
"../assets/js/vendor/FileSaver.js",
"../assets/js/raw-files.min.js",
"../assets/js/src/customizer.js"
],
"docsJs": [
"../assets/js/vendor/holder.js",
"../assets/js/vendor/ZeroClipboard.min.js",
"../assets/js/src/application.js"
]
},
"config": {
"autoprefixerBrowsers": [
"Android 2.3",
"Android >= 4",
"Chrome >= 20",
"Firefox >= 24",
"Explorer >= 8",
"iOS >= 6",
"Opera >= 12",
"Safari >= 6"
],
"jqueryCheck": [
"if (typeof jQuery === 'undefined') {",
" throw new Error('Bootstrap\\'s JavaScript requires jQuery')",
"}\n"
],
"jqueryVersionCheck": [
"+function ($) {",
" var version = $.fn.jquery.split(' ')[0].split('.')",
" if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {",
" throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher')",
" }",
"}(jQuery);\n\n"
]
}
}

View File

@ -57,7 +57,7 @@
{
browserName: "iphone",
platform: "OS X 10.9",
version: "7.1"
version: "8.0"
},
# iOS Chrome not currently supported by Sauce Labs

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: affix.js v3.2.0
* Bootstrap: affix.js v3.3.0
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -28,7 +28,7 @@
this.checkPosition()
}
Affix.VERSION = '3.2.0'
Affix.VERSION = '3.3.0'
Affix.RESET = 'affix affix-top affix-bottom'

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: alert.js v3.2.0
* Bootstrap: alert.js v3.3.0
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -18,7 +18,7 @@
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.2.0'
Alert.VERSION = '3.3.0'
Alert.TRANSITION_DURATION = 150

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: button.js v3.2.0
* Bootstrap: button.js v3.3.0
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -19,7 +19,7 @@
this.isLoading = false
}
Button.VERSION = '3.2.0'
Button.VERSION = '3.3.0'
Button.DEFAULTS = {
loadingText: 'loading...'
@ -35,10 +35,10 @@
if (data.resetText == null) $el.data('resetText', $el[val]())
$el[val](data[state] == null ? this.options[state] : data[state])
// push to event loop to allow forms to submit
setTimeout($.proxy(function () {
$el[val](data[state] == null ? this.options[state] : data[state])
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
@ -110,7 +110,7 @@
e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
})
}(jQuery);

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: carousel.js v3.2.0
* Bootstrap: carousel.js v3.3.0
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -30,7 +30,7 @@
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.2.0'
Carousel.VERSION = '3.3.0'
Carousel.TRANSITION_DURATION = 600
@ -42,6 +42,7 @@
}
Carousel.prototype.keydown = function (e) {
if (/input|textarea/i.test(e.target.tagName)) return
switch (e.which) {
case 37: this.prev(); break
case 39: this.next(); break
@ -207,7 +208,7 @@
// CAROUSEL DATA-API
// =================
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var clickHandler = function (e) {
var href
var $this = $(this)
var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
@ -223,7 +224,11 @@
}
e.preventDefault()
})
}
$(document)
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
$(window).on('load', function () {
$('[data-ride="carousel"]').each(function () {

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: collapse.js v3.2.0
* Bootstrap: collapse.js v3.3.0
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -16,18 +16,25 @@
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
this.transitioning = null
if (this.options.parent) this.$parent = $(this.options.parent)
if (this.options.parent) {
this.$parent = this.getParent()
} else {
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
}
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.2.0'
Collapse.VERSION = '3.3.0'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = {
toggle: true
toggle: true,
trigger: '[data-toggle="collapse"]'
}
Collapse.prototype.dimension = function () {
@ -62,6 +69,10 @@
.addClass('collapsing')[dimension](0)
.attr('aria-expanded', true)
this.$trigger
.removeClass('collapsed')
.attr('aria-expanded', true)
this.transitioning = 1
var complete = function () {
@ -98,6 +109,10 @@
.removeClass('collapse in')
.attr('aria-expanded', false)
this.$trigger
.addClass('collapsed')
.attr('aria-expanded', false)
this.transitioning = 1
var complete = function () {
@ -120,6 +135,33 @@
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
Collapse.prototype.getParent = function () {
return $(this.options.parent)
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
.each($.proxy(function (i, element) {
var $element = $(element)
this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
}, this))
.end()
}
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
var isOpen = $element.hasClass('in')
$element.attr('aria-expanded', isOpen)
$trigger
.toggleClass('collapsed', !isOpen)
.attr('aria-expanded', isOpen)
}
function getTargetFromTrigger($trigger) {
var href
var target = $trigger.attr('data-target')
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
return $(target)
}
// COLLAPSE PLUGIN DEFINITION
// ==========================
@ -155,22 +197,13 @@
// =================
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
var href
var $this = $(this)
var target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
var $target = $(target)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $this.data()
var parent = $this.attr('data-parent')
var $parent = parent && $(parent)
if (!data || !data.transitioning) {
if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed').attr('aria-expanded', false)
var isCollapsed = $target.hasClass('in')
$this.toggleClass('collapsed', isCollapsed).attr('aria-expanded', !isCollapsed)
}
if (!$this.attr('data-target')) e.preventDefault()
var $target = getTargetFromTrigger($this)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
Plugin.call($target, option)
})

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: dropdown.js v3.2.0
* Bootstrap: dropdown.js v3.3.0
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -19,7 +19,7 @@
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.2.0'
Dropdown.VERSION = '3.3.0'
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
@ -154,6 +154,8 @@
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
}(jQuery);

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: modal.js v3.2.0
* Bootstrap: modal.js v3.3.0
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -30,7 +30,7 @@
}
}
Modal.VERSION = '3.2.0'
Modal.VERSION = '3.3.0'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@ -56,10 +56,11 @@
this.isShown = true
this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')
this.setScrollbar()
this.escape()
this.resize()
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
@ -74,6 +75,9 @@
.show()
.scrollTop(0)
if (that.options.backdrop) that.adjustBackdrop()
that.adjustDialog()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
@ -108,6 +112,7 @@
this.isShown = false
this.escape()
this.resize()
$(document).off('focusin.bs.modal')
@ -143,11 +148,20 @@
}
}
Modal.prototype.resize = function () {
if (this.isShown) {
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
} else {
$(window).off('resize.bs.modal')
}
}
Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
@ -204,13 +218,43 @@
}
}
// these following methods are used to handle overflowing modals
Modal.prototype.handleUpdate = function () {
if (this.options.backdrop) this.adjustBackdrop()
this.adjustDialog()
}
Modal.prototype.adjustBackdrop = function () {
this.$backdrop
.css('height', 0)
.css('height', this.$element[0].scrollHeight)
}
Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}
Modal.prototype.resetAdjustments = function () {
this.$element.css({
paddingLeft: '',
paddingRight: ''
})
}
Modal.prototype.checkScrollbar = function () {
this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
this.scrollbarWidth = this.measureScrollbar()
}
Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
}
Modal.prototype.resetScrollbar = function () {
@ -218,7 +262,6 @@
}
Modal.prototype.measureScrollbar = function () { // thx walsh
if (document.body.clientWidth >= window.innerWidth) return 0
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: popover.js v3.2.0
* Bootstrap: popover.js v3.3.0
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -19,7 +19,7 @@
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.2.0'
Popover.VERSION = '3.3.0'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: scrollspy.js v3.2.0
* Bootstrap: scrollspy.js v3.3.0
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -30,7 +30,7 @@
this.process()
}
ScrollSpy.VERSION = '3.2.0'
ScrollSpy.VERSION = '3.3.0'
ScrollSpy.DEFAULTS = {
offset: 10

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: tab.js v3.2.0
* Bootstrap: tab.js v3.3.0
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@ -17,7 +17,7 @@
this.element = $(element)
}
Tab.VERSION = '3.2.0'
Tab.VERSION = '3.3.0'
Tab.TRANSITION_DURATION = 150
@ -141,9 +141,13 @@
// TAB DATA-API
// ============
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
})
}
$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);

View File

@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<title>Bootstrap Plugin Test Suite</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- jQuery -->
<script src="vendor/jquery.min.js"></script>
@ -12,7 +13,12 @@
<script src="vendor/qunit.js"></script>
<style>
#qunit-tests > li.pass {
display: none;/* Make it easier to see failing tests is Sauce screencasts */
display: none;/* Make it easier to see failing tests in Sauce screencasts */
}
#qunit-fixture {
top: 0;
left: 0;
}
</style>
<script>
@ -36,6 +42,7 @@
})
QUnit.testStart(function (testDetails) {
$(window).scrollTop(0)
QUnit.log = function (details) {
if (!details.result) {
details.name = testDetails.name

View File

@ -33,9 +33,9 @@ $(function () {
var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
equal($btn.html(), 'mdo', 'btn text equals mdo')
$btn.bootstrapButton('loading')
equal($btn.html(), 'fat', 'btn text equals fat')
stop()
setTimeout(function () {
equal($btn.html(), 'fat', 'btn text equals fat')
ok($btn[0].hasAttribute('disabled'), 'btn is disabled')
ok($btn.hasClass('disabled'), 'btn has disabled class')
start()
@ -46,16 +46,16 @@ $(function () {
var $btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
equal($btn.html(), 'mdo', 'btn text equals mdo')
$btn.bootstrapButton('loading')
equal($btn.html(), 'fat', 'btn text equals fat')
stop()
setTimeout(function () {
equal($btn.html(), 'fat', 'btn text equals fat')
ok($btn[0].hasAttribute('disabled'), 'btn is disabled')
ok($btn.hasClass('disabled'), 'btn has disabled class')
start()
stop()
$btn.bootstrapButton('reset')
equal($btn.html(), 'mdo', 'btn text equals mdo')
setTimeout(function () {
equal($btn.html(), 'mdo', 'btn text equals mdo')
ok(!$btn[0].hasAttribute('disabled'), 'btn is not disabled')
ok(!$btn.hasClass('disabled'), 'btn does not have disabled class')
start()
@ -67,16 +67,16 @@ $(function () {
var $btn = $('<button class="btn" data-loading-text="fat"/>')
equal($btn.html(), '', 'btn text equals ""')
$btn.bootstrapButton('loading')
equal($btn.html(), 'fat', 'btn text equals fat')
stop()
setTimeout(function () {
equal($btn.html(), 'fat', 'btn text equals fat')
ok($btn[0].hasAttribute('disabled'), 'btn is disabled')
ok($btn.hasClass('disabled'), 'btn has disabled class')
start()
stop()
$btn.bootstrapButton('reset')
equal($btn.html(), '', 'btn text equals ""')
setTimeout(function () {
equal($btn.html(), '', 'btn text equals ""')
ok(!$btn[0].hasAttribute('disabled'), 'btn is not disabled')
ok(!$btn.hasClass('disabled'), 'btn does not have disabled class')
start()

View File

@ -478,6 +478,48 @@ $(function () {
strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after left arrow press')
})
test('should ignore keyboard events within <input>s and <textarea>s', function () {
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">'
+ '<div class="carousel-inner">'
+ '<div id="first" class="item active">'
+ '<img alt="">'
+ '<input type="text" id="in-put">'
+ '<textarea id="text-area"></textarea>'
+ '</div>'
+ '<div id="second" class="item">'
+ '<img alt="">'
+ '</div>'
+ '<div id="third" class="item">'
+ '<img alt="">'
+ '</div>'
+ '</div>'
+ '</div>'
var $template = $(templateHTML)
var $input = $template.find('#in-put')
var $textarea = $template.find('#text-area')
strictEqual($input.length, 1, 'found <input>')
strictEqual($textarea.length, 1, 'found <textarea>')
$template.bootstrapCarousel()
strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item active')
$input.trigger($.Event('keydown', { which: 39 }))
strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after right arrow press in <input>')
$input.trigger($.Event('keydown', { which: 37 }))
strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after left arrow press in <input>')
$textarea.trigger($.Event('keydown', { which: 39 }))
strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after right arrow press in <textarea>')
$textarea.trigger($.Event('keydown', { which: 37 }))
strictEqual($template.find('.item')[0], $template.find('.active')[0], 'first item still active after left arrow press in <textarea>')
})
test('should only add mouseenter and mouseleave listeners when not on mobile', function () {
var isMobile = 'ontouchstart' in document.documentElement
var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false" data-pause="hover">'

View File

@ -79,7 +79,7 @@ $(function () {
$('<div id="test1"/>')
.appendTo('#qunit-fixture')
.on('show.bs.collapse', function () {
.on('shown.bs.collapse', function () {
ok(!$target.hasClass('collapsed'))
start()
})
@ -94,7 +94,7 @@ $(function () {
$('<div id="test1" class="in"/>')
.appendTo('#qunit-fixture')
.on('hide.bs.collapse', function () {
.on('hidden.bs.collapse', function () {
ok($target.hasClass('collapsed'))
start()
})
@ -137,12 +137,12 @@ $(function () {
test('should remove "collapsed" class from active accordion target', function () {
stop()
var accordionHTML = '<div id="accordion">'
+ '<div class="accordion-group"/>'
+ '<div class="accordion-group"/>'
+ '<div class="accordion-group"/>'
var accordionHTML = '<div class="panel-group" id="accordion">'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '</div>'
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.accordion-group')
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel')
var $target1 = $('<a data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0))
@ -156,7 +156,7 @@ $(function () {
$('<div id="body3"/>')
.appendTo($groups.eq(2))
.on('show.bs.collapse', function () {
.on('shown.bs.collapse', function () {
ok($target1.hasClass('collapsed'), 'inactive target 1 does have class "collapsed"')
ok($target2.hasClass('collapsed'), 'inactive target 2 does have class "collapsed"')
ok(!$target3.hasClass('collapsed'), 'active target 3 does not have class "collapsed"')
@ -170,12 +170,12 @@ $(function () {
test('should allow dots in data-parent', function () {
stop()
var accordionHTML = '<div class="accordion">'
+ '<div class="accordion-group"/>'
+ '<div class="accordion-group"/>'
+ '<div class="accordion-group"/>'
var accordionHTML = '<div class="panel-group accordion">'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '</div>'
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.accordion-group')
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel')
var $target1 = $('<a data-toggle="collapse" href="#body1" data-parent=".accordion"/>').appendTo($groups.eq(0))
@ -189,7 +189,7 @@ $(function () {
$('<div id="body3"/>')
.appendTo($groups.eq(2))
.on('show.bs.collapse', function () {
.on('shown.bs.collapse', function () {
ok($target1.hasClass('collapsed'), 'inactive target 1 does have class "collapsed"')
ok($target2.hasClass('collapsed'), 'inactive target 2 does have class "collapsed"')
ok(!$target3.hasClass('collapsed'), 'active target 3 does not have class "collapsed"')
@ -207,7 +207,7 @@ $(function () {
$('<div id="test1"/>')
.appendTo('#qunit-fixture')
.on('show.bs.collapse', function () {
.on('shown.bs.collapse', function () {
equal($target.attr('aria-expanded'), 'true', 'aria-expanded on target is "true"')
start()
})
@ -222,7 +222,7 @@ $(function () {
$('<div id="test1" class="in"/>')
.appendTo('#qunit-fixture')
.on('hide.bs.collapse', function () {
.on('hidden.bs.collapse', function () {
equal($target.attr('aria-expanded'), 'false', 'aria-expanded on target is "false"')
start()
})
@ -233,12 +233,12 @@ $(function () {
test('should change aria-expanded from active accordion target to "false" and set the newly active one to "true"', function () {
stop()
var accordionHTML = '<div id="accordion">'
+ '<div class="accordion-group"/>'
+ '<div class="accordion-group"/>'
+ '<div class="accordion-group"/>'
var accordionHTML = '<div class="panel-group" id="accordion">'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '<div class="panel"/>'
+ '</div>'
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.accordion-group')
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel')
var $target1 = $('<a data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0))
@ -252,7 +252,7 @@ $(function () {
$('<div id="body3" aria-expanded="false"/>')
.appendTo($groups.eq(2))
.on('show.bs.collapse', function () {
.on('shown.bs.collapse', function () {
equal($target1.attr('aria-expanded'), 'false', 'inactive target 1 has aria-expanded="false"')
equal($target2.attr('aria-expanded'), 'false', 'inactive target 2 has aria-expanded="false"')
equal($target3.attr('aria-expanded'), 'true', 'active target 3 has aria-expanded="false"')
@ -298,4 +298,32 @@ $(function () {
}, 1)
})
test('should add "collapsed" class to target when collapse is hidden via manual invocation', function () {
stop()
var $target = $('<a data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture')
$('<div id="test1" class="in"/>')
.appendTo('#qunit-fixture')
.on('hidden.bs.collapse', function () {
ok($target.hasClass('collapsed'))
start()
})
.bootstrapCollapse('hide')
})
test('should remove "collapsed" class from target when collapse is shown via manual invocation', function () {
stop()
var $target = $('<a data-toggle="collapse" class="collapsed" href="#test1"/>').appendTo('#qunit-fixture')
$('<div id="test1"/>')
.appendTo('#qunit-fixture')
.on('shown.bs.collapse', function () {
ok(!$target.hasClass('collapsed'))
start()
})
.bootstrapCollapse('show')
})
})

View File

@ -803,16 +803,16 @@ $(function () {
var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({ delay: 15 })
.bootstrapTooltip({ delay: 150 })
setTimeout(function () {
ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip is not faded in')
}, 10)
ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip is not faded in')
}, 100)
setTimeout(function () {
ok($('.tooltip').is('.fade.in'), '20ms: tooltip is faded in')
ok($('.tooltip').is('.fade.in'), '200ms: tooltip is faded in')
start()
}, 20)
}, 200)
$tooltip.trigger('mouseenter')
})
@ -822,17 +822,17 @@ $(function () {
var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({ delay: 15 })
.bootstrapTooltip({ delay: 150 })
setTimeout(function () {
ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in')
ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in')
$tooltip.trigger('mouseout')
}, 10)
}, 100)
setTimeout(function () {
ok(!$('.tooltip').is('.fade.in'), '20ms: tooltip not faded in')
ok(!$('.tooltip').is('.fade.in'), '200ms: tooltip not faded in')
start()
}, 20)
}, 200)
$tooltip.trigger('mouseenter')
})
@ -842,21 +842,21 @@ $(function () {
var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({ delay: { show: 0, hide: 15 }})
.bootstrapTooltip({ delay: { show: 0, hide: 150 }})
setTimeout(function () {
ok($('.tooltip').is('.fade.in'), '1ms: tooltip faded in')
$tooltip.trigger('mouseout')
setTimeout(function () {
ok($('.tooltip').is('.fade.in'), '10ms: tooltip still faded in')
ok($('.tooltip').is('.fade.in'), '100ms: tooltip still faded in')
$tooltip.trigger('mouseenter')
}, 10)
}, 100)
setTimeout(function () {
ok($('.tooltip').is('.fade.in'), '20ms: tooltip still faded in')
ok($('.tooltip').is('.fade.in'), '200ms: tooltip still faded in')
start()
}, 20)
}, 200)
}, 0)
$tooltip.trigger('mouseenter')
@ -867,17 +867,17 @@ $(function () {
var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({ delay: 15 })
.bootstrapTooltip({ delay: 150 })
setTimeout(function () {
ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in')
ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in')
$tooltip.trigger('mouseout')
}, 10)
}, 100)
setTimeout(function () {
ok(!$('.tooltip').is('.fade.in'), '20ms: tooltip not faded in')
ok(!$('.tooltip').is('.fade.in'), '200ms: tooltip not faded in')
start()
}, 20)
}, 200)
$tooltip.trigger('mouseenter')
})
@ -887,27 +887,27 @@ $(function () {
var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({ delay: { show: 15, hide: 0 }})
.bootstrapTooltip({ delay: { show: 150, hide: 0 }})
setTimeout(function () {
ok(!$('.tooltip').is('.fade.in'), '10ms: tooltip not faded in')
ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in')
$tooltip.trigger('mouseout')
}, 10)
}, 100)
setTimeout(function () {
ok(!$('.tooltip').is('.fade.in'), '25ms: tooltip not faded in')
ok(!$('.tooltip').is('.fade.in'), '250ms: tooltip not faded in')
start()
}, 25)
}, 250)
$tooltip.trigger('mouseenter')
})
test('should wait 20ms before hiding the tooltip', function () {
test('should wait 200ms before hiding the tooltip', function () {
stop()
var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({ delay: { show: 0, hide: 15 }})
.bootstrapTooltip({ delay: { show: 0, hide: 150 }})
setTimeout(function () {
ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '1ms: tooltip faded in')
@ -915,13 +915,13 @@ $(function () {
$tooltip.trigger('mouseout')
setTimeout(function () {
ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '10ms: tooltip still faded in')
}, 10)
ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '100ms: tooltip still faded in')
}, 100)
setTimeout(function () {
ok(!$tooltip.data('bs.tooltip').$tip.is('.in'), '20ms: tooltip removed')
ok(!$tooltip.data('bs.tooltip').$tip.is('.in'), '200ms: tooltip removed')
start()
}, 20)
}, 200)
}, 0)

View File

@ -1,8 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Affix</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<style>
/* Test Styles */
@ -37,6 +40,13 @@
background-color: #85144B;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,8 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Alert</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,8 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Button</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,8 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Carousel</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,8 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Collapse</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,8 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dropdown</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,8 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Modal</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,8 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Popover</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,11 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Scrollspy</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<style type="text/css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<style>
body { padding-top: 70px; }
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target=".navbar" data-offset="70">

View File

@ -1,16 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tab</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<style type="text/css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<style>
h4 {
margin: 40px 0 10px;
}
.nav-tabs {
margin-bottom: 15px;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,8 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tooltip</title>
<link rel="stylesheet" type="text/css" href="../../../dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: tooltip.js v3.2.0
* Bootstrap: tooltip.js v3.3.0
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
@ -25,7 +25,7 @@
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.2.0'
Tooltip.VERSION = '3.3.0'
Tooltip.TRANSITION_DURATION = 150

View File

@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: transition.js v3.2.0
* Bootstrap: transition.js v3.3.0
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.

View File

@ -39,11 +39,17 @@
}
// Account for badges in navs
a.list-group-item.active > &,
.list-group-item.active > &,
.nav-pills > .active > a > & {
color: @badge-active-color;
background-color: @badge-active-bg;
}
.list-group-item > & {
float: right;
}
.list-group-item > & + & {
margin-right: 5px;
}
.nav-pills > li > a > & {
margin-left: 3px;
}

View File

@ -46,7 +46,7 @@
&.disabled,
&[disabled],
fieldset[disabled] & {
cursor: not-allowed;
cursor: @cursor-disabled;
pointer-events: none; // Future-proof disabling of clicks
opacity: .65;
.box-shadow(none);

View File

@ -104,7 +104,7 @@
background-color: transparent;
background-image: none; // Remove CSS gradient
.reset-filter();
cursor: not-allowed;
cursor: @cursor-disabled;
}
}

View File

@ -142,7 +142,7 @@ output {
&[disabled],
&[readonly],
fieldset[disabled] & {
cursor: not-allowed;
cursor: @cursor-disabled;
background-color: @input-bg-disabled;
opacity: 1; // iOS fix for unreadable disabled content
}
@ -171,41 +171,28 @@ input[type="search"] {
// Special styles for iOS temporal inputs
//
// 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.
// 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, but only
// for Safari.
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
line-height: @input-height-base;
// IE9+ misaligns the text within date inputs, so we reset
line-height: @line-height-base ~"\0";
&.input-sm {
line-height: @input-height-sm;
line-height: @line-height-sm ~"\0";
@media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
line-height: @input-height-base;
}
&.input-lg {
line-height: @input-height-lg;
line-height: @line-height-lg ~"\0";
input[type="date"].input-sm,
input[type="time"].input-sm,
input[type="datetime-local"].input-sm,
input[type="month"].input-sm {
line-height: @input-height-small;
}
}
// IE 11 hack to reverse the iOS temporal input hack.
_:-ms-fullscreen, :root input[type="date"],
_:-ms-fullscreen, :root input[type="time"],
_:-ms-fullscreen, :root input[type="datetime-local"],
_:-ms-fullscreen, :root input[type="month"] {
line-height: @line-height-base;
&.input-sm {
line-height: @line-height-sm;
}
&.input-lg {
line-height: @line-height-lg;
input[type="date"].input-lg,
input[type="time"].input-lg,
input[type="datetime-local"].input-lg,
input[type="month"].input-lg {
line-height: @input-height-large;
}
}
@ -278,7 +265,7 @@ input[type="checkbox"] {
&[disabled],
&.disabled,
fieldset[disabled] & {
cursor: not-allowed;
cursor: @cursor-disabled;
}
}
// These classes are used directly on <label>s
@ -286,7 +273,7 @@ input[type="checkbox"] {
.checkbox-inline {
&.disabled,
fieldset[disabled] & {
cursor: not-allowed;
cursor: @cursor-disabled;
}
}
// These classes are used on elements with <label> descendants
@ -295,7 +282,7 @@ input[type="checkbox"] {
&.disabled,
fieldset[disabled] & {
label {
cursor: not-allowed;
cursor: @cursor-disabled;
}
}
}

View File

@ -35,14 +35,6 @@
margin-bottom: 0;
.border-bottom-radius(@list-group-border-radius);
}
// Align badges within list items
> .badge {
float: right;
}
> .badge + .badge {
margin-right: 5px;
}
}
@ -74,7 +66,7 @@ a.list-group-item {
&.disabled:focus {
background-color: @list-group-disabled-bg;
color: @list-group-disabled-color;
cursor: not-allowed;
cursor: @cursor-disabled;
// Force color to inherit for custom content
.list-group-item-heading {

View File

@ -61,10 +61,9 @@
// Modal background
.modal-backdrop {
position: fixed;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: @modal-backdrop-bg;
// Fade for backdrop

View File

@ -34,7 +34,7 @@
&:focus {
color: @nav-disabled-link-hover-color;
background-color: transparent;
cursor: not-allowed;
cursor: @cursor-disabled;
}
}
}

View File

@ -354,6 +354,7 @@
}
// Menu position and menu caret support for dropups via extra dropup class
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
.border-top-radius(@navbar-border-radius);
.border-bottom-radius(0);
}

View File

@ -48,7 +48,7 @@
> span {
color: @pager-disabled-color;
background-color: @pager-bg;
cursor: not-allowed;
cursor: @cursor-disabled;
}
}
}

View File

@ -69,7 +69,7 @@
color: @pagination-disabled-color;
background-color: @pagination-disabled-bg;
border-color: @pagination-disabled-border;
cursor: not-allowed;
cursor: @cursor-disabled;
}
}
}

View File

@ -12,6 +12,7 @@
max-width: @popover-max-width;
padding: 1px;
// Reset font and text propertes given new insertion method
font-family: @font-family-base;
font-size: @font-size-base;
font-weight: normal;
line-height: @line-height-base;

View File

@ -9,7 +9,10 @@
z-index: @zindex-tooltip;
display: block;
visibility: visible;
// Reset font and text propertes given new insertion method
font-family: @font-family-base;
font-size: @font-size-sm;
font-weight: normal;
line-height: 1.4;
opacity: 0;
@ -39,6 +42,7 @@
border-color: transparent;
border-style: solid;
}
// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
.tooltip {
&.top .tooltip-arrow {
bottom: 0;
@ -49,13 +53,15 @@
}
&.top-left .tooltip-arrow {
bottom: 0;
left: @tooltip-arrow-width;
right: @tooltip-arrow-width;
margin-bottom: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
}
&.top-right .tooltip-arrow {
bottom: 0;
right: @tooltip-arrow-width;
left: @tooltip-arrow-width;
margin-bottom: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
}
@ -82,13 +88,15 @@
}
&.bottom-left .tooltip-arrow {
top: 0;
left: @tooltip-arrow-width;
right: @tooltip-arrow-width;
margin-top: -@tooltip-arrow-width;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
}
&.bottom-right .tooltip-arrow {
top: 0;
right: @tooltip-arrow-width;
left: @tooltip-arrow-width;
margin-top: -@tooltip-arrow-width;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
}

View File

@ -219,6 +219,9 @@
//** Border color for textual input addons
@input-group-addon-border-color: @input-border;
//** Disabled cursor for form controls and buttons.
@cursor-disabled: not-allowed;
//== Dropdowns
//

View File

@ -5,7 +5,7 @@
.make-grid-columns() {
// Common styles for all sizes of grid columns, widths 1-12
.col(@index) when (@index = 1) { // initial
.col(@index) { // initial
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col((@index + 1), @item);
}
@ -27,7 +27,7 @@
}
.float-grid-columns(@class) {
.col(@index) when (@index = 1) { // initial
.col(@index) { // initial
@item: ~".col-@{class}-@{index}";
.col((@index + 1), @item);
}

View File

@ -1,7 +1,7 @@
{
"name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"version": "3.2.0",
"version": "3.3.0",
"keywords": [
"css",
"less",
@ -56,8 +56,8 @@
"grunt-saucelabs": "~8.3.2",
"grunt-sed": "~0.1.1",
"load-grunt-tasks": "~1.0.0",
"markdown": "~0.5.0",
"npm-shrinkwrap": "~4.0.0",
"remarkable": "^1.2.2",
"time-grunt": "~1.0.0"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "bootstrap",
"version": "3.2.0",
"version": "3.3.0",
"npm-shrinkwrap-version": "4.0.0",
"dependencies": {
"btoa": {
@ -244,8 +244,8 @@
"resolved": "https://registry.npmjs.org/autoprefixer-core/-/autoprefixer-core-3.1.2.tgz",
"dependencies": {
"caniuse-db": {
"version": "1.0.30000011",
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000011.tgz"
"version": "1.0.30000014",
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000014.tgz"
},
"postcss": {
"version": "2.2.5",
@ -1172,8 +1172,8 @@
"resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz"
},
"jshint": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/jshint/-/jshint-2.5.6.tgz",
"version": "2.5.7",
"resolved": "https://registry.npmjs.org/jshint/-/jshint-2.5.7.tgz",
"dependencies": {
"cli": {
"version": "0.6.5",
@ -1604,8 +1604,8 @@
"resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz"
},
"phantomjs": {
"version": "1.9.11",
"resolved": "https://registry.npmjs.org/phantomjs/-/phantomjs-1.9.11.tgz",
"version": "1.9.12",
"resolved": "https://registry.npmjs.org/phantomjs/-/phantomjs-1.9.12.tgz",
"dependencies": {
"adm-zip": {
"version": "0.4.4",
@ -1626,8 +1626,8 @@
}
},
"ncp": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/ncp/-/ncp-0.6.0.tgz"
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz"
},
"npmconf": {
"version": "2.0.9",
@ -2173,6 +2173,10 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.0.tgz"
},
"vow": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/vow/-/vow-0.4.4.tgz"
},
"vow-queue": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/vow-queue/-/vow-queue-0.3.1.tgz"
@ -3181,22 +3185,6 @@
}
}
},
"markdown": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/markdown/-/markdown-0.5.0.tgz",
"dependencies": {
"nopt": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-2.1.2.tgz",
"dependencies": {
"abbrev": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.5.tgz"
}
}
}
}
},
"npm-shrinkwrap": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/npm-shrinkwrap/-/npm-shrinkwrap-4.0.0.tgz",
@ -3863,6 +3851,184 @@
}
}
},
"remarkable": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.3.0.tgz",
"dependencies": {
"argparse": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.15.tgz",
"dependencies": {
"underscore": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz"
},
"underscore.string": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz"
}
}
},
"autolinker": {
"version": "0.12.3",
"resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.12.3.tgz"
},
"coveralls": {
"version": "2.11.2",
"resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.11.2.tgz",
"dependencies": {
"js-yaml": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.0.1.tgz",
"dependencies": {
"argparse": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.15.tgz",
"dependencies": {
"underscore": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz"
},
"underscore.string": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz"
}
}
},
"esprima": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz"
}
}
},
"lcov-parse": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.6.tgz"
},
"log-driver": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.4.tgz"
},
"request": {
"version": "2.40.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.40.0.tgz",
"dependencies": {
"aws-sign2": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz"
},
"forever-agent": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz"
},
"form-data": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz",
"dependencies": {
"async": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz"
},
"combined-stream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.5.tgz",
"dependencies": {
"delayed-stream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz"
}
}
},
"mime": {
"version": "1.2.11",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz"
}
}
},
"hawk": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz",
"dependencies": {
"boom": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz"
},
"cryptiles": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz"
},
"hoek": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
},
"sntp": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz"
}
}
},
"http-signature": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz",
"dependencies": {
"asn1": {
"version": "0.1.11",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
},
"assert-plus": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz"
},
"ctype": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz"
}
}
},
"json-stringify-safe": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz"
},
"mime-types": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz"
},
"node-uuid": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.1.tgz"
},
"oauth-sign": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz"
},
"qs": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-1.0.2.tgz"
},
"stringstream": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.4.tgz"
},
"tough-cookie": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz",
"dependencies": {
"punycode": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz"
}
}
},
"tunnel-agent": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz"
}
}
}
}
}
}
},
"time-grunt": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/time-grunt/-/time-grunt-1.0.0.tgz",