From 2a43e7e78a59c70e217383c12c9ef0482cabb163 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 16 Mar 2014 19:03:53 -0700 Subject: [PATCH] Break up docs into includes --- dist/js/bootstrap.js | 4 +- dist/js/bootstrap.min.js | 2 +- docs/_includes/components/alerts.html | 85 + docs/_includes/components/badges.html | 61 + docs/_includes/components/breadcrumbs.html | 27 + .../components/button-dropdowns.html | 321 ++ docs/_includes/components/button-groups.html | 261 ++ docs/_includes/components/dropdowns.html | 106 + docs/_includes/components/glyphicons.html | 52 + docs/_includes/components/input-groups.html | 311 ++ docs/_includes/components/jumbotron.html | 27 + docs/_includes/components/labels.html | 35 + docs/_includes/components/list-group.html | 167 + docs/_includes/components/media.html | 116 + docs/_includes/components/navbar.html | 435 ++ docs/_includes/components/navs.html | 181 + docs/_includes/components/page-header.html | 15 + docs/_includes/components/pagination.html | 153 + docs/_includes/components/panels.html | 278 ++ docs/_includes/components/progress-bars.html | 210 + .../components/responsive-embed.html | 23 + docs/_includes/components/thumbnails.html | 93 + docs/_includes/components/wells.html | 33 + docs/_includes/css/buttons.html | 178 + docs/_includes/css/code.html | 50 + docs/_includes/css/forms.html | 651 +++ docs/_includes/css/grid.html | 543 +++ docs/_includes/css/helpers.html | 197 + docs/_includes/css/images.html | 26 + docs/_includes/css/less.html | 499 +++ docs/_includes/css/overview.html | 52 + docs/_includes/css/responsive-utilities.html | 258 ++ docs/_includes/css/rtl.html | 20 + docs/_includes/css/sass.html | 52 + docs/_includes/css/tables.html | 450 +++ docs/_includes/css/type.html | 448 +++ .../getting-started/accessibility.html | 26 + .../browser-device-support.html | 187 + docs/_includes/getting-started/community.html | 12 + .../disabling-responsiveness.html | 22 + docs/_includes/getting-started/download.html | 46 + docs/_includes/getting-started/examples.html | 159 + docs/_includes/getting-started/license.html | 34 + docs/_includes/getting-started/template.html | 36 + .../getting-started/third-party-support.html | 51 + .../getting-started/translations.html | 16 + .../getting-started/whats-included.html | 49 + docs/_includes/js/affix.html | 108 + docs/_includes/js/buttons.html | 153 + docs/_includes/js/carousel.html | 225 ++ docs/_includes/js/collapse.html | 222 ++ docs/_includes/js/dropdowns.html | 177 + docs/_includes/js/modal.html | 333 ++ docs/_includes/js/overview.html | 71 + docs/_includes/js/popovers.html | 341 ++ docs/_includes/js/scrollspy.html | 142 + docs/_includes/js/tabs.html | 144 + docs/_includes/js/tooltips.html | 200 + docs/_includes/js/transitions.html | 8 + docs/_includes/nav-getting-started.html | 3 - docs/assets/css/docs.min.css | 2 +- docs/assets/js/customize.min.js | 2 +- docs/components.html | 3114 +-------------- docs/css.html | 3501 +---------------- docs/dist/js/bootstrap.min.js | 2 +- docs/getting-started.html | 773 +--- docs/javascript.html | 2194 +---------- 67 files changed, 9239 insertions(+), 9534 deletions(-) create mode 100644 docs/_includes/components/alerts.html create mode 100644 docs/_includes/components/badges.html create mode 100644 docs/_includes/components/breadcrumbs.html create mode 100644 docs/_includes/components/button-dropdowns.html create mode 100644 docs/_includes/components/button-groups.html create mode 100644 docs/_includes/components/dropdowns.html create mode 100644 docs/_includes/components/glyphicons.html create mode 100644 docs/_includes/components/input-groups.html create mode 100644 docs/_includes/components/jumbotron.html create mode 100644 docs/_includes/components/labels.html create mode 100644 docs/_includes/components/list-group.html create mode 100644 docs/_includes/components/media.html create mode 100644 docs/_includes/components/navbar.html create mode 100644 docs/_includes/components/navs.html create mode 100644 docs/_includes/components/page-header.html create mode 100644 docs/_includes/components/pagination.html create mode 100644 docs/_includes/components/panels.html create mode 100644 docs/_includes/components/progress-bars.html create mode 100644 docs/_includes/components/responsive-embed.html create mode 100644 docs/_includes/components/thumbnails.html create mode 100644 docs/_includes/components/wells.html create mode 100644 docs/_includes/css/buttons.html create mode 100644 docs/_includes/css/code.html create mode 100644 docs/_includes/css/forms.html create mode 100644 docs/_includes/css/grid.html create mode 100644 docs/_includes/css/helpers.html create mode 100644 docs/_includes/css/images.html create mode 100644 docs/_includes/css/less.html create mode 100644 docs/_includes/css/overview.html create mode 100644 docs/_includes/css/responsive-utilities.html create mode 100644 docs/_includes/css/rtl.html create mode 100644 docs/_includes/css/sass.html create mode 100644 docs/_includes/css/tables.html create mode 100644 docs/_includes/css/type.html create mode 100644 docs/_includes/getting-started/accessibility.html create mode 100644 docs/_includes/getting-started/browser-device-support.html create mode 100644 docs/_includes/getting-started/community.html create mode 100644 docs/_includes/getting-started/disabling-responsiveness.html create mode 100644 docs/_includes/getting-started/download.html create mode 100644 docs/_includes/getting-started/examples.html create mode 100644 docs/_includes/getting-started/license.html create mode 100644 docs/_includes/getting-started/template.html create mode 100644 docs/_includes/getting-started/third-party-support.html create mode 100644 docs/_includes/getting-started/translations.html create mode 100644 docs/_includes/getting-started/whats-included.html create mode 100644 docs/_includes/js/affix.html create mode 100644 docs/_includes/js/buttons.html create mode 100644 docs/_includes/js/carousel.html create mode 100644 docs/_includes/js/collapse.html create mode 100644 docs/_includes/js/dropdowns.html create mode 100644 docs/_includes/js/modal.html create mode 100644 docs/_includes/js/overview.html create mode 100644 docs/_includes/js/popovers.html create mode 100644 docs/_includes/js/scrollspy.html create mode 100644 docs/_includes/js/tabs.html create mode 100644 docs/_includes/js/tooltips.html create mode 100644 docs/_includes/js/transitions.html diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index e389c19604..5f95f74e8e 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -1054,7 +1054,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re animation: true, placement: 'top', selector: false, - template: '
', + template: '', trigger: 'hover focus', title: '', delay: 0, @@ -1600,7 +1600,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ScrollSpy.prototype.process = function () { var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight + var scrollHeight = this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) var maxScroll = scrollHeight - this.$scrollElement.height() var offsets = this.offsets var targets = this.targets diff --git a/dist/js/bootstrap.min.js b/dist/js/bootstrap.min.js index b94dd03cfb..11cb5363e4 100644 --- a/dist/js/bootstrap.min.js +++ b/dist/js/bootstrap.min.js @@ -3,4 +3,4 @@ * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(a){a&&a.target!=this.$element[0]||(this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse"))};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(a){a&&a.target!=this.$element[0]||(this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse"))};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle="collapse"][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e='[data-toggle="dropdown"]',f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(a){a&&a.target!=this.$element[0]||(this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse"))};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(a){a&&a.target!=this.$element[0]||(this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse"))};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle="collapse"][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e='[data-toggle="dropdown"]',f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight),d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/docs/_includes/components/alerts.html b/docs/_includes/components/alerts.html new file mode 100644 index 0000000000..063c52cd5b --- /dev/null +++ b/docs/_includes/components/alerts.html @@ -0,0 +1,85 @@ +
+

Alerts

+ +

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the alerts jQuery plugin.

+ +

Examples

+

Wrap any text and an optional dismiss button in .alert and one of the four contextual classes (e.g., .alert-success) for basic alert messages.

+ +
+

No default class

+

Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.

+
+ +
+ + + + +
+{% highlight html %} + + + + +{% endhighlight %} + +

Dismissable alerts

+

Build on any alert by adding an optional .alert-dismissable and close button.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +
+

Ensure proper behavior across all devices

+

Be sure to use the <button> element with the data-dismiss="alert" data attribute.

+
+ + +

Use the .alert-link utility class to quickly provide matching colored links within any alert.

+
+ + + + +
+{% highlight html %} + + + + +{% endhighlight %} +
diff --git a/docs/_includes/components/badges.html b/docs/_includes/components/badges.html new file mode 100644 index 0000000000..daa0636cb8 --- /dev/null +++ b/docs/_includes/components/badges.html @@ -0,0 +1,61 @@ +
+

Badges

+ +

Easily highlight new or unread items by adding a <span class="badge"> to links, Bootstrap navs, and more.

+ +
+ Inbox 42 +
+{% highlight html %} +Inbox 42 +{% endhighlight %} + +

Self collapsing

+

When there are no new or unread items, badges will simply collapse (via CSS's :empty selector) provided no content exists within.

+ +
+

Cross-browser compatibility

+

Badges won't self collapse in Internet Explorer 8 because it lacks support for the :empty selector.

+
+ +

Adapts to active nav states

+

Built-in styles are included for placing badges in active states in pill navigations.

+
+ +
+ +
+ +
+{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/breadcrumbs.html b/docs/_includes/components/breadcrumbs.html new file mode 100644 index 0000000000..19abdc265e --- /dev/null +++ b/docs/_includes/components/breadcrumbs.html @@ -0,0 +1,27 @@ +
+

Breadcrumbs

+ +

Indicate the current page's location within a navigational hierarchy.

+

Separators are automatically added in CSS through :before and content.

+
+ + + +
+{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/button-dropdowns.html b/docs/_includes/components/button-dropdowns.html new file mode 100644 index 0000000000..d4ae0450f4 --- /dev/null +++ b/docs/_includes/components/button-dropdowns.html @@ -0,0 +1,321 @@ +
+

Button dropdowns

+ +

Use any button to trigger a dropdown menu by placing it within a .btn-group and providing the proper menu markup.

+ +
+

Plugin dependency

+

Button dropdowns require the dropdown plugin to be included in your version of Bootstrap.

+
+ +

Single button dropdowns

+

Turn a button into a dropdown toggle with some basic markup changes.

+ +{% highlight html %} + + +{% endhighlight %} + +

Split button dropdowns

+

Similarly, create split button dropdowns with the same markup changes, only with a separate button.

+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+{% highlight html %} + +
+ + + +
+{% endhighlight %} + +

Sizing

+

Button dropdowns work with buttons of all sizes.

+
+ + + +
+{% highlight html %} + +
+ + +
+ + +
+ + +
+ + +
+ + +
+{% endhighlight %} + +

Dropup variation

+

Trigger dropdown menus above elements by adding .dropup to the parent.

+
+ +
+{% highlight html %} +
+ + + +
+{% endhighlight %} +
diff --git a/docs/_includes/components/button-groups.html b/docs/_includes/components/button-groups.html new file mode 100644 index 0000000000..b2f7005282 --- /dev/null +++ b/docs/_includes/components/button-groups.html @@ -0,0 +1,261 @@ +
+

Button groups

+ +

Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with our buttons plugin.

+ +
+

Tooltips & popovers in button groups require special setting

+

When using tooltips or popovers on elements within a .btn-group, you'll have to specify the option container: 'body' to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).

+
+ +

Basic example

+

Wrap a series of buttons with .btn in .btn-group.

+
+
+ + + +
+
+{% highlight html %} +
+ + + +
+{% endhighlight %} + +

Button toolbar

+

Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex components.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +

Sizing

+

Instead of applying button sizing classes to every button in a group, just add .btn-group-* to the .btn-group.

+
+ + + + +
+{% highlight html %} +
...
+
...
+
...
+
...
+{% endhighlight %} + +

Nesting

+

Place a .btn-group within another .btn-group when you want dropdown menus mixed with a series of buttons.

+
+
+ + + +
+ + +
+
+
+{% highlight html %} +
+ + + +
+ + +
+
+{% endhighlight %} + +

Vertical variation

+

Make a set of buttons appear vertically stacked rather than horizontally. Split button dropdowns are not supported here.

+
+
+ + +
+ + +
+ + +
+ + +
+
+ + +
+
+ + +
+
+
+{% highlight html %} +
+ ... +
+{% endhighlight %} + +

Justified button groups

+

Make a group of buttons stretch at equal sizes to span the entire width of its parent. Also works with button dropdowns within the button group.

+ +
+

Handling borders

+

Due to the specific HTML and CSS used to justify buttons (namely display: table-cell), the borders between them are doubled. In regular button groups, margin-left: -1px is used to stack the borders instead of removing them. However, margin doesn't work with display: table-cell. As a result, depending on your customizations to Bootstrap, you may wish to remove or re-color the borders.

+
+
+

IE8 and borders

+

Internet Explorer 8 doesn't render borders in on buttons in a justified button group, whether it's on <a> or <button> elements. To get around that, wrap each button in another .btn-group.

+

See #12476 for more information.

+
+ +

With <a> elements

+

Just wrap a series of .btns in .btn-group.btn-group-justified.

+ +{% highlight html %} +
+ ... +
+{% endhighlight %} + +

With <button> elements

+

To use justified button groups with <button> elements, you must wrap each button in a button group. Most browsers don't properly apply our CSS for justification to <button> elements, but since we support button dropdowns, we can workaround that.

+
+
+
+ +
+
+ +
+
+ +
+
+
+{% highlight html %} +
+
+ +
+
+ +
+
+ +
+
+{% endhighlight %} +
diff --git a/docs/_includes/components/dropdowns.html b/docs/_includes/components/dropdowns.html new file mode 100644 index 0000000000..6e44c45ba4 --- /dev/null +++ b/docs/_includes/components/dropdowns.html @@ -0,0 +1,106 @@ +
+

Dropdowns

+ +

Toggleable, contextual menu for displaying lists of links. Made interactive with the dropdown JavaScript plugin.

+ + +

Wrap the dropdown's trigger and the dropdown menu within .dropdown, or another element that declares position: relative;. Then add the menu's HTML.

+
+ +
+{% highlight html %} + +{% endhighlight %} + + +

By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add .dropdown-menu-right to a .dropdown-menu to right align the dropdown menu.

+
+

May require additional positioning

+

Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain overflow properties or appear out of bounds of the viewport. Address these issues on your own as they arise.

+
+
+

Deprecated .pull-right alignment

+

As of v3.1.0, we've deprecated .pull-right on dropdown menus. To right-align a menu, use .dropdown-menu-right. Right-aligned nav components in the navbar use a mixin version of this class to automatically align the menu. To override it, use .dropdown-menu-left.

+
+{% highlight html %} + +{% endhighlight %} + + +

Add a header to label sections of actions in any dropdown menu.

+
+ +
+{% highlight html %} + +{% endhighlight %} + + +

Add .disabled to a <li> in the dropdown to disable the link.

+
+ +
+{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/glyphicons.html b/docs/_includes/components/glyphicons.html new file mode 100644 index 0000000000..6900e0dfa4 --- /dev/null +++ b/docs/_includes/components/glyphicons.html @@ -0,0 +1,52 @@ +
+

Glyphicons

+ +

Available glyphs

+

Includes 200 glyphs in font format from the Glyphicon Halflings set. Glyphicons Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, we only ask that you include a link back to Glyphicons whenever possible.

+
+
    + {% for iconClassName in site.data.glyphicons %} +
  • + + glyphicon {{ iconClassName }} +
  • + {% endfor %} +
+
+ + +

How to use

+

For performance reasons, all icons require a base class and individual icon class. To use, place the following code just about anywhere. Be sure to leave a space between the icon and text for proper padding.

+
+

Don't mix with other components

+

Icon classes cannot be directly combined with other components. They should not be used along with other classes on the same element. Instead, add a nested <span> and apply the icon classes to the <span>.

+
+{% highlight html %} + +{% endhighlight %} + + +

Examples

+

Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

+
+ + +
+{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/input-groups.html b/docs/_includes/components/input-groups.html new file mode 100644 index 0000000000..e7ea9c0646 --- /dev/null +++ b/docs/_includes/components/input-groups.html @@ -0,0 +1,311 @@ +
+

Input groups

+ +

Extend form controls by adding text or buttons before, after, or on both sides of any text-based input. Use .input-group with an .input-group-addon to prepend or append elements to a single .form-control.

+ +
+

Cross-browser compatibility

+

Avoid using <select> elements here as they cannot be fully styled in WebKit browsers.

+
+
+

Tooltips & popovers in input groups require special setting

+

When using tooltips or popovers on elements within an .input-group, you'll have to specify the option container: 'body' to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).

+
+
+

Don't mix with other components

+

Do not mix form groups or grid column classes directly with input groups. Instead, nest the input group inside of the form group or grid-related element.

+
+ + +

Basic example

+

Place one add-on or button on either side of an input. You may also place one on both sides of an input.

+

We do not support multiple add-ons on a single side.

+

We do not support multiple form-controls in a single input group.

+
+
+ @ + +
+
+
+ + .00 +
+
+
+ $ + + .00 +
+
+{% highlight html %} +
+ @ + +
+ +
+ + .00 +
+ +
+ $ + + .00 +
+{% endhighlight %} + +

Sizing

+

Add the relative form sizing classes to the .input-group itself and contents within will automatically resize—no need for repeating the form control size classes on each element.

+
+
+ @ + +
+
+
+ @ + +
+
+
+ @ + +
+
+{% highlight html %} +
+ @ + +
+ +
+ @ + +
+ +
+ @ + +
+{% endhighlight %} + + +

Checkboxes and radio addons

+

Place any checkbox or radio option within an input group's addon instead of text.

+
+
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+
+{% highlight html %} +
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+{% endhighlight %} + + +

Button addons

+

Buttons in input groups are a bit different and require one extra level of nesting. Instead of .input-group-addon, you'll need to use .input-group-btn to wrap the buttons. This is required due to default browser styles that cannot be overridden.

+
+
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+
+{% highlight html %} +
+
+
+ + + + +
+
+
+
+ + + + +
+
+
+{% endhighlight %} + +

Buttons with dropdowns

+

+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+{% highlight html %} +
+
+
+ + +
+
+
+
+ + +
+
+
+{% endhighlight %} + +

Segmented buttons

+
+
+
+
+
+ + + +
+ +
+
+
+
+ +
+ + + +
+
+
+
+
+{% highlight html %} +
+
+ +
+ +
+ +
+ +
+ +
+
+{% endhighlight %} +
diff --git a/docs/_includes/components/jumbotron.html b/docs/_includes/components/jumbotron.html new file mode 100644 index 0000000000..4c6bdb7391 --- /dev/null +++ b/docs/_includes/components/jumbotron.html @@ -0,0 +1,27 @@ +
+

Jumbotron

+ +

A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site.

+
+
+

Hello, world!

+

This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

+

Learn more

+
+
+{% highlight html %} +
+

Hello, world!

+

...

+

Learn more

+
+{% endhighlight %} +

To make the jumbotron full width, and without rounded corners, place it outside all .containers and instead add a .container within.

+{% highlight html %} +
+
+ ... +
+
+{% endhighlight %} +
diff --git a/docs/_includes/components/labels.html b/docs/_includes/components/labels.html new file mode 100644 index 0000000000..bc2d5f9a25 --- /dev/null +++ b/docs/_includes/components/labels.html @@ -0,0 +1,35 @@ +
+

Labels

+ +

Example

+
+

Example heading New

+

Example heading New

+

Example heading New

+

Example heading New

+
Example heading New
+
Example heading New
+
+{% highlight html %} +

Example heading New

+{% endhighlight %} + +

Available variations

+

Add any of the below mentioned modifier classes to change the appearance of a label.

+
+ Default + Primary + Success + Info + Warning + Danger +
+{% highlight html %} +Default +Primary +Success +Info +Warning +Danger +{% endhighlight %} +
diff --git a/docs/_includes/components/list-group.html b/docs/_includes/components/list-group.html new file mode 100644 index 0000000000..f9c24c6768 --- /dev/null +++ b/docs/_includes/components/list-group.html @@ -0,0 +1,167 @@ +
+

List group

+ +

List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.

+ +

Basic example

+

The most basic list group is simply an unordered list with list items, and the proper classes. Build upon it with the options that follow, or your own CSS as needed.

+
+
    +
  • Cras justo odio
  • +
  • Dapibus ac facilisis in
  • +
  • Morbi leo risus
  • +
  • Porta ac consectetur ac
  • +
  • Vestibulum at eros
  • +
+
+{% highlight html %} + +{% endhighlight %} + +

Badges

+

Add the badges component to any list group item and it will automatically be positioned on the right.

+
+
    +
  • + 14 + Cras justo odio +
  • +
  • + 2 + Dapibus ac facilisis in +
  • +
  • + 1 + Morbi leo risus +
  • +
+
+{% highlight html %} + +{% endhighlight %} + +

Linked items

+

Linkify list group items by using anchor tags instead of list items (that also means a parent <div> instead of an <ul>). No need for individual parents around each element.

+ +{% highlight html %} + +{% endhighlight %} + +

Disabled items

+

Add .disabled to a .list-group-item to gray it out to appear disabled.

+ +{% highlight html %} + +{% endhighlight %} + +

Contextual classes

+

Use contextual classes to style list items, default or linked. Also includes .active state.

+
+
+
+
    +
  • Dapibus ac facilisis in
  • +
  • Cras sit amet nibh libero
  • +
  • Porta ac consectetur ac
  • +
  • Vestibulum at eros
  • +
+
+ +
+
+{% highlight html %} + + +{% endhighlight %} + +

Custom content

+

Add nearly any HTML within, even for linked list groups like the one below.

+ +{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/media.html b/docs/_includes/components/media.html new file mode 100644 index 0000000000..57aee1e1dc --- /dev/null +++ b/docs/_includes/components/media.html @@ -0,0 +1,116 @@ +
+

Media object

+ +

Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.

+ +

Default media

+

The default media allow to float a media object (images, video, audio) to the left or right of a content block.

+
+
+ + Generic placeholder image + +
+

Media heading

+ 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. +
+
+
+ + Generic placeholder image + +
+

Media heading

+ 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. +
+ + Generic placeholder image + +
+

Nested media heading

+ 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. +
+
+
+
+
+{% highlight html %} +
+ + ... + +
+

Media heading

+ ... +
+
+{% endhighlight %} + +

Media list

+

With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).

+
+
    +
  • + + Generic placeholder image + +
    +

    Media heading

    +

    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.

    + +
    + + Generic placeholder image + +
    +

    Nested media heading

    + 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. + +
    + + Generic placeholder image + +
    +

    Nested media heading

    + 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. +
    +
    +
    +
    + +
    + + Generic placeholder image + +
    +

    Nested media heading

    + 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. +
    +
    +
    +
  • +
  • + + Generic placeholder image + +
    +

    Media heading

    + 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. +
    +
  • +
+
+{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/navbar.html b/docs/_includes/components/navbar.html new file mode 100644 index 0000000000..ab78e58536 --- /dev/null +++ b/docs/_includes/components/navbar.html @@ -0,0 +1,435 @@ +
+

Navbar

+ + +

Navbars are responsive meta components that serve as navigation headers for your application or site. They begin collapsed (and are toggleable) in mobile views and become horizontal as the available viewport width increases.

+ +
+

Overflowing content

+

Since Bootstrap doesn't know how much space the content in your navbar needs, you might run into issues with content wrapping into a second row. To resolve this, you can:

+
    +
  1. Reduce the amount or width of navbar items.
  2. +
  3. Hide certain navbar items at certain screen sizes using responsive utility classes.
  4. +
  5. Change the point at which your navbar switches between collapsed and horizontal mode. Customize the @grid-float-breakpoint variable or add your own media query.
  6. +
+
+
+

Requires JavaScript

+

If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossible to expand the navbar and view the content within the .navbar-collapse.

+
+ +
+ +
+{% highlight html %} + +{% endhighlight %} + +
+

Plugin dependency

+

The responsive navbar requires the collapse plugin to be included in your version of Bootstrap.

+
+ +
+

Make navbars accessible

+

Be sure to add a role="navigation" to every navbar to help with accessibility.

+
+ + + +

Place form content within .navbar-form for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to decide where it resides within the navbar content.

+

As a heads up, .navbar-form shares much of its code with .form-inline via mixin. Some form controls, like input groups, may require fixed widths to be show up properly within a navbar.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +
+

Mobile device caveats

+

There are some caveats regarding using form controls within fixed elements on mobile devices. See our browser support docs for details.

+
+ +
+

Always add labels

+

Screen readers will have trouble with your forms if you don't include a label for every input. For these inline navbar forms, you can hide the labels using the .sr-only class.

+
+ + + +

Add the .navbar-btn class to <button> elements not residing in a <form> to vertically center them in the navbar.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +
+

Context-specific usage

+

Like the standard button classes, .navbar-btn can be used on <a> and <input> elements. However, neither .navbar-btn nor the standard button classes should be used on <a> elements within .navbar-nav.

+
+ + +

Wrap strings of text in an element with .navbar-text, usually on a <p> tag for proper leading and color.

+
+ +
+{% highlight html %} + +{% endhighlight %} + + + +

For folks using standard links that are not within the regular navbar navigation component, use the .navbar-link class to add the proper colors for the default and inverse navbar options.

+
+ +
+{% highlight html %} + +{% endhighlight %} + + + +

Align nav links, forms, buttons, or text, using the .navbar-left or .navbar-right utility classes. Both classes will add a CSS float in the specified direction. For example, to align nav links, put them in a separate <ul> with the respective utility class applied.

+

These classes are mixin-ed versions of .pull-left and .pull-right, but they're scoped to media queries for easier handling of navbar components across device sizes.

+
+

Right aligning multiple components

+

Navbars currently have a limitation with multiple .navbar-right classes. To properly space content, we use negative margin on the last .navbar-right element. When there are multiple elements using that class, these margins don't work as intended.

+

We'll revisit this when we can rewrite that component in v4.

+
+ + + +

Add .navbar-fixed-top and include a .container or .container-fluid to center and pad navbar content.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +
+

Body padding required

+

The fixed navbar will overlay your other content, unless you add padding to the top of the <body>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.

+{% highlight scss %} +body { padding-top: 70px; } +{% endhighlight %} +

Make sure to include this after the core Bootstrap CSS.

+
+ + + +

Add .navbar-fixed-bottom and include a .container or .container-fluid to center and pad navbar content.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +
+

Body padding required

+

The fixed navbar will overlay your other content, unless you add padding to the bottom of the <body>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.

+{% highlight scss %} +body { padding-bottom: 70px; } +{% endhighlight %} +

Make sure to include this after the core Bootstrap CSS.

+
+ + + +

Create a full-width navbar that scrolls away with the page by adding .navbar-static-top and include a .container or .container-fluid to center and pad navbar content.

+

Unlike the .navbar-fixed-* classes, you do not need to change any padding on the body.

+
+ +
+{% highlight html %} + +{% endhighlight %} + + + +

Modify the look of the navbar by adding .navbar-inverse.

+
+ +
+{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/navs.html b/docs/_includes/components/navs.html new file mode 100644 index 0000000000..9cad335d0a --- /dev/null +++ b/docs/_includes/components/navs.html @@ -0,0 +1,181 @@ +
+

Navs

+ +

Navs available in Bootstrap have shared markup, starting with the base .nav class, as well as shared states. Swap modifier classes to switch between each style.

+ + +

Note the .nav-tabs class requires the .nav base class.

+
+ +
+{% highlight html %} + +{% endhighlight %} +
+

Requires JavaScript tabs plugin

+

For tabs with tabbable areas, you must use the tabs JavaScript plugin.

+
+ + +

Take that same HTML, but use .nav-pills instead:

+
+ +
+{% highlight html %} + +{% endhighlight %} +

Pills are also vertically stackable. Just add .nav-stacked.

+
+ +
+{% highlight html %} + +{% endhighlight %} + + + +

Easily make tabs or pills equal widths of their parent at screens wider than 768px with .nav-justified. On smaller screens, the nav links are stacked.

+
+

Safari and responsive justified navs

+

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. This bug is also shown in the justified nav example.

+
+
+ +
+ +
+{% highlight html %} + + +{% endhighlight %} + + + +

For any nav component (tabs or pills), add .disabled for gray links and no hover effects.

+ +
+

Link functionality not impacted

+

This class will only change the <a>'s appearance, not its functionality. Use custom JavaScript to disable links here.

+
+ + +{% highlight html %} + +{% endhighlight %} + + + +

Add dropdown menus with a little extra HTML and the dropdowns JavaScript plugin.

+ +

Tabs with dropdowns

+ +{% highlight html %} + +{% endhighlight %} + +

Pills with dropdowns

+ +{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/page-header.html b/docs/_includes/components/page-header.html new file mode 100644 index 0000000000..2f5aed2bd7 --- /dev/null +++ b/docs/_includes/components/page-header.html @@ -0,0 +1,15 @@ +
+

Page header

+ +

A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1's default small element, as well as most other components (with additional styles).

+
+ +
+{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/pagination.html b/docs/_includes/components/pagination.html new file mode 100644 index 0000000000..09f0bbc950 --- /dev/null +++ b/docs/_includes/components/pagination.html @@ -0,0 +1,153 @@ +
+

Pagination

+ +

Provide pagination links for your site or app with the multi-page pagination component, or the simpler pager alternative.

+ +

Default pagination

+

Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +

Disabled and active states

+

Links are customizable for different circumstances. Use .disabled for unclickable links and .active to indicate the current page.

+
+ +
+{% highlight html %} + +{% endhighlight %} +

You can optionally swap out active or disabled anchors for <span> to remove click functionality while retaining intended styles.

+{% highlight html %} + +{% endhighlight %} + + +

Sizing

+

Fancy larger or smaller pagination? Add .pagination-lg or .pagination-sm for additional sizes.

+
+
+ +
+
+ +
+
+ +
+
+{% highlight html %} + + + +{% endhighlight %} + + +

Pager

+

Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.

+ +

Default example

+

By default, the pager centers links.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +

Aligned links

+

Alternatively, you can align each link to the sides:

+
+ +
+{% highlight html %} + +{% endhighlight %} + + +

Optional disabled state

+

Pager links also use the general .disabled utility class from the pagination.

+
+ +
+{% highlight html %} + +{% endhighlight %} +
diff --git a/docs/_includes/components/panels.html b/docs/_includes/components/panels.html new file mode 100644 index 0000000000..b00cd0f72e --- /dev/null +++ b/docs/_includes/components/panels.html @@ -0,0 +1,278 @@ +
+

Panels

+ +

While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.

+ +

Basic example

+

By default, all the .panel does is apply some basic border and padding to contain some content.

+
+
+
+ Basic panel example +
+
+
+{% highlight html %} +
+
+ Basic panel example +
+
+{% endhighlight %} + +

Panel with heading

+

Easily add a heading container to your panel with .panel-heading. You may also include any <h1>-<h6> with a .panel-title class to add a pre-styled heading.

+
+
+
Panel heading without title
+
+ Panel content +
+
+
+
+

Panel title

+
+
+ Panel content +
+
+
+{% highlight html %} +
+
Panel heading without title
+
+ Panel content +
+
+ +
+
+

Panel title

+
+
+ Panel content +
+
+{% endhighlight %} + + +

Wrap buttons or secondary text in .panel-footer. Note that panel footers do not inherit colors and borders when using contextual variations as they are not meant to be in the foreground.

+
+
+
+ Panel content +
+ +
+
+{% highlight html %} +
+
+ Panel content +
+ +
+{% endhighlight %} + +

Contextual alternatives

+

Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.

+
+
+
+

Panel title

+
+
+ Panel content +
+
+
+
+

Panel title

+
+
+ Panel content +
+
+
+
+

Panel title

+
+
+ Panel content +
+
+
+
+

Panel title

+
+
+ Panel content +
+
+
+
+

Panel title

+
+
+ Panel content +
+
+
+{% highlight html %} +
...
+
...
+
...
+
...
+
...
+{% endhighlight %} + +

With tables

+

Add any non-bordered .table within a panel for a seamless design. If there is a .panel-body, we add an extra border to the top of the table for separation.

+
+
+ +
Panel heading
+
+

Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+
+{% highlight html %} +
+ +
Panel heading
+
+

...

+
+ + + + ... +
+
+{% endhighlight %} + +

If there is no panel body, the component moves from panel header to table without interruption.

+
+
+ +
Panel heading
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+
+{% highlight html %} +
+ +
Panel heading
+ + + + ... +
+
+{% endhighlight %} + + +

With list groups

+

Easily include full-width list groups within any panel.

+
+
+ +
Panel heading
+
+

Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.

+
+ + +
    +
  • Cras justo odio
  • +
  • Dapibus ac facilisis in
  • +
  • Morbi leo risus
  • +
  • Porta ac consectetur ac
  • +
  • Vestibulum at eros
  • +
+
+
+{% highlight html %} +
+ +
Panel heading
+
+

...

+
+ + +
    +
  • Cras justo odio
  • +
  • Dapibus ac facilisis in
  • +
  • Morbi leo risus
  • +
  • Porta ac consectetur ac
  • +
  • Vestibulum at eros
  • +
+
+{% endhighlight %} +
diff --git a/docs/_includes/components/progress-bars.html b/docs/_includes/components/progress-bars.html new file mode 100644 index 0000000000..a78e2c8813 --- /dev/null +++ b/docs/_includes/components/progress-bars.html @@ -0,0 +1,210 @@ +
+

Progress bars

+ +

Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.

+ +
+

Cross-browser compatibility

+

Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.

+
+ +

Basic example

+

Default progress bar.

+
+
+
+ 60% Complete +
+
+
+{% highlight html %} +
+
+ 60% Complete +
+
+{% endhighlight %} + +

With label

+

Remove the .sr-only class from within the progress bar to show a visible percentage. For low percentages, consider adding a min-width to ensure the label's text is fully visible.

+
+
+
+ 60% +
+
+
+{% highlight html %} +
+
+ 60% +
+
+{% endhighlight %} + +

Low percentages

+

Progress bars representing low single digit percentages, as well as 0%, include a min-width: 20px; for legibility.

+
+
+
+ 0% +
+
+
+
+ 2% +
+
+
+{% highlight html %} +
+
+ 0% +
+
+
+
+ 2% +
+
+{% endhighlight %} + + +

Contextual alternatives

+

Progress bars use some of the same button and alert classes for consistent styles.

+
+
+
+ 40% Complete (success) +
+
+
+
+ 20% Complete +
+
+
+
+ 60% Complete (warning) +
+
+
+
+ 80% Complete (danger) +
+
+
+{% highlight html %} +
+
+ 40% Complete (success) +
+
+
+
+ 20% Complete +
+
+
+
+ 60% Complete (warning) +
+
+
+
+ 80% Complete +
+
+{% endhighlight %} + +

Striped

+

Uses a gradient to create a striped effect. Not available in IE8.

+
+
+
+ 40% Complete (success) +
+
+
+
+ 20% Complete +
+
+
+
+ 60% Complete (warning) +
+
+
+
+ 80% Complete (danger) +
+
+
+{% highlight html %} +
+
+ 40% Complete (success) +
+
+
+
+ 20% Complete +
+
+
+
+ 60% Complete (warning) +
+
+
+
+ 80% Complete (danger) +
+
+{% endhighlight %} + +

Animated

+

Add .active to .progress-striped to animate the stripes right to left. Not available in IE9 and below.

+
+
+
45% Complete
+
+
+{% highlight html %} +
+
+ 45% Complete +
+
+{% endhighlight %} + +

Stacked

+

Place multiple bars into the same .progress to stack them.

+
+
+
+ 35% Complete (success) +
+
+ 20% Complete (warning) +
+
+ 10% Complete (danger) +
+
+
+{% highlight html %} +
+
+ 35% Complete (success) +
+
+ 20% Complete (warning) +
+
+ 10% Complete (danger) +
+
+{% endhighlight %} +
diff --git a/docs/_includes/components/responsive-embed.html b/docs/_includes/components/responsive-embed.html new file mode 100644 index 0000000000..bf65599d7b --- /dev/null +++ b/docs/_includes/components/responsive-embed.html @@ -0,0 +1,23 @@ +
+

Responsive embed

+ +

Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device.

+

Rules are directly apply to <iframe>, <embed> and <object> elements, optionally use of an explicit descendant class .embed-responsive-item when you want to match the styling for other attributes.

+

Pro-Tip! You don't need to include frameborder="0" in your <iframe>s as we override that for you.

+
+
+ +
+
+{% highlight html %} + +
+ +
+ + +
+ +
+{% endhighlight %} +
diff --git a/docs/_includes/components/thumbnails.html b/docs/_includes/components/thumbnails.html new file mode 100644 index 0000000000..ecc53882f1 --- /dev/null +++ b/docs/_includes/components/thumbnails.html @@ -0,0 +1,93 @@ +
+

Thumbnails

+ +

Extend Bootstrap's grid system with the thumbnail component to easily display grids of images, videos, text, and more.

+ +

Default example

+

By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.

+
+
+
+ + Generic placeholder thumbnail + +
+
+ + Generic placeholder thumbnail + +
+
+ + Generic placeholder thumbnail + +
+
+ + Generic placeholder thumbnail + +
+
+
+{% highlight html %} +
+
+ + ... + +
+ ... +
+{% endhighlight %} + +

Custom content

+

With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.

+
+
+
+
+ Generic placeholder thumbnail +
+

Thumbnail label

+

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

+

Button Button

+
+
+
+
+
+ Generic placeholder thumbnail +
+

Thumbnail label

+

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

+

Button Button

+
+
+
+
+
+ Generic placeholder thumbnail +
+

Thumbnail label

+

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

+

Button Button

+
+
+
+
+
+{% highlight html %} +
+
+
+ ... +
+

Thumbnail label

+

...

+

Button Button

+
+
+
+
+{% endhighlight %} +
diff --git a/docs/_includes/components/wells.html b/docs/_includes/components/wells.html new file mode 100644 index 0000000000..56e5fa098f --- /dev/null +++ b/docs/_includes/components/wells.html @@ -0,0 +1,33 @@ +
+

Wells

+ +

Default well

+

Use the well as a simple effect on an element to give it an inset effect.

+
+
+ Look, I'm in a well! +
+
+{% highlight html %} +
...
+{% endhighlight %} +

Optional classes

+

Control padding and rounded corners with two optional modifier classes.

+
+
+ Look, I'm in a large well! +
+
+{% highlight html %} +
...
+{% endhighlight %} + +
+
+ Look, I'm in a small well! +
+
+{% highlight html %} +
...
+{% endhighlight %} +
diff --git a/docs/_includes/css/buttons.html b/docs/_includes/css/buttons.html new file mode 100644 index 0000000000..f6a131aaa5 --- /dev/null +++ b/docs/_includes/css/buttons.html @@ -0,0 +1,178 @@ +
+

Buttons

+ +

Options

+

Use any of the available button classes to quickly create a styled button.

+
+ + + + + + + +
+{% highlight html %} + + + + + + + + + + + + + + + + + + + + +{% endhighlight %} + +

Sizes

+

Fancy larger or smaller buttons? Add .btn-lg, .btn-sm, or .btn-xs for additional sizes.

+
+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+{% highlight html %} +

+ + +

+

+ + +

+

+ + +

+

+ + +

+{% endhighlight %} + +

Create block level buttons—those that span the full width of a parent— by adding .btn-block.

+
+
+ + +
+
+{% highlight html %} + + +{% endhighlight %} + + +

Active state

+

Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <button> elements, this is done via :active. For <a> elements, it's done with .active. However, you may use .active on <button>s should you need to replicate the active state progammatically.

+ +

Button element

+

No need to add :active as it's a pseudo-class, but if you need to force the same appearance, go ahead and add .active.

+

+ + +

+{% highlight html %} + + +{% endhighlight %} + +

Anchor element

+

Add the .active class to <a> buttons.

+

+ Primary link + Link +

+{% highlight html %} +Primary link +Link +{% endhighlight %} + + +

Disabled state

+

Make buttons look unclickable by fading them back 50%.

+ +

Button element

+

Add the disabled attribute to <button> buttons.

+

+ + +

+{% highlight html %} + + +{% endhighlight %} + +
+

Cross-browser compatibility

+

If you add the disabled attribute to a <button>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.

+
+ +

Anchor element

+

Add the .disabled class to <a> buttons.

+

+ Primary link + Link +

+{% highlight html %} +Primary link +Link +{% endhighlight %} +

+ We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. +

+
+

Link functionality caveat

+

This class uses pointer-events: none to try to disable the link functionality of <a>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. So to be safe, use custom JavaScript to disable such links.

+
+
+

Context-specific usage

+

While button classes can be used on <a> and <button> elements, only <button> elements are supported within our nav and navbar components.

+
+ + +

Button tags

+

Use the button classes on an <a>, <button>, or <input> element.

+
+ Link + + + +
+{% highlight html %} +Link + + + +{% endhighlight %} + +
+

Cross-browser rendering

+

As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

+

Among other things, there's a Firefox bug that prevents us from setting the line-height of <input>-based buttons, causing them to not exactly match the height of other buttons on Firefox.

+
+
diff --git a/docs/_includes/css/code.html b/docs/_includes/css/code.html new file mode 100644 index 0000000000..0d13961456 --- /dev/null +++ b/docs/_includes/css/code.html @@ -0,0 +1,50 @@ +
+

Code

+ +

Inline

+

Wrap inline snippets of code with <code>.

+
+ For example, <section> should be wrapped as inline. +
+{% highlight html %} +For example, <section> should be wrapped as inline. +{% endhighlight %} + +

User input

+

Use the <kbd> to indicate input that is typically entered via keyboard.

+
+ To switch directories, type cd followed by the name of the directory. +
+{% highlight html %} + To switch directories, type cd followed by the name of the directory. +{% endhighlight %} + +

Basic block

+

Use <pre> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.

+
+
<p>Sample text here...</p>
+
+{% highlight html %} +
<p>Sample text here...</p>
+{% endhighlight %} + +

You may optionally add the .pre-scrollable class, which will set a max-height of 350px and provide a y-axis scrollbar.

+

Variables

+

For indicating variables use the <var> tag.

+
+

y = mx + b

+ +
+{% highlight html %} +y = mx + b +{% endhighlight %} + +

Sample output

+

For indicating blocks sample output from a program use the <samp> tag.

+
+

This text is meant to be treated as sample output from a computer program.

+
+{% highlight html %} +This text is meant to be treated as sample output from a computer program. +{% endhighlight %} +
diff --git a/docs/_includes/css/forms.html b/docs/_includes/css/forms.html new file mode 100644 index 0000000000..eb2141cf17 --- /dev/null +++ b/docs/_includes/css/forms.html @@ -0,0 +1,651 @@ +
+

Forms

+ +

Basic example

+

Individual form controls automatically receive some global styling. All textual <input>, <textarea>, and <select> elements with .form-control are set to width: 100%; by default. Wrap labels and controls in .form-group for optimum spacing.

+
+
+
+ + +
+
+ + +
+
+ + +

Example block-level help text here.

+
+
+ +
+ +
+
+{% highlight html %} +
+
+ + +
+
+ + +
+
+ + +

Example block-level help text here.

+
+
+ +
+ +
+{% endhighlight %} +
+

Don't mix form groups with input groups

+

Do not mix form groups directly with input groups. Instead, nest the input group inside of the form group.

+
+ + +

Inline form

+

Add .form-inline to your <form> for left-aligned and inline-block controls. This only applies to forms within viewports that are at least 768px wide.

+
+

Requires custom widths

+

Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.

+
+
+

Always add labels

+

Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the .sr-only class.

+
+
+
+
+ + +
+
+
+
@
+ +
+
+
+ + +
+
+ +
+ +
+
+{% highlight html %} +
+
+ + +
+
+ + +
+
+ +
+ +
+{% endhighlight %} + + +

Horizontal form

+

Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding .form-horizontal to the form. Doing so changes .form-groups to behave as grid rows, so no need for .row.

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+{% highlight html %} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+{% endhighlight %} + + +

Supported controls

+

Examples of standard form controls supported in an example form layout.

+ +

Inputs

+

Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.

+
+

Type declaration required

+

Inputs will only be fully styled if their type is properly declared.

+
+
+
+ +
+
+{% highlight html %} + +{% endhighlight %} +
+

Input groups

+

To add integrated text or buttons before and/or after any text-based <input>, check out the input group component.

+
+ +

Textarea

+

Form control which supports multiple lines of text. Change rows attribute as necessary.

+
+
+ +
+
+{% highlight html %} + +{% endhighlight %} + +

Checkboxes and radios

+

Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.

+

Default (stacked)

+
+
+
+ +
+
+
+ +
+
+ +
+
+
+{% highlight html %} +
+ +
+ +
+ +
+
+ +
+{% endhighlight %} + +

Inline checkboxes

+

Use the .checkbox-inline or .radio-inline classes on a series of checkboxes or radios for controls that appear on the same line.

+
+
+ + + +
+
+{% highlight html %} + + + +{% endhighlight %} + +

Selects

+

Use the default option, or add multiple to show multiple options at once.

+
+
+ +
+ +
+
+{% highlight html %} + + + +{% endhighlight %} + + +

Static control

+

When you need to place plain text next to a form label within a horizontal form, use the .form-control-static class on a <p>.

+
+
+
+ +
+

email@example.com

+
+
+
+ +
+ +
+
+
+
+{% highlight html %} +
+
+ +
+

email@example.com

+
+
+
+ +
+ +
+
+
+{% endhighlight %} + +

Input focus

+

We remove the default outline styles on some form controls and apply a box-shadow in its place for :focus.

+
+
+ +
+
+
+

Demo :focus state

+

The above example input uses custom styles in our documentation to demonstrate the :focus state on a .form-control.

+
+ + +

Disabled inputs

+

Add the disabled boolean attribute on an input to prevent user input and trigger a slightly different look.

+
+
+ +
+
+{% highlight html %} + +{% endhighlight %} + +

Disabled fieldsets

+

Add the disabled attribute to a <fieldset> to disable all the controls within the <fieldset> at once.

+ +
+

Caveat about link functionality of <a>

+

Our styles use pointer-events: none to try to disable the link functionality of <a class="btn btn-*"> buttons in this case, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. So to be safe, use custom JavaScript to disable such links.

+
+ +
+

Cross-browser compatibility

+

While Bootstrap will apply these styles in all browsers, Internet Explorer 9 and below don't actually support the disabled attribute on a <fieldset>. Use custom JavaScript to disable the fieldset in these browsers.

+
+ +
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+
+
+{% highlight html %} +
+
+
+ + +
+
+ + +
+
+ +
+ +
+
+{% endhighlight %} + + +

Readonly inputs

+

Add the readonly boolean attribute on an input to prevent user input and style the input as disabled.

+
+
+ +
+
+{% highlight html %} + +{% endhighlight %} + + +

Validation states

+

Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add .has-warning, .has-error, or .has-success to the parent element. Any .control-label, .form-control, and .help-block within that element will receive the validation styles.

+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+
+{% highlight html %} +
+ + +
+
+ + +
+
+ + +
+{% endhighlight %} + +

With optional icons

+

You can also add optional feedback icons with the addition of .has-feedback and the right icon.

+
+

Icons, labels, and input groups

+

Manual positioning of feedback icons is required for inputs without a label and for input groups with an add-on on the right. For inputs without labels, adjust the topvalue. For input groups, adjust the right value to an appropriate pixel value depending on the width of your addon.

+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+
+{% highlight html %} +
+ + + +
+
+ + + +
+
+ + + +
+{% endhighlight %} + +

Optional icons also work on horizontal and inline forms.

+
+
+
+ +
+ + +
+
+
+
+{% highlight html %} +
+
+ +
+ + +
+
+
+{% endhighlight %} + +
+
+
+ + + +
+
+
+{% highlight html %} +
+
+ + + +
+
+{% endhighlight %} + + +

Control sizing

+

Set heights using classes like .input-lg, and set widths using grid column classes like .col-lg-*.

+ +

Height sizing

+

Create taller or shorter form controls that match button sizes.

+
+
+
+ + + + + + + +
+
+
+{% highlight html %} + + + + + + + +{% endhighlight %} + +

Column sizing

+

Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.

+
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+{% highlight html %} +
+
+ +
+
+ +
+
+ +
+
+{% endhighlight %} + +

Help text

+

Block level help text for form controls.

+
+
+ + A block of help text that breaks onto a new line and may extend beyond one line. +
+
+{% highlight html %} +A block of help text that breaks onto a new line and may extend beyond one line. +{% endhighlight %} +
diff --git a/docs/_includes/css/grid.html b/docs/_includes/css/grid.html new file mode 100644 index 0000000000..992612e857 --- /dev/null +++ b/docs/_includes/css/grid.html @@ -0,0 +1,543 @@ +
+

Grid system

+ +

Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts.

+ +

Introduction

+

Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works:

+ +

Look to the examples for applying these principles to your code.

+ +

Media queries

+

We use the following media queries in our Less files to create the key breakpoints in our grid system.

+{% highlight scss %} +/* Extra small devices (phones, less than 768px) */ +/* No media query since this is the default in Bootstrap */ + +/* Small devices (tablets, 768px and up) */ +@media (min-width: @screen-sm-min) { ... } + +/* Medium devices (desktops, 992px and up) */ +@media (min-width: @screen-md-min) { ... } + +/* Large devices (large desktops, 1200px and up) */ +@media (min-width: @screen-lg-min) { ... } +{% endhighlight %} +

We occasionally expand on these media queries to include a max-width to limit CSS to a narrower set of devices.

+{% highlight scss %} +@media (max-width: @screen-xs-max) { ... } +@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { ... } +@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { ... } +@media (min-width: @screen-lg-min) { ... } +{% endhighlight %} + +

Grid options

+

See how aspects of the Bootstrap grid system work across multiple devices with a handy table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Extra small devices + Phones (<768px) + + Small devices + Tablets (≥768px) + + Medium devices + Desktops (≥992px) + + Large devices + Desktops (≥1200px) +
Grid behaviorHorizontal at all timesCollapsed to start, horizontal above breakpoints
Container widthNone (auto)750px970px1170px
Class prefix.col-xs-.col-sm-.col-md-.col-lg-
# of columns12
Column widthAuto~62px~81px~97px
Gutter width30px (15px on each side of a column)
NestableYes
OffsetsYes
Column orderingYes
+
+ +

Example: Stacked-to-horizontal

+

Using a single set of .col-md-* grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any .row.

+
+
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
+
+
.col-md-8
+
.col-md-4
+
+
+
.col-md-4
+
.col-md-4
+
.col-md-4
+
+
+
.col-md-6
+
.col-md-6
+
+
+{% highlight html %} +
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
.col-md-1
+
+
+
.col-md-8
+
.col-md-4
+
+
+
.col-md-4
+
.col-md-4
+
.col-md-4
+
+
+
.col-md-6
+
.col-md-6
+
+{% endhighlight %} + +

Example: Fluid container

+

Turn any fixed-width grid layout into a full-width layout by changing your outermost .container to .container-fluid.

+{% highlight html %} +
+
+ ... +
+
+{% endhighlight %} + +

Example: Mobile and desktop

+

Don't want your columns to simply stack in smaller devices? Use the extra small and medium device grid classes by adding .col-xs-* .col-md-* to your columns. See the example below for a better idea of how it all works.

+
+
+
.col-xs-12 .col-md-8
+
.col-xs-6 .col-md-4
+
+
+
.col-xs-6 .col-md-4
+
.col-xs-6 .col-md-4
+
.col-xs-6 .col-md-4
+
+
+
.col-xs-6
+
.col-xs-6
+
+
+{% highlight html %} + +
+
.col-xs-12 .col-md-8
+
.col-xs-6 .col-md-4
+
+ + +
+
.col-xs-6 .col-md-4
+
.col-xs-6 .col-md-4
+
.col-xs-6 .col-md-4
+
+ + +
+
.col-xs-6
+
.col-xs-6
+
+{% endhighlight %} + +

Example: Mobile, tablet, desktops

+

Build on the previous example by creating even more dynamic and powerful layouts with tablet .col-sm-* classes.

+
+
+
.col-xs-12 .col-sm-6 .col-md-8
+
.col-xs-6 .col-md-4
+
+
+
.col-xs-6 .col-sm-4
+
.col-xs-6 .col-sm-4
+ +
+
.col-xs-6 .col-sm-4
+
+
+{% highlight html %} +
+
.col-xs-12 .col-sm-6 .col-md-8
+
.col-xs-6 .col-md-4
+
+
+
.col-xs-6 .col-sm-4
+
.col-xs-6 .col-sm-4
+ +
+
.col-xs-6 .col-sm-4
+
+{% endhighlight %} + +

Responsive column resets

+

With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a .clearfix and our responsive utility classes.

+
+
+
+ .col-xs-6 .col-sm-3 +
+ Resize your viewport or check it out on your phone for an example. +
+
.col-xs-6 .col-sm-3
+ + +
+ +
.col-xs-6 .col-sm-3
+
.col-xs-6 .col-sm-3
+
+
+{% highlight html %} +
+
.col-xs-6 .col-sm-3
+
.col-xs-6 .col-sm-3
+ + +
+ +
.col-xs-6 .col-sm-3
+
.col-xs-6 .col-sm-3
+
+{% endhighlight %} +

In addition to column clearing at responsive breakpoints, you may need to reset offsets, pushes, or pulls. See this in action in the grid example.

+{% highlight html %} +
+
.col-sm-5 .col-md-6
+
.col-sm-5 .col-sm-offset-2 .col-md-6 .col-md-offset-0
+
+ +
+
.col-sm-6 .col-md-5 .col-lg-6
+
.col-sm-6 .col-md-5 .col-md-offset-2 .col-lg-6 .col-lg-offset-0
+
+{% endhighlight %} + + +

Offsetting columns

+

Move columns to the right using .col-md-offset-* classes. These classes increase the left margin of a column by * columns. For example, .col-md-offset-4 moves .col-md-4 over four columns.

+
+
+
.col-md-4
+
.col-md-4 .col-md-offset-4
+
+
+
.col-md-3 .col-md-offset-3
+
.col-md-3 .col-md-offset-3
+
+
+
.col-md-6 .col-md-offset-3
+
+
+{% highlight html %} +
+
.col-md-4
+
.col-md-4 .col-md-offset-4
+
+
+
.col-md-3 .col-md-offset-3
+
.col-md-3 .col-md-offset-3
+
+
+
.col-md-6 .col-md-offset-3
+
+{% endhighlight %} + + +

Nesting columns

+

To nest your content with the default grid, add a new .row and set of .col-md-* columns within an existing .col-md-* column. Nested rows should include a set of columns that add up to 12 or less.

+
+
+ Level 1: .col-md-9 +
+
+ Level 2: .col-md-6 +
+
+ Level 2: .col-md-6 +
+
+
+
+{% highlight html %} +
+
+ Level 1: .col-md-9 +
+
+ Level 2: .col-md-6 +
+
+ Level 2: .col-md-6 +
+
+
+
+{% endhighlight %} + +

Column ordering

+

Easily change the order of our built-in grid columns with .col-md-push-* and .col-md-pull-* modifier classes.

+
+
.col-md-9 .col-md-push-3
+
.col-md-3 .col-md-pull-9
+
+ +{% highlight html %} +
+
.col-md-9 .col-md-push-3
+
.col-md-3 .col-md-pull-9
+
+{% endhighlight %} + +

Less mixins and variables

+

In addition to prebuilt grid classes for fast layouts, Bootstrap includes Less variables and mixins for quickly generating your own simple, semantic layouts.

+ +

Variables

+

Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below.

+{% highlight scss %} +@grid-columns: 12; +@grid-gutter-width: 30px; +@grid-float-breakpoint: 768px; +{% endhighlight %} + +

Mixins

+

Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.

+{% highlight scss %} +// Creates a wrapper for a series of columns +.make-row(@gutter: @grid-gutter-width) { + // Then clear the floated columns + .clearfix(); + + @media (min-width: @screen-sm-min) { + margin-left: (@gutter / -2); + margin-right: (@gutter / -2); + } + + // Negative margin nested rows out to align the content of columns + .row { + margin-left: (@gutter / -2); + margin-right: (@gutter / -2); + } +} + +// Generate the extra small columns +.make-xs-column(@columns; @gutter: @grid-gutter-width) { + position: relative; + // Prevent columns from collapsing when empty + min-height: 1px; + // Inner gutter via padding + padding-left: (@gutter / 2); + padding-right: (@gutter / 2); + + // Calculate width based on number of columns available + @media (min-width: @grid-float-breakpoint) { + float: left; + width: percentage((@columns / @grid-columns)); + } +} + +// Generate the small columns +.make-sm-column(@columns; @gutter: @grid-gutter-width) { + position: relative; + // Prevent columns from collapsing when empty + min-height: 1px; + // Inner gutter via padding + padding-left: (@gutter / 2); + padding-right: (@gutter / 2); + + // Calculate width based on number of columns available + @media (min-width: @screen-sm-min) { + float: left; + width: percentage((@columns / @grid-columns)); + } +} + +// Generate the small column offsets +.make-sm-column-offset(@columns) { + @media (min-width: @screen-sm-min) { + margin-left: percentage((@columns / @grid-columns)); + } +} +.make-sm-column-push(@columns) { + @media (min-width: @screen-sm-min) { + left: percentage((@columns / @grid-columns)); + } +} +.make-sm-column-pull(@columns) { + @media (min-width: @screen-sm-min) { + right: percentage((@columns / @grid-columns)); + } +} + +// Generate the medium columns +.make-md-column(@columns; @gutter: @grid-gutter-width) { + position: relative; + // Prevent columns from collapsing when empty + min-height: 1px; + // Inner gutter via padding + padding-left: (@gutter / 2); + padding-right: (@gutter / 2); + + // Calculate width based on number of columns available + @media (min-width: @screen-md-min) { + float: left; + width: percentage((@columns / @grid-columns)); + } +} + +// Generate the medium column offsets +.make-md-column-offset(@columns) { + @media (min-width: @screen-md-min) { + margin-left: percentage((@columns / @grid-columns)); + } +} +.make-md-column-push(@columns) { + @media (min-width: @screen-md-min) { + left: percentage((@columns / @grid-columns)); + } +} +.make-md-column-pull(@columns) { + @media (min-width: @screen-md-min) { + right: percentage((@columns / @grid-columns)); + } +} + +// Generate the large columns +.make-lg-column(@columns; @gutter: @grid-gutter-width) { + position: relative; + // Prevent columns from collapsing when empty + min-height: 1px; + // Inner gutter via padding + padding-left: (@gutter / 2); + padding-right: (@gutter / 2); + + // Calculate width based on number of columns available + @media (min-width: @screen-lg-min) { + float: left; + width: percentage((@columns / @grid-columns)); + } +} + +// Generate the large column offsets +.make-lg-column-offset(@columns) { + @media (min-width: @screen-lg-min) { + margin-left: percentage((@columns / @grid-columns)); + } +} +.make-lg-column-push(@columns) { + @media (min-width: @screen-lg-min) { + left: percentage((@columns / @grid-columns)); + } +} +.make-lg-column-pull(@columns) { + @media (min-width: @screen-lg-min) { + right: percentage((@columns / @grid-columns)); + } +} +{% endhighlight %} + +

Example usage

+

You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between.

+{% highlight scss %} +.wrapper { + .make-row(); +} +.content-main { + .make-lg-column(8); +} +.content-secondary { + .make-lg-column(3); + .make-lg-column-offset(1); +} +{% endhighlight %} +{% highlight html %} +
+
...
+
...
+
+{% endhighlight %} +
diff --git a/docs/_includes/css/helpers.html b/docs/_includes/css/helpers.html new file mode 100644 index 0000000000..e787a3103c --- /dev/null +++ b/docs/_includes/css/helpers.html @@ -0,0 +1,197 @@ +
+

Helper classes

+ +

Contextual colors

+

Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles.

+
+

Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

+

Nullam id dolor id nibh ultricies vehicula ut id elit.

+

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

+

Maecenas sed diam eget risus varius blandit sit amet non magna.

+

Etiam porta sem malesuada magna mollis euismod.

+

Donec ullamcorper nulla non metus auctor fringilla.

+
+{% highlight html %} +

...

+

...

+

...

+

...

+

...

+

...

+{% endhighlight %} +
+

Dealing with specificity

+

Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <span> with the class.

+
+ +

Contextual backgrounds

+

Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes.

+
+

Nullam id dolor id nibh ultricies vehicula ut id elit.

+

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

+

Maecenas sed diam eget risus varius blandit sit amet non magna.

+

Etiam porta sem malesuada magna mollis euismod.

+

Donec ullamcorper nulla non metus auctor fringilla.

+
+{% highlight html %} +

...

+

...

+

...

+

...

+

...

+{% endhighlight %} + + +

Close icon

+

Use the generic close icon for dismissing content like modals and alerts.

+
+

+
+{% highlight html %} + +{% endhighlight %} + + +

Carets

+

Use carets to indicate dropdown functionality and direction. Note that the default caret will reverse automatically in dropup menus.

+
+ +
+{% highlight html %} + +{% endhighlight %} + + +

Quick floats

+

Float an element to the left or right with a class. !important is included to avoid specificity issues. Classes can also be used as mixins.

+{% highlight html %} +
...
+
...
+{% endhighlight %} +{% highlight scss %} +// Classes +.pull-left { + float: left !important; +} +.pull-right { + float: right !important; +} + +// Usage as mixins +.element { + .pull-left(); +} +.another-element { + .pull-right(); +} +{% endhighlight %} + +
+

Not for use in navbars

+

To align components in navbars with utility classes, use .navbar-left or .navbar-right instead. See the navbar docs for details.

+
+ + +

Center content blocks

+

Set an element to display: block and center via margin. Available as a mixin and class.

+{% highlight html %} +
...
+{% endhighlight %} +{% highlight scss %} +// Classes +.center-block { + display: block; + margin-left: auto; + margin-right: auto; +} + +// Usage as mixins +.element { + .center-block(); +} +{% endhighlight %} + + +

Clearfix

+

Clear the float on any element with the .clearfix class. Utilizes the micro clearfix as popularized by Nicolas Gallagher. Can also be used as a mixin.

+{% highlight html %} + +
...
+{% endhighlight %} +{% highlight scss %} +// Mixin itself +.clearfix() { + &:before, + &:after { + content: " "; + display: table; + } + &:after { + clear: both; + } +} + +// Usage as a Mixin +.element { + .clearfix(); +} +{% endhighlight %} + + +

Showing and hiding content

+

Force an element to be shown or hidden (including for screen readers) with the use of .show and .hidden classes. These classes use !important to avoid specificity conflicts, just like the quick floats. They are only available for block level toggling. They can also be used as mixins.

+

.hide is available, but it does not always affect screen readers and is deprecated as of v3.0.1. Use .hidden or .sr-only instead.

+

Furthermore, .invisible can be used to toggle only the visibility of an element, meaning its display is not modified and the element can still affect the flow of the document.

+{% highlight html %} +
...
+ +{% endhighlight %} +{% highlight scss %} +// Classes +.show { + display: block !important; +} +.hidden { + display: none !important; + visibility: hidden !important; +} +.invisible { + visibility: hidden; +} + +// Usage as mixins +.element { + .show(); +} +.another-element { + .hidden(); +} +{% endhighlight %} + + +

Screen reader and keyboard navigation content

+

Hide an element to all devices except screen readers with .sr-only. Combine .sr-only with .sr-only-focusable to show the element again when it's focused (e.g. by a keyboard-only user). Necessary for following accessibility best practices. Can also be used as mixins.

+{% highlight html %} +Skip to main content +{% endhighlight %} +{% highlight scss %} +// Usage as a Mixin +.skip-navigation { + .sr-only(); + .sr-only-focusable(); +} +{% endhighlight %} + + +

Image replacement

+

Utilize the .text-hide class or mixin to help replace an element's text content with a background image.

+{% highlight html %} +

Custom heading

+{% endhighlight %} + {% highlight scss %} +// Usage as a Mixin +.heading { + .text-hide(); +} +{% endhighlight %} +
diff --git a/docs/_includes/css/images.html b/docs/_includes/css/images.html new file mode 100644 index 0000000000..4e0fc4a770 --- /dev/null +++ b/docs/_includes/css/images.html @@ -0,0 +1,26 @@ +
+

Images

+ +

Responsive images

+

Images in Bootstrap 3 can be made responsive-friendly via the addition of the .img-responsive class. This applies max-width: 100%; and height: auto; to the image so that it scales nicely to the parent element.

+{% highlight html %} +Responsive image +{% endhighlight %} + +

Image shapes

+

Add classes to an <img> element to easily style images in any project.

+
+

Cross-browser compatibility

+

Keep in mind that Internet Explorer 8 lacks support for rounded corners.

+
+
+ A generic square placeholder image with rounded corners + A generic square placeholder image where only the portion within the circle circumscribed about said square is visible + A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera +
+{% highlight html %} +... +... +... +{% endhighlight %} +
diff --git a/docs/_includes/css/less.html b/docs/_includes/css/less.html new file mode 100644 index 0000000000..b6d46da29f --- /dev/null +++ b/docs/_includes/css/less.html @@ -0,0 +1,499 @@ +
+

Using Less

+ +

Bootstrap's CSS is built on Less, a preprocessor with additional functionality like variables, mixins, and functions for compiling CSS. Those looking to use the source Less files instead of our compiled CSS files can make use of the numerous variables and mixins we use throughout the framework.

+ +

Grid variables and mixins are covered within the Grid system section.

+ + +

Compiling Bootstrap

+

Bootstrap can be used in at least two ways: with the compiled CSS or with the source Less files. To compile the Less files, visit the README for how to setup your development environment to run the necessary commands.

+

Third party compilation tools may work with Bootstrap, but they are not supported by our core team.

+ +

Variables

+

Variables are used throughout the entire project as a way to centralize and share commonly used values like colors, spacing, or font stacks. For a complete breakdown, please see the Customizer.

+ +

Colors

+

Easily make use of two color schemes: grayscale and semantic. Grayscale colors provide quick access to commonly used shades of black while semantic include various colors assigned to meaningful contextual values.

+
+
+
+
+
+
+
+
+
+{% highlight scss %} +@gray-darker: lighten(#000, 13.5%); // #222 +@gray-dark: lighten(#000, 20%); // #333 +@gray: lighten(#000, 33.5%); // #555 +@gray-light: lighten(#000, 60%); // #999 +@gray-lighter: lighten(#000, 93.5%); // #eee +{% endhighlight %} + +
+
+
+
+
+
+
+
+
+{% highlight scss %} +@brand-primary: #428bca; +@brand-success: #5cb85c; +@brand-info: #5bc0de; +@brand-warning: #f0ad4e; +@brand-danger: #d9534f; +{% endhighlight %} + +

Use any of these color variables as they are or reassign them to more meaningful variables for your project.

+{% highlight scss %} +// Use as-is +.masthead { + background-color: @brand-primary; +} + +// Reassigned variables in Less +@alert-message-background: @brand-info; +.alert { + background-color: @alert-message-background; +} +{% endhighlight %} + +

Scaffolding

+

A handful of variables for quickly customizing key elements of your site's skeleton.

+{% highlight scss %} +// Scaffolding +@body-bg: #fff; +@text-color: @black-50; +{% endhighlight %} + + +

Easily style your links with the right color with only one value.

+{% highlight scss %} +// Variables +@link-color: @brand-primary; +@link-color-hover: darken(@link-color, 15%); + +// Usage +a { + color: @link-color; + text-decoration: none; + + &:hover { + color: @link-color-hover; + text-decoration: underline; + } +} +{% endhighlight %} +

Note that the @link-color-hover uses a function, another awesome tool from Less, to automagically create the right hover color. You can use darken, lighten, saturate, and desaturate.

+ +

Typography

+

Easily set your type face, text size, leading, and more with a few quick variables. Bootstrap makes use of these as well to provide easy typographic mixins.

+{% highlight scss %} +@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; +@font-family-serif: Georgia, "Times New Roman", Times, serif; +@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace; +@font-family-base: @font-family-sans-serif; + +@font-size-base: 14px; +@font-size-large: ceil((@font-size-base * 1.25)); // ~18px +@font-size-small: ceil((@font-size-base * 0.85)); // ~12px + +@font-size-h1: floor((@font-size-base * 2.6)); // ~36px +@font-size-h2: floor((@font-size-base * 2.15)); // ~30px +@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px +@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px +@font-size-h5: @font-size-base; +@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px + +@line-height-base: 1.428571429; // 20/14 +@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px + +@headings-font-family: inherit; +@headings-font-weight: 500; +@headings-line-height: 1.1; +@headings-color: inherit; +{% endhighlight %} + +

Icons

+

Two quick variables for customizing the location and filename of your icons.

+{% highlight scss %} +@icon-font-path: "../fonts/"; +@icon-font-name: "glyphicons-halflings-regular"; +{% endhighlight %} + +

Components

+

Components throughout Bootstrap make use of some default variables for setting common values. Here are the most commonly used.

+{% highlight scss %} +@padding-base-vertical: 6px; +@padding-base-horizontal: 12px; + +@padding-large-vertical: 10px; +@padding-large-horizontal: 16px; + +@padding-small-vertical: 5px; +@padding-small-horizontal: 10px; + +@padding-xs-vertical: 1px; +@padding-xs-horizontal: 5px; + +@line-height-large: 1.33; +@line-height-small: 1.5; + +@border-radius-base: 4px; +@border-radius-large: 6px; +@border-radius-small: 3px; + +@component-active-color: #fff; +@component-active-bg: @brand-primary; + +@caret-width-base: 4px; +@caret-width-large: 5px; +{% endhighlight %} + + +

Vendor mixins

+

Vendor mixins are mixins to help support multiple browsers by including all relevant vendor prefixes in your compiled CSS.

+ + +

Box-sizing

+

Reset your components' box model with a single mixin. For context, see this helpful article from Mozilla.

+

The mixin is deprecated as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixin internally until Bootstrap v4.

+{% highlight scss %} +.box-sizing(@box-model) { + -webkit-box-sizing: @box-model; // Safari <= 5 + -moz-box-sizing: @box-model; // Firefox <= 19 + box-sizing: @box-model; +} +{% endhighlight %} + +

Rounded corners

+

Today all modern browsers support the non-prefixed border-radius property. As such, there is no .border-radius() mixin, but Bootstrap does include shortcuts for quickly rounding two corners on a particular side of an object.

+{% highlight scss %} +.border-top-radius(@radius) { + border-top-right-radius: @radius; + border-top-left-radius: @radius; +} +.border-right-radius(@radius) { + border-bottom-right-radius: @radius; + border-top-right-radius: @radius; +} +.border-bottom-radius(@radius) { + border-bottom-right-radius: @radius; + border-bottom-left-radius: @radius; +} +.border-left-radius(@radius) { + border-bottom-left-radius: @radius; + border-top-left-radius: @radius; +} +{% endhighlight %} + +

Box (Drop) shadows

+

If your target audience is using the latest and greatest browsers and devices, be sure to just use the box-shadow property on its own. If you need support for older Android (pre-v4) and iOS devices (pre-iOS 5), use the deprecated mixin to pick up the required -webkit prefix.

+

The mixin is deprecated as of v3.1.0, since Bootstrap doesn't officially support the outdated platforms that don't support the standard property. To preserve backwards-compatibility, Bootstrap will continue to use the mixin internally until Bootstrap v4.

+

Be sure to use rgba() colors in your box shadows so they blend as seamlessly as possible with backgrounds.

+{% highlight scss %} +.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) { + -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1 + box-shadow: @shadow; +} +{% endhighlight %} + +

Transitions

+

Multiple mixins for flexibility. Set all transition information with one, or specify a separate delay and duration as needed.

+

The mixins are deprecated as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.

+{% highlight scss %} +.transition(@transition) { + -webkit-transition: @transition; + transition: @transition; +} +.transition-property(@transition-property) { + -webkit-transition-property: @transition-property; + transition-property: @transition-property; +} +.transition-delay(@transition-delay) { + -webkit-transition-delay: @transition-delay; + transition-delay: @transition-delay; +} +.transition-duration(@transition-duration) { + -webkit-transition-duration: @transition-duration; + transition-duration: @transition-duration; +} +.transition-timing-function(@timing-function) { + -webkit-transition-timing-function: @timing-function; + transition-timing-function: @timing-function; +} +.transition-transform(@transition) { + -webkit-transition: -webkit-transform @transition; + -moz-transition: -moz-transform @transition; + -o-transition: -o-transform @transition; + transition: transform @transition; +} +{% endhighlight %} + +

Transformations

+

Rotate, scale, translate (move), or skew any object.

+

The mixins are deprecated as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.

+{% highlight scss %} +.rotate(@degrees) { + -webkit-transform: rotate(@degrees); + -ms-transform: rotate(@degrees); // IE9 only + transform: rotate(@degrees); +} +.scale(@ratio; @ratio-y...) { + -webkit-transform: scale(@ratio, @ratio-y); + -ms-transform: scale(@ratio, @ratio-y); // IE9 only + transform: scale(@ratio, @ratio-y); +} +.translate(@x; @y) { + -webkit-transform: translate(@x, @y); + -ms-transform: translate(@x, @y); // IE9 only + transform: translate(@x, @y); +} +.skew(@x; @y) { + -webkit-transform: skew(@x, @y); + -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+ + transform: skew(@x, @y); +} +.translate3d(@x; @y; @z) { + -webkit-transform: translate3d(@x, @y, @z); + transform: translate3d(@x, @y, @z); +} + +.rotateX(@degrees) { + -webkit-transform: rotateX(@degrees); + -ms-transform: rotateX(@degrees); // IE9 only + transform: rotateX(@degrees); +} +.rotateY(@degrees) { + -webkit-transform: rotateY(@degrees); + -ms-transform: rotateY(@degrees); // IE9 only + transform: rotateY(@degrees); +} +.perspective(@perspective) { + -webkit-perspective: @perspective; + -moz-perspective: @perspective; + perspective: @perspective; +} +.perspective-origin(@perspective) { + -webkit-perspective-origin: @perspective; + -moz-perspective-origin: @perspective; + perspective-origin: @perspective; +} +.transform-origin(@origin) { + -webkit-transform-origin: @origin; + -moz-transform-origin: @origin; + -ms-transform-origin: @origin; // IE9 only + transform-origin: @origin; +} +{% endhighlight %} + +

Animations

+

A single mixin for using all of CSS3's animation properties in one declaration and other mixins for individual properties.

+

The mixins are deprecated as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.

+{% highlight scss %} +.animation(@animation) { + -webkit-animation: @animation; + animation: @animation; +} +.animation-name(@name) { + -webkit-animation-name: @name; + animation-name: @name; +} +.animation-duration(@duration) { + -webkit-animation-duration: @duration; + animation-duration: @duration; +} +.animation-timing-function(@timing-function) { + -webkit-animation-timing-function: @timing-function; + animation-timing-function: @timing-function; +} +.animation-delay(@delay) { + -webkit-animation-delay: @delay; + animation-delay: @delay; +} +.animation-iteration-count(@iteration-count) { + -webkit-animation-iteration-count: @iteration-count; + animation-iteration-count: @iteration-count; +} +.animation-direction(@direction) { + -webkit-animation-direction: @direction; + animation-direction: @direction; +} +{% endhighlight %} + +

Opacity

+

Set the opacity for all browsers and provide a filter fallback for IE8.

+{% highlight scss %} +.opacity(@opacity) { + opacity: @opacity; + // IE8 filter + @opacity-ie: (@opacity * 100); + filter: ~"alpha(opacity=@{opacity-ie})"; +} +{% endhighlight %} + +

Placeholder text

+

Provide context for form controls within each field.

+{% highlight scss %} +.placeholder(@color: @input-color-placeholder) { + &::-moz-placeholder { color: @color; } // Firefox + &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ + &::-webkit-input-placeholder { color: @color; } // Safari and Chrome +} +{% endhighlight %} + +

Columns

+

Generate columns via CSS within a single element.

+{% highlight scss %} +.content-columns(@width; @count; @gap) { + -webkit-column-width: @width; + -moz-column-width: @width; + column-width: @width; + -webkit-column-count: @count; + -moz-column-count: @count; + column-count: @count; + -webkit-column-gap: @gap; + -moz-column-gap: @gap; + column-gap: @gap; +} +{% endhighlight %} + +

Gradients

+

Easily turn any two colors into a background gradient. Get more advanced and set a direction, use three colors, or use a radial gradient. With a single mixin you get all the prefixed syntaxes you'll need.

+{% highlight scss %} +#gradient > .vertical(#333; #000); +#gradient > .horizontal(#333; #000); +#gradient > .radial(#333; #000); +{% endhighlight %} +

You can also specify the angle of a standard two-color, linear gradient:

+{% highlight scss %} +#gradient > .directional(#333; #000; 45deg); +{% endhighlight %} +

If you need a barber-stripe style gradient, that's easy, too. Just specify a single color and we'll overlay a translucent white stripe.

+{% highlight scss %} +#gradient > .striped(#333; 45deg); +{% endhighlight %} +

Up the ante and use three colors instead. Set the first color, the second color, the second color's color stop (a decimal value like 0.25), and the third color with these mixins:

+{% highlight scss %} +#gradient > .vertical-three-colors(#777; #333; .25; #000); +#gradient > .horizontal-three-colors(#777; #333; .25; #000); +{% endhighlight %} +

Heads up! Should you ever need to remove a gradient, be sure to remove any IE-specific filter you may have added. You can do that by using the .reset-filter() mixin alongside background-image: none;.

+ + +

Utility mixins

+

Utility mixins are mixins that combine otherwise unrelated CSS properties to achieve a specific goal or task.

+ +

Clearfix

+

Forget adding class="clearfix" to any element and instead add the .clearfix() mixin where appropriate. Uses the micro clearfix from Nicolas Gallager.

+{% highlight scss %} +// Mixin +.clearfix() { + &:before, + &:after { + content: " "; + display: table; + } + &:after { + clear: both; + } +} + +// Usage +.container { + .clearfix(); +} +{% endhighlight %} + +

Horizontal centering

+

Quickly center any element within its parent. Requires width or max-width to be set.

+{% highlight scss %} +// Mixin +.center-block() { + display: block; + margin-left: auto; + margin-right: auto; +} + +// Usage +.container { + width: 940px; + .center-block(); +} +{% endhighlight %} + +

Sizing helpers

+

Specify the dimensions of an object more easily.

+{% highlight scss %} +// Mixins +.size(@width; @height) { + width: @width; + height: @height; +} +.square(@size) { + .size(@size; @size); +} + +// Usage +.image { .size(400px; 300px); } +.avatar { .square(48px); } +{% endhighlight %} + +

Resizable textareas

+

Easily configure the resize options for any textarea, or any other element. Defaults to normal browser behavior (both).

+{% highlight scss %} +.resizable(@direction: both) { + // Options: horizontal, vertical, both + resize: @direction; + // Safari fix + overflow: auto; +} +{% endhighlight %} + +

Truncating text

+

Easily truncate text with an ellipsis with a single mixin. Requires element to be block or inline-block level.

+{% highlight scss %} +// Mixin +.text-overflow() { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +// Usage +.branch-name { + display: inline-block; + max-width: 200px; + .text-overflow(); +} +{% endhighlight %} + +

Retina images

+

Specify two image paths and the @1x image dimensions, and Bootstrap will provide an @2x media query. If you have many images to serve, consider writing your retina image CSS manually in a single media query.

+{% highlight scss %} +.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { + background-image: url("@{file-1x}"); + + @media + only screen and (-webkit-min-device-pixel-ratio: 2), + only screen and ( min--moz-device-pixel-ratio: 2), + only screen and ( -o-min-device-pixel-ratio: 2/1), + only screen and ( min-device-pixel-ratio: 2), + only screen and ( min-resolution: 192dpi), + only screen and ( min-resolution: 2dppx) { + background-image: url("@{file-2x}"); + background-size: @width-1x @height-1x; + } +} + +// Usage +.jumbotron { + .img-retina("/img/bg-1x.png", "/img/bg-2x.png", 100px, 100px); +} +{% endhighlight %} +
diff --git a/docs/_includes/css/overview.html b/docs/_includes/css/overview.html new file mode 100644 index 0000000000..3a942da3b1 --- /dev/null +++ b/docs/_includes/css/overview.html @@ -0,0 +1,52 @@ +
+

Overview

+ +

Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.

+ +

HTML5 doctype

+

Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.

+{% highlight html %} + + + ... + +{% endhighlight %} + +

Mobile first

+

With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, Bootstrap is mobile first. Mobile first styles can be found throughout the entire library instead of in separate files.

+

To ensure proper rendering and touch zooming, add the viewport meta tag to your <head>.

+{% highlight html %} + +{% endhighlight %} +

You can disable zooming capabilities on mobile devices by adding user-scalable=no to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall, we don't recommend this on every site, so use caution!

+{% highlight html %} + +{% endhighlight %} + + +

Bootstrap sets basic global display, typography, and link styles. Specifically, we:

+ +

These styles can be found within scaffolding.less.

+ +

Normalize.css

+

For improved cross-browser rendering, we use Normalize.css, a project by Nicolas Gallagher and Jonathan Neal.

+ +

Containers

+

Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Note that, due to padding and more, neither container is nestable.

+

Use .container for a responsive fixed width container.

+{% highlight html %} +
+ ... +
+{% endhighlight %} +

Use .container-fluid for a full width container, spanning the entire width of your viewport.

+{% highlight html %} +
+ ... +
+{% endhighlight %} +
diff --git a/docs/_includes/css/responsive-utilities.html b/docs/_includes/css/responsive-utilities.html new file mode 100644 index 0000000000..260eea3cc1 --- /dev/null +++ b/docs/_includes/css/responsive-utilities.html @@ -0,0 +1,258 @@ +
+

Responsive utilities

+ +

For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.

+

Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.

+ + +

Available classes

+

Use a single or combination of the available classes for toggling content across viewport breakpoints.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Extra small devices + Phones (<768px) + + Small devices + Tablets (≥768px) + + Medium devices + Desktops (≥992px) + + Large devices + Desktops (≥1200px) +
.visible-xs-*Visible
.visible-sm-*Visible
.visible-md-*Visible
.visible-lg-*Visible
.hidden-xsVisibleVisibleVisible
.hidden-smVisibleVisibleVisible
.hidden-mdVisibleVisibleVisible
.hidden-lgVisibleVisibleVisible
+
+ +

As of v3.2, the .visible-*-* classes for each breakpoint come in three variations, one for each CSS display property value listed below.

+
+ + + + + + + + + + + + + + + + + + + + + +
Group of classesCSS display
.visible-*-blockdisplay: block;
.visible-*-inlinedisplay: inline;
.visible-*-inline-blockdisplay: inline-block;
+
+

So, for extra small (xs) screens for example, the available .visible-*-* classes are: .visible-xs-block, .visible-xs-inline, and .visible-xs-inline-block.

+

The classes .visible-xs, .visible-sm, .visible-md, and .visible-lg also exist, but are deprecated as of v3.2. They are approximately equivalent to .visible-*-block, except with additional special cases for toggling <table>-related elements.

+ +

Print classes

+

Similar to the regular responsive classes, use these for toggling content for print.

+
+ + + + + + + + + + + + + + + + + + + + +
ClassesBrowserPrint
+ .visible-print-block
+ .visible-print-inline
+ .visible-print-inline-block +
Visible
.hidden-printVisible
+
+

The class .visible-print also exists but is deprecated as of v3.1.0. It is approximately equivalent to .visible-print-block, except with additional special cases for <table>-related elements.

+ + +

Test cases

+

Resize your browser or load on different devices to test the responsive utility classes.

+ +

Visible on...

+

Green checkmarks indicate the element is visible in your current viewport.

+
+
+ + ✔ Visible on x-small +
+
+ + ✔ Visible on small +
+
+
+ Medium + ✔ Visible on medium +
+
+ + ✔ Visible on large +
+
+
+
+ + ✔ Visible on x-small and small +
+
+ + ✔ Visible on medium and large +
+
+
+ + ✔ Visible on x-small and medium +
+
+ + ✔ Visible on small and large +
+
+
+ + ✔ Visible on x-small and large +
+
+ + ✔ Visible on small and medium +
+
+ +

Hidden on...

+

Here, green checkmarks also indicate the element is hidden in your current viewport.

+
+
+ + ✔ Hidden on x-small +
+
+ + ✔ Hidden on small +
+
+
+ Medium + ✔ Hidden on medium +
+
+ + ✔ Hidden on large +
+
+
+
+ + ✔ Hidden on x-small and small +
+
+ + ✔ Hidden on medium and large +
+
+
+ + ✔ Hidden on x-small and medium +
+
+ + ✔ Hidden on small and large +
+
+
+ + ✔ Hidden on x-small and large +
+
+ + ✔ Hidden on small and medium +
+
+
diff --git a/docs/_includes/css/rtl.html b/docs/_includes/css/rtl.html new file mode 100644 index 0000000000..050c429b1f --- /dev/null +++ b/docs/_includes/css/rtl.html @@ -0,0 +1,20 @@ +
+

RTL

+

As of Bootstrap 3.2, a right-to-left version of Bootstrap ships as part of the repository. It's powered by Twitter's CSS Flip project and is generated via our Gruntfile.

+ +

How to use

+

Bootstrap is by default a left-to-right project. For right-to-left projects, you'll need to set your language and replace the default Bootstrap CSS with an RTL version. First, set your language and text direction:

+{% highlight html %} + + +{% endhighlight %} +

Then, include the right-to-left CSS file in place of the default Bootstrap CSS:

+{% highlight html %} + + +{% endhighlight %} +

Alternatively, you may use the minified RTL file, bootstrap-rtl.min.css.

+ +

CSS Flip

+

CSS Flip is a project for converting left-to-right CSS files into right-to-left CSS files. We use it in our Gruntfile to automate the generation of Bootstrap's RTL CSS files.

+
diff --git a/docs/_includes/css/sass.html b/docs/_includes/css/sass.html new file mode 100644 index 0000000000..2d5fabbcdd --- /dev/null +++ b/docs/_includes/css/sass.html @@ -0,0 +1,52 @@ +
+

Using Sass

+

While Bootstrap is built on Less, it also has an official Sass port. We maintain it in a separate GitHub repository and handle updates with a conversion script.

+ +

What's included

+

Since the Sass port has a separate repo and serves a slightly different audience, the contents of the project differ greatly from the main Bootstrap project. This ensures the Sass port is as compatible with as many Sass-based systems as possible.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathDescription
lib/Ruby gem code (Sass configuration, Rails and Compass integrations)
tasks/Converter scripts (turning upstream Less to Sass)
test/Compilation tests
templates/Compass package manifest
vendor/assets/Sass, JavaScript, and font files
RakefileInternal tasks, such as rake and convert
+
+

Visit the Sass port's GitHub repository to see these files in action.

+ + +

Installation

+

For information on how to install and use Bootstrap for Sass, consult the GitHub repository readme. It's the most up to date source and includes information for use with Rails, Compass, and standard Sass projects.

+

+ Bootstrap for Sass +

+
diff --git a/docs/_includes/css/tables.html b/docs/_includes/css/tables.html new file mode 100644 index 0000000000..99db2af72a --- /dev/null +++ b/docs/_includes/css/tables.html @@ -0,0 +1,450 @@ +
+

Tables

+ +

Basic example

+

For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+{% highlight html %} + + ... +
+{% endhighlight %} + + +

Striped rows

+

Use .table-striped to add zebra-striping to any table row within the <tbody>.

+
+

Cross-browser compatibility

+

Striped tables are styled via the :nth-child CSS selector, which is not available in Internet Explorer 8.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
+
+{% highlight html %} + + ... +
+{% endhighlight %} + + +

Bordered table

+

Add .table-bordered for borders on all sides of the table and cells.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
MarkOtto@TwBootstrap
2JacobThornton@fat
3Larry the Bird@twitter
+
+{% highlight html %} + + ... +
+{% endhighlight %} + + +

Hover rows

+

Add .table-hover to enable a hover state on table rows within a <tbody>.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+
+{% highlight html %} + + ... +
+{% endhighlight %} + + +

Condensed table

+

Add .table-condensed to make tables more compact by cutting cell padding in half.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
+
+{% highlight html %} + + ... +
+{% endhighlight %} + + +

Contextual classes

+

Use contextual classes to color table rows or individual cells.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ClassDescription
+ .active + Applies the hover color to a particular row or cell
+ .success + Indicates a successful or positive action
+ .info + Indicates a neutral informative change or action
+ .warning + Indicates a warning that might need attention
+ .danger + Indicates a dangerous or potentially negative action
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Column headingColumn headingColumn heading
1Column contentColumn contentColumn content
2Column contentColumn contentColumn content
3Column contentColumn contentColumn content
4Column contentColumn contentColumn content
5Column contentColumn contentColumn content
6Column contentColumn contentColumn content
7Column contentColumn contentColumn content
8Column contentColumn contentColumn content
9Column contentColumn contentColumn content
+
+{% highlight html %} + +... +... +... +... +... + + + + ... + ... + ... + ... + ... + +{% endhighlight %} + + +

Responsive tables

+

Create responsive tables by wrapping any .table in .table-responsive to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
+
+
+{% highlight html %} +
+ + ... +
+
+{% endhighlight %} +
diff --git a/docs/_includes/css/type.html b/docs/_includes/css/type.html new file mode 100644 index 0000000000..9c5aee200a --- /dev/null +++ b/docs/_includes/css/type.html @@ -0,0 +1,448 @@ +
+

Typography

+ + +

Headings

+

All HTML headings, <h1> through <h6>, are available. .h1 through .h6 classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

h1. Bootstrap heading

Semibold 36px

h2. Bootstrap heading

Semibold 30px

h3. Bootstrap heading

Semibold 24px

h4. Bootstrap heading

Semibold 18px
h5. Bootstrap heading
Semibold 14px
h6. Bootstrap heading
Semibold 12px
+
+{% highlight html %} +

h1. Bootstrap heading

+

h2. Bootstrap heading

+

h3. Bootstrap heading

+

h4. Bootstrap heading

+
h5. Bootstrap heading
+
h6. Bootstrap heading
+{% endhighlight %} + +

Create lighter, secondary text in any heading with a generic <small> tag or the .small class.

+
+ + + + + + + + + + + + + + + + + + + + + +

h1. Bootstrap heading Secondary text

h2. Bootstrap heading Secondary text

h3. Bootstrap heading Secondary text

h4. Bootstrap heading Secondary text

h5. Bootstrap heading Secondary text
h6. Bootstrap heading Secondary text
+
+{% highlight html %} +

h1. Bootstrap heading Secondary text

+

h2. Bootstrap heading Secondary text

+

h3. Bootstrap heading Secondary text

+

h4. Bootstrap heading Secondary text

+
h5. Bootstrap heading Secondary text
+
h6. Bootstrap heading Secondary text
+{% endhighlight %} + + + +

Body copy

+

Bootstrap's global default font-size is 14px, with a line-height of 1.428. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).

+
+

Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

+

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

+

Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

+
+{% highlight html %} +

...

+{% endhighlight %} + + +

Lead body copy

+

Make a paragraph stand out by adding .lead.

+
+

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

+
+{% highlight html %} +

...

+{% endhighlight %} + + +

Built with Less

+

The typographic scale is based on two Less variables in variables.less: @font-size-base and @line-height-base. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.

+ + +

Inline text elements

+

Marked text

+

For indicating blocks of text that have been deleted use the <mark> tag.

+
+

You can use the mark tag to highlight text.

+
+{% highlight html %} +This line of text is meant to be treated as deleted text. +{% endhighlight %} + + +

Deleted text

+

For indicating blocks of text that have been deleted use the <del> tag.

+
+

This line of text is meant to be treated as deleted text.

+
+{% highlight html %} +This line of text is meant to be treated as deleted text. +{% endhighlight %} + +

Strikethrough text

+

For indicating blocks of text that are no longer relevant use the <s> tag.

+
+

This line of text is meant to be treated as no longer accurate.

+
+{% highlight html %} +This line of text is meant to be treated as no longer accurate. +{% endhighlight %} + +

Inserted text

+

For indicating additions to the document use the <ins> tag.

+
+

This line of text is meant to be treated as an addition to the document.

+
+{% highlight html %} +This line of text is meant to be treated as an addition to the document. +{% endhighlight %} + +

Underlined text

+

To underline text use the <u> tag.

+
+

This line of text is will render as underlined

+
+{% highlight html %} +This line of text is will render as underlined +{% endhighlight %} + +

Make use of HTML's default emphasis tags with lightweight styles.

+ +

Small text

+

For de-emphasizing inline or blocks of text, use the <small> tag to set text at 85% the size of the parent. Heading elements receive their own font-size for nested <small> elements.

+

You may alternatively use an inline element with .small in place of any <small>.

+
+

This line of text is meant to be treated as fine print.

+
+{% highlight html %} +This line of text is meant to be treated as fine print. +{% endhighlight %} + + +

Bold

+

For emphasizing a snippet of text with a heavier font-weight.

+
+

The following snippet of text is rendered as bold text.

+
+{% highlight html %} +rendered as bold text +{% endhighlight %} + +

Italics

+

For emphasizing a snippet of text with italics.

+
+

The following snippet of text is rendered as italicized text.

+
+{% highlight html %} +rendered as italicized text +{% endhighlight %} + +
+

Alternate elements

+

Feel free to use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.

+
+ +

Alignment classes

+

Easily realign text to components with text alignment classes.

+
+

Left aligned text.

+

Center aligned text.

+

Right aligned text.

+

Justified text.

+
+{% highlight html %} +

Left aligned text.

+

Center aligned text.

+

Right aligned text.

+

Justified text.

+{% endhighlight %} + + + +

Abbreviations

+

Stylized implementation of HTML's <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.

+ +

Basic abbreviation

+

For expanded text on long hover of an abbreviation, include the title attribute with the <abbr> element.

+
+

An abbreviation of the word attribute is attr.

+
+{% highlight html %} +attr +{% endhighlight %} + +

Initialism

+

Add .initialism to an abbreviation for a slightly smaller font-size.

+
+

HTML is the best thing since sliced bread.

+
+{% highlight html %} +HTML +{% endhighlight %} + + + +

Addresses

+

Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <br>.

+
+
+ Twitter, Inc.
+ 795 Folsom Ave, Suite 600
+ San Francisco, CA 94107
+ P: (123) 456-7890 +
+
+ Full Name
+ first.last@example.com +
+
+{% highlight html %} +
+ Twitter, Inc.
+ 795 Folsom Ave, Suite 600
+ San Francisco, CA 94107
+ P: (123) 456-7890 +
+ +
+ Full Name
+ first.last@example.com +
+{% endhighlight %} + + + +

Blockquotes

+

For quoting blocks of content from another source within your document.

+ +

Default blockquote

+

Wrap <blockquote> around any HTML as the quote. For straight quotes, we recommend a <p>.

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+
+{% highlight html %} +
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+{% endhighlight %} + +

Blockquote options

+

Style and content changes for simple variations on a standard <blockquote>.

+ +

Naming a source

+

Add a <footer> for identifying the source. Wrap the name of the source work in <cite>.

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
Someone famous in Source Title
+
+
+{% highlight html %} +
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
Someone famous in Source Title
+
+{% endhighlight %} + +

Alternate displays

+

Add .blockquote-reverse for a blockquote with right-aligned content.

+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
Someone famous in Source Title
+
+
+{% highlight html %} +
+ ... +
+{% endhighlight %} + + + +

Lists

+ +

Unordered

+

A list of items in which the order does not explicitly matter.

+
+
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+
+{% highlight html %} + +{% endhighlight %} + +

Ordered

+

A list of items in which the order does explicitly matter.

+
+
    +
  1. Lorem ipsum dolor sit amet
  2. +
  3. Consectetur adipiscing elit
  4. +
  5. Integer molestie lorem at massa
  6. +
  7. Facilisis in pretium nisl aliquet
  8. +
  9. Nulla volutpat aliquam velit
  10. +
  11. Faucibus porta lacus fringilla vel
  12. +
  13. Aenean sit amet erat nunc
  14. +
  15. Eget porttitor lorem
  16. +
+
+{% highlight html %} +
    +
  1. ...
  2. +
+{% endhighlight %} + +

Unstyled

+

Remove the default list-style and left margin on list items (immediate children only). This only applies to immediate children list items, meaning you will need to add the class for any nested lists as well.

+
+
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+
+{% highlight html %} + +{% endhighlight %} + +

Inline

+

Place all list items on a single line with display: inline-block; and some light padding.

+
+
    +
  • Lorem ipsum
  • +
  • Phasellus iaculis
  • +
  • Nulla volutpat
  • +
+
+{% highlight html %} + +{% endhighlight %} + +

Description

+

A list of terms with their associated descriptions.

+
+
+
Description lists
+
A description list is perfect for defining terms.
+
Euismod
+
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
+
Donec id elit non mi porta gravida at eget metus.
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
+
+{% highlight html %} +
+
...
+
...
+
+{% endhighlight %} + +

Horizontal description

+

Make terms and descriptions in <dl> line up side-by-side. Starts off stacked like default <dl>s, but when the navbar expands, so do these.

+
+
+
Description lists
+
A description list is perfect for defining terms.
+
Euismod
+
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
+
Donec id elit non mi porta gravida at eget metus.
+
Malesuada porta
+
Etiam porta sem malesuada magna mollis euismod.
+
Felis euismod semper eget lacinia
+
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
+
+
+{% highlight html %} +
+
...
+
...
+
+{% endhighlight %} + +
+

Auto-truncating

+

Horizontal description lists will truncate terms that are too long to fit in the left column with text-overflow. In narrower viewports, they will change to the default stacked layout.

+
+
diff --git a/docs/_includes/getting-started/accessibility.html b/docs/_includes/getting-started/accessibility.html new file mode 100644 index 0000000000..cb9b3e11e1 --- /dev/null +++ b/docs/_includes/getting-started/accessibility.html @@ -0,0 +1,26 @@ +
+

Accessibility

+

Bootstrap follows common web standards and—with minimal extra effort—can be used to create sites that are accessible to those using AT.

+ +

Skip navigation

+

If your navigation contains many links and comes before the main content in the DOM, add a Skip to main content link immediately after your opening <body> tag. (read why)

+{% highlight html %} + + Skip to main content +
+ The main page content. +
+ +{% endhighlight %} + +

Nested headings

+

When nesting headings (<h1> - <h6>), your primary document header should be an <h1>. Subsequent headings should make logical use of <h2> - <h6> such that screen readers can construct a table of contents for your pages.

+

Learn more at HTML CodeSniffer and Penn State's AccessAbility.

+ +

Additional resources

+ +
diff --git a/docs/_includes/getting-started/browser-device-support.html b/docs/_includes/getting-started/browser-device-support.html new file mode 100644 index 0000000000..3e1dd3e66d --- /dev/null +++ b/docs/_includes/getting-started/browser-device-support.html @@ -0,0 +1,187 @@ +
+

Browser and device support

+

Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.

+ +

Supported browsers

+

Specifically, we support the latest versions of the following browsers and platforms. On Windows, we support Internet Explorer 8-11. More specific support information is provided below.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ChromeFirefoxInternet ExplorerOperaSafari
Android Supported Not SupportedN/A Not SupportedN/A
iOS SupportedN/A Not Supported Supported
Mac OS X Supported Supported Supported Supported
Windows Supported Supported Supported Supported Not Supported
+
+

Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 7, though they are not officially supported.

+

For a list of some of the browser bugs that Bootstrap has to grapple with, see our Wall of browser bugs.

+ +

Internet Explorer 8 and 9

+

Internet Explorer 8 and 9 are also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported by these browsers. In addition, Internet Explorer 8 requires the use of Respond.js to enable media query support.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureInternet Explorer 8Internet Explorer 9
border-radius Not supported Supported
box-shadow Not supported Supported
transform Not supported Supported, with -ms prefix
transition Not supported
placeholder Not supported
+
+ +

Visit Can I use... for details on browser support of CSS3 and HTML5 features.

+ +

Internet Explorer 8 and Respond.js

+

Beware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.

+

Respond.js and cross-domain CSS

+

Using Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. See the Respond.js docs for details.

+

Respond.js and file://

+

Due to browser security rules, Respond.js doesn't work with pages viewed via the file:// protocol (like when opening a local HTML file). To test responsive features in IE8, view your pages over HTTP(S). See the Respond.js docs for details.

+

Respond.js and @import

+

Respond.js doesn't work with CSS that's referenced via @import. In particular, some Drupal configurations are known to use @import. See the Respond.js docs for details.

+ +

Internet Explorer 8 and box-sizing

+

IE8 does not fully support box-sizing: border-box; when combined with min-width, max-width, min-height, or max-height. For that reason, as of v3.0.1, we no longer use max-width on .containers.

+ +

IE Compatibility modes

+

Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <meta> tag in your pages:

+{% highlight html %} + +{% endhighlight %} +

Confirm the document mode by opening the debugging tools: press F12 and check the "Document Mode".

+

This tag is included in all Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer.

+

See this StackOverflow question for more information.

+ +

Internet Explorer 10 in Windows 8 and Windows Phone 8

+

Internet Explorer 10 doesn't differentiate device width from viewport width, and thus doesn't properly apply the media queries in Bootstrap's CSS. Normally you'd just add a quick snippet of CSS to fix this:

+{% highlight scss %} +@-ms-viewport { width: device-width; } +{% endhighlight %} +

However, this doesn't work for devices running Windows Phone 8 versions older than Update 3 (a.k.a. GDR3), as it causes such devices to show a mostly desktop view instead of narrow "phone" view. To address this, you'll need to include the following CSS and JavaScript to work around the bug.

+{% highlight scss %} +@-webkit-viewport { width: device-width; } +@-moz-viewport { width: device-width; } +@-ms-viewport { width: device-width; } +@-o-viewport { width: device-width; } +@viewport { width: device-width; } +{% endhighlight %} + +{% highlight js %} +if (navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement('style') + msViewportStyle.appendChild( + document.createTextNode( + '@-ms-viewport{width:auto!important}' + ) + ) + document.querySelector('head').appendChild(msViewportStyle) +} +{% endhighlight %} +

For more information and usage guidelines, read Windows Phone 8 and Device-Width.

+

As a heads up, we include this in the Bootstrap docs as an example.

+ +

Safari percent rounding

+

As of Safari v7.0.1 for OS X and Safari for iOS v7.0.1, Safari's rendering engine has some trouble with the number of decimal places used in our .col-*-1 grid classes. So if you have 12 individual grid columns, you'll notice that they come up short compared to other rows of columns. We can't do much here (see #9282) but you do have some options:

+ +

We'll keep an eye on this though and update our code if we have an easy solution.

+ +

Modals, navbars, and virtual keyboards

+

Overflow and scrolling

+

Support for overflow: hidden on the <body> element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <body> content will begin to scroll.

+

Virtual keyboards

+

Also, note that if you're using inputs in your modal or navbar, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to position: absolute or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.

+

Navbar Dropdowns

+

The .dropdown-backdrop element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or any other element which will fire a click event in iOS).

+ +

Browser zooming

+

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

+

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. See #12078 for some details. Suggested workarounds:

+ + +

Android stock browser

+

Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.

+

Select menus

+

On <select> elements, the Android stock browser will not display the side controls if there is a border-radius and/or border applied. Use the snippet of code below to remove the offending CSS and render the <select> as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.

+{% highlight html %} + +{% endhighlight %} +

Want to see an example? Check out this JS Bin demo.

+
diff --git a/docs/_includes/getting-started/community.html b/docs/_includes/getting-started/community.html new file mode 100644 index 0000000000..b21b6ae0d0 --- /dev/null +++ b/docs/_includes/getting-started/community.html @@ -0,0 +1,12 @@ +
+

Community

+ +

Stay up to date on the development of Bootstrap and reach out to the community with these helpful resources.

+ +

You can also follow @twbootstrap on Twitter for the latest gossip and awesome music videos.

+
diff --git a/docs/_includes/getting-started/disabling-responsiveness.html b/docs/_includes/getting-started/disabling-responsiveness.html new file mode 100644 index 0000000000..d154e204dc --- /dev/null +++ b/docs/_includes/getting-started/disabling-responsiveness.html @@ -0,0 +1,22 @@ +
+

Disabling responsiveness

+ +

Bootstrap automatically adapts your pages for various screen sizes. + Here's how to disable this feature so your page works like in this non-responsive example.

+ +

Steps to disable page responsiveness

+
    +
  1. Omit the viewport <meta> mentioned in the CSS docs
  2. +
  3. Override the width on the .container for each grid tier with a single width, for example width: 970px !important; Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the !important with media queries or some selector-fu.
  4. +
  5. If using navbars, remove all navbar collapsing and expanding behavior.
  6. +
  7. For grid layouts, use .col-xs-* classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.
  8. +
+

You'll still need Respond.js for IE8 (since our media queries are still there and need to be processed). + This disables the "mobile site" aspects of Bootstrap.

+ +

Bootstrap template with responsiveness disabled

+

We've applied these steps to an example. Read its source code to see the specific changes implemented.

+

+ View non-responsive example +

+
diff --git a/docs/_includes/getting-started/download.html b/docs/_includes/getting-started/download.html new file mode 100644 index 0000000000..e3adffd8b5 --- /dev/null +++ b/docs/_includes/getting-started/download.html @@ -0,0 +1,46 @@ +
+

Download

+ +

Bootstrap (currently v{{ site.current_version }}) has a few easy ways to quickly get started, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.

+ +
+
+

Bootstrap

+

Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.

+

+ Download Bootstrap +

+
+
+

Source code

+

Source Less, JavaScript, and font files, along with our docs. Requires a Less compiler and some setup.

+

+ Download source +

+
+
+

Sass

+

Bootstrap ported from Less to Sass for easy inclusion in Rails, Compass, or Sass-only projects.

+

+ Download Sass +

+
+
+ +

Bootstrap CDN

+

The folks over at MaxCDN graciously provide CDN support for Bootstrap's CSS and JavaScript. Just use these Bootstrap CDN links.

+{% highlight html %} + + + + + + + + +{% endhighlight %} + +

Install with Bower

+

Install and manage Bootstrap's Less, CSS, JavaScript, and fonts using Bower.

+ {% highlight bash %}$ bower install bootstrap{% endhighlight %} +
diff --git a/docs/_includes/getting-started/examples.html b/docs/_includes/getting-started/examples.html new file mode 100644 index 0000000000..e6aed9bee5 --- /dev/null +++ b/docs/_includes/getting-started/examples.html @@ -0,0 +1,159 @@ +
+

Examples

+ +

Build on the basic template above with Bootstrap's many components. See also Customizing Bootstrap for tips on maintaining your own Bootstrap variants.

+ +

Using the framework

+
+
+ + + +

Starter template

+

Nothing but the basics: compiled CSS and JavaScript along with a container.

+
+
+ + + +

Bootstrap theme

+

Load the optional Bootstrap theme for a visually enhanced experience.

+
+
+ +
+ + + +

Grids

+

Multiple examples of grid layouts with all four tiers, nesting, and more.

+
+
+ + + +

Jumbotron

+

Build around the jumbotron with a navbar and some basic grid columns.

+
+
+ +
+ + + +

Narrow jumbotron

+

Build a more custom page by narrowing the default container and jumbotron.

+
+
+ +

Navbars in action

+
+
+ + + +

Navbar

+

Super basic template that includes the navbar along with some additional content.

+
+
+ + + +

Static top navbar

+

Super basic template with a static top navbar along with some additional content.

+
+
+ +
+ + + +

Fixed navbar

+

Super basic template with a fixed top navbar along with some additional content.

+
+
+ +

Custom components

+
+
+ + + +

Cover

+

A one-page template for building simple and beautiful home pages.

+
+
+ + + +

Carousel

+

Customize the navbar and carousel, then add some new components.

+
+
+ +
+ + + +

Blog

+

Simple two-column blog layout with custom navigation, header, and type.

+
+
+ + + +

Dashboard

+

Basic structure for a admin dashboard with fixed sidebar and navbar.

+
+
+ +
+ + + +

Sign-in page

+

Custom form layout and design for a simple sign in form.

+
+
+ + + +

Justified nav

+

Create a custom navbar with justified links. Heads up! Not too WebKit friendly.

+
+
+ +
+ + + +

Sticky footer

+

Attach a footer to the bottom of the viewport when the content is shorter than it.

+
+
+ + + +

Sticky footer with navbar

+

Attach a footer to the bottom of the viewport with a fixed navbar at the top.

+
+
+ +

Experiments

+
+
+ + + +

Non-responsive Bootstrap

+

Easily disable the responsiveness of Bootstrap per our docs.

+
+
+ + + +

Offcanvas

+

Build a toggleable off-canvas navigation menu for use with Bootstrap.

+
+
+
diff --git a/docs/_includes/getting-started/license.html b/docs/_includes/getting-started/license.html new file mode 100644 index 0000000000..9181d0fd8d --- /dev/null +++ b/docs/_includes/getting-started/license.html @@ -0,0 +1,34 @@ +
+

License FAQs

+

Bootstrap is released under the MIT license and is copyright {{ site.time | date: "%Y" }} Twitter. Boiled down to smaller chunks, it can be described with the following conditions.

+ +

It requires you to:

+ + +

It permits you to:

+ + +

It forbids you to:

+ + +

It does not require you to:

+ + +

The full Bootstrap license is located in the project repository for more information.

+
diff --git a/docs/_includes/getting-started/template.html b/docs/_includes/getting-started/template.html new file mode 100644 index 0000000000..c6a1646d63 --- /dev/null +++ b/docs/_includes/getting-started/template.html @@ -0,0 +1,36 @@ +
+

Basic template

+ +

Start with this basic HTML template, or modify these examples. We hope you'll customize our templates and examples, adapting them to suit your needs.

+ +

Copy the HTML below to begin working with a minimal Bootstrap document.

+{% highlight html %} + + + + + + + Bootstrap 101 Template + + + + + + + + + +

Hello, world!

+ + + + + + + +{% endhighlight %} +
diff --git a/docs/_includes/getting-started/third-party-support.html b/docs/_includes/getting-started/third-party-support.html new file mode 100644 index 0000000000..77d869c536 --- /dev/null +++ b/docs/_includes/getting-started/third-party-support.html @@ -0,0 +1,51 @@ +
+

Third party support

+

While we don't officially support any third party plugins or add-ons, we do offer some useful advice to help avoid potential issues in your projects.

+ +

Box-sizing

+

Some third party software, including Google Maps and Google Custom Search Engine, conflict with Bootstrap due to * { box-sizing: border-box; }, a rule which makes it so padding does not affect the final computed width of an element. Learn more about box model and sizing at CSS Tricks.

+

Depending on the context, you may override as-needed (Option 1) or reset the box-sizing for entire regions (Option 2).

+{% highlight scss %} +/* Box-sizing resets + * + * Reset individual elements or override regions to avoid conflicts due to + * global box model settings of Bootstrap. Two options, individual overrides and + * region resets, are available as plain CSS and uncompiled Less formats. + */ + +/* Option 1A: Override a single element's box model via CSS */ +.element { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* Option 1B: Override a single element's box model by using a Bootstrap Less mixin */ +.element { + .box-sizing(content-box); +} + +/* Option 2A: Reset an entire region via CSS */ +.reset-box-sizing, +.reset-box-sizing *, +.reset-box-sizing *:before, +.reset-box-sizing *:after { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* Option 2B: Reset an entire region with a custom Less mixin */ +.reset-box-sizing { + &, + *, + *:before, + *:after { + .box-sizing(content-box); + } +} +.element { + .reset-box-sizing(); +} +{% endhighlight %} +
diff --git a/docs/_includes/getting-started/translations.html b/docs/_includes/getting-started/translations.html new file mode 100644 index 0000000000..dc46f5d903 --- /dev/null +++ b/docs/_includes/getting-started/translations.html @@ -0,0 +1,16 @@ +
+

Translations

+ +

Community members have translated Bootstrap's documentation into various languages. None are officially supported and they may not always be up to date.

+ +

We don't help organize or host translations, we just link to them.

+

Finished a new or better translation? Open a pull request to add it to our list.

+
diff --git a/docs/_includes/getting-started/whats-included.html b/docs/_includes/getting-started/whats-included.html new file mode 100644 index 0000000000..8500e573c4 --- /dev/null +++ b/docs/_includes/getting-started/whats-included.html @@ -0,0 +1,49 @@ +
+

What's included

+ +

Bootstrap is downloadable in two forms, within which you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.

+ +
+

jQuery required

+

Please note that all JavaScript plugins require jQuery to be included, as shown in the starter template. Consult our bower.json to see which versions of jQuery are supported.

+
+ +

Precompiled Bootstrap

+

Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:

+ +{% highlight bash %} +bootstrap/ +├── css/ +│ ├── bootstrap.css +│ ├── bootstrap.min.css +│ ├── bootstrap-theme.css +│ └── bootstrap-theme.min.css +├── js/ +│ ├── bootstrap.js +│ └── bootstrap.min.js +└── fonts/ + ├── glyphicons-halflings-regular.eot + ├── glyphicons-halflings-regular.svg + ├── glyphicons-halflings-regular.ttf + └── glyphicons-halflings-regular.woff +{% endhighlight %} + +

This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (bootstrap.*), as well as compiled and minified CSS and JS (bootstrap.min.*). Fonts from Glyphicons are included, as is the optional Bootstrap theme.

+ +

Bootstrap source code

+

The Bootstrap source code download includes the precompiled CSS, JavaScript, and font assets, along with source Less, JavaScript, and documentation. More specifically, it includes the following and more:

+{% highlight bash %} +bootstrap/ +├── less/ +├── js/ +├── fonts/ +├── dist/ +│ ├── css/ +│ ├── js/ +│ └── fonts/ +└── docs/ + └── examples/ +{% endhighlight %} +

The less/, js/, and fonts/ are the source code for our CSS, JS, and icon fonts (respectively). The dist/ folder includes everything listed in the precompiled download section above. The docs/ folder includes the source code for our documentation, and examples/ of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.

+
diff --git a/docs/_includes/js/affix.html b/docs/_includes/js/affix.html new file mode 100644 index 0000000000..cfd32ec356 --- /dev/null +++ b/docs/_includes/js/affix.html @@ -0,0 +1,108 @@ +
+

Affix affix.js

+ +

Example

+

The subnavigation on the right is a live demo of the affix plugin.

+ +
+ +

Usage

+

Use the affix plugin via data attributes or manually with your own JavaScript. In both situations, you must provide CSS for the positioning of your content.

+ +

Positioning via CSS

+

The affix plugin toggles between three classes, each representing a particular state: .affix, .affix-top, and .affix-bottom. You must provide the styles for these classes yourself (independent of this plugin) to handle the actual positions.

+

Here's how the affix plugin works:

+
    +
  1. To start, the plugin adds .affix-top to indicate the element is in its top-most position. At this point no CSS positioning is required.
  2. +
  3. Scrolling past the element you want affixed should trigger the actual affixing. This is where .affix replaces .affix-top and sets position: fixed; (provided by Bootstrap's code CSS).
  4. +
  5. If a bottom offset is defined, scrolling past that should replace .affix with .affix-bottom. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add position: absolute; when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.
  6. +
+

Follow the above steps to set your CSS for either of the usage options below.

+ +

Via data attributes

+

To easily add affix behavior to any element, just add data-spy="affix" to the element you want to spy on. Use offsets to define when to toggle the pinning of an element.

+ +{% highlight html %} +
+ ... +
+{% endhighlight %} + +

Via JavaScript

+

Call the affix plugin via JavaScript:

+{% highlight js %} + $('#my-affix').affix({ + offset: { + top: 100 + , bottom: function () { + return (this.bottom = $('.footer').outerHeight(true)) + } + } + }) +{% endhighlight %} + + +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset-top="200".

+ +
+ + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
offsetnumber | function | object10Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and bottom directions. To provide a unique, bottom and top offset just provide an object offset: { top: 10 } or offset: { top: 10, bottom: 5 }. Use a function when you need to dynamically calculate an offset.
+
+ + +

Events

+

Bootstrap's affix class exposes a few events for hooking into affix functionality.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Event TypeDescription
affix.bs.affixThis event fires immediately before the element has been affixed.
affixed.bs.affixThis event is fired after the element has been affixed.
affix-top.bs.affixThis event fires immediately before the element has been affixed-top.
affixed-top.bs.affixThis event is fired after the element has been affixed-top.
affix-bottom.bs.affixThis event fires immediately before the element has been affixed-bottom.
affixed-bottom.bs.affixThis event is fired after the element has been affixed-bottom.
+
+
diff --git a/docs/_includes/js/buttons.html b/docs/_includes/js/buttons.html new file mode 100644 index 0000000000..5af3742285 --- /dev/null +++ b/docs/_includes/js/buttons.html @@ -0,0 +1,153 @@ +
+

Buttons button.js

+ +

Example uses

+

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

+ +

Stateful

+

Add data-loading-text="Loading..." to use a loading state on a button.

+
+ +
+{% highlight html %} + + +{% endhighlight %} + +

Single toggle

+

Add data-toggle="button" to activate toggling on a single button.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +

Checkbox

+

Add data-toggle="buttons" to a group of checkboxes for checkbox style toggling on btn-group.

+
+
+ + + +
+
+{% highlight html %} +
+ + + +
+{% endhighlight %} + +

Radio

+

Add data-toggle="buttons" to a group of radio inputs for radio style toggling on btn-group.

+
+
+ + + +
+
+{% highlight html %} +
+ + + +
+{% endhighlight %} + + +

Usage

+

Enable buttons via JavaScript:

+{% highlight js %} +$('.btn').button() +{% endhighlight %} + +

Markup

+

Data attributes are integral to the button plugin. Check out the example code below for the various markup types.

+ +

Options

+

None

+ +

Methods

+ +

$().button('toggle')

+

Toggles push state. Gives the button the appearance that it has been activated.

+
+

Auto toggling

+

You can enable auto toggling of a button by using the data-toggle attribute.

+
+{% highlight html %} + +{% endhighlight %} + +

$().button('loading')

+

Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text. +

+{% highlight html %} + + +{% endhighlight %} + +
+

Cross-browser compatibility

+

Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".

+
+ +

$().button('reset')

+

Resets button state - swaps text to original text.

+ +

$().button(string)

+

Resets button state - swaps text to any data defined text state.

+{% highlight html %} + + +{% endhighlight %} +
diff --git a/docs/_includes/js/carousel.html b/docs/_includes/js/carousel.html new file mode 100644 index 0000000000..945910c758 --- /dev/null +++ b/docs/_includes/js/carousel.html @@ -0,0 +1,225 @@ +
+

Carousel carousel.js

+ + +

The slideshow below shows a generic plugin and component for cycling through elements like a carousel.

+
+ +
+{% highlight html %} + +{% endhighlight %} + + + +

Optional captions

+

Add captions to your slides easily with the .carousel-caption element within any .item. Place just about any optional HTML within there and it will be automatically aligned and formatted.

+
+ +
+{% highlight html %} +
+ ... + +
+{% endhighlight %} + +
+

Accessibility issue

+

The carousel component is generally not compliant with accessibility standards. If you need to be compliant, please consider other options for presenting your content.

+
+ + + +

Multiple carousels

+

Carousels require the use of an id on the outermost container, .carousel, for carousel controls to function properly. When adding multiple carousels, or when changing a carousel's id, be sure to update the relevant controls.

+ +

Via data attributes

+

Use data attributes to easily control the position of the carousel. data-slide accepts the keywords prev or next, which alters the slide position relative to its current position. Alternatively, use data-slide-to to pass a raw slide index to the carousel data-slide-to="2", which shifts the slide position to a particular index beginning with 0.

+

The data-ride="carousel" attribute is used to mark a carousel as animating starting at page load.

+ +

Via JavaScript

+

Call carousel manually with:

+{% highlight js %} +$('.carousel').carousel() +{% endhighlight %} + +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-interval="".

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
intervalnumber5000The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
pausestring"hover"Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.
wrapbooleantrueWhether the carousel should cycle continuously or have hard stops.
+
+ +

Methods

+ +

.carousel(options)

+

Initializes the carousel with an optional options object and starts cycling through items.

+{% highlight js %} +$('.carousel').carousel({ + interval: 2000 +}) +{% endhighlight %} + +

.carousel('cycle')

+

Cycles through the carousel items from left to right.

+ +

.carousel('pause')

+

Stops the carousel from cycling through items.

+ + +

.carousel(number)

+

Cycles the carousel to a particular frame (0 based, similar to an array).

+ +

.carousel('prev')

+

Cycles to the previous item.

+ +

.carousel('next')

+

Cycles to the next item.

+ +

Events

+

Bootstrap's carousel class exposes two events for hooking into carousel functionality.

+
+ + + + + + + + + + + + + + + + + +
Event TypeDescription
slide.bs.carouselThis event fires immediately when the slide instance method is invoked.
slid.bs.carouselThis event is fired when the carousel has completed its slide transition.
+
+{% highlight js %} +$('#myCarousel').on('slide.bs.carousel', function () { + // do something… +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/collapse.html b/docs/_includes/js/collapse.html new file mode 100644 index 0000000000..e878cdb091 --- /dev/null +++ b/docs/_includes/js/collapse.html @@ -0,0 +1,222 @@ +
+

Collapse collapse.js

+ +

About

+

Get base styles and flexible support for collapsible components like accordions and navigation.

+ +
+

Plugin dependency

+

Collapse requires the transitions plugin to be included in your version of Bootstrap.

+
+ +

Example accordion

+

Using the collapse plugin, we built a simple accordion by extending the panel component.

+ +
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+
+{% highlight html %} +
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+ +
+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. +
+
+
+
+{% endhighlight %} + +

You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.

+{% highlight html %} + + +
...
+{% endhighlight %} + + +

Usage

+

The collapse plugin utilizes a few classes to handle the heavy lifting:

+ +

These classes can be found in component-animations.less.

+ +

Via data attributes

+

Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.

+

To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.

+ +

Via JavaScript

+

Enable manually with:

+{% highlight js %} +$('.collapse').collapse() +{% endhighlight %} + +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-parent="".

+
+ + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
parentselectorfalseIf selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this dependent on the panel class)
togglebooleantrueToggles the collapsible element on invocation
+
+ +

Methods

+ +

.collapse(options)

+

Activates your content as a collapsible element. Accepts an optional options object. +{% highlight js %} +$('#myCollapsible').collapse({ + toggle: false +}) +{% endhighlight %} + +

.collapse('toggle')

+

Toggles a collapsible element to shown or hidden.

+ +

.collapse('show')

+

Shows a collapsible element.

+ +

.collapse('hide')

+

Hides a collapsible element.

+ +

Events

+

Bootstrap's collapse class exposes a few events for hooking into collapse functionality.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Event TypeDescription
show.bs.collapseThis event fires immediately when the show instance method is called.
shown.bs.collapseThis event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).
hide.bs.collapse + This event is fired immediately when the hide method has been called. +
hidden.bs.collapseThis event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).
+
+{% highlight js %} +$('#myCollapsible').on('hidden.bs.collapse', function () { + // do something… +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/dropdowns.html b/docs/_includes/js/dropdowns.html new file mode 100644 index 0000000000..6b8c26ed5b --- /dev/null +++ b/docs/_includes/js/dropdowns.html @@ -0,0 +1,177 @@ +
+

Dropdowns dropdown.js

+ + +

Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.

+ +

Within a navbar

+ + +

Within pills

+ + + + +

Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the .open class on the parent list item. When opened, the plugin also adds .dropdown-backdrop as a click area for closing dropdown menus when clicking outside the menu. Note: The data-toggle=dropdown attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.

+ +

Via data attributes

+

Add data-toggle="dropdown" to a link or button to toggle a dropdown.

+{% highlight html %} + +{% endhighlight %} +

To keep URLs intact, use the data-target attribute instead of href="#".

+{% highlight html %} + +{% endhighlight %} + +

Via JavaScript

+

Call the dropdowns via JavaScript:

+{% highlight js %} +$('.dropdown-toggle').dropdown() +{% endhighlight %} +
+

data-toggle="dropdown" still required

+

Regardless of whether you call your dropdown via JavaScript or instead use the data-api, data-toggle="dropdown" is always required to be present on the dropdown's trigger element.

+
+ +

Options

+

None

+ +

Methods

+

$().dropdown('toggle')

+

Toggles the dropdown menu of a given navbar or tabbed navigation.

+ +

Events

+

All dropdown events are fired at the .dropdown-menu's parent element.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Event TypeDescription
show.bs.dropdownThis event fires immediately when the show instance method is called. The toggling anchor element is available as the relatedTarget property of the event.
shown.bs.dropdownThis event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the relatedTarget property of the event.
hide.bs.dropdownThis event is fired immediately when the hide instance method has been called. The toggling anchor element is available as the relatedTarget property of the event.
hidden.bs.dropdownThis event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the relatedTarget property of the event.
+
+{% highlight js %} +$('#myDropdown').on('show.bs.dropdown', function () { + // do something… +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/modal.html b/docs/_includes/js/modal.html new file mode 100644 index 0000000000..e99d319e7b --- /dev/null +++ b/docs/_includes/js/modal.html @@ -0,0 +1,333 @@ +
+

Modals modal.js

+ +

Examples

+

Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

+ +
+

Overlapping modals not supported

+

Be sure not to open a modal while another is still visible. Showing more than one modal at a time requires custom code.

+
+
+

Modal markup placement

+

Always try to place a modal's HTML code in a top-level position in your document to avoid other components affecting the modal's appearance and/or functionality.

+
+
+

Mobile device caveats

+

There are some caveats regarding using modals on mobile devices. See our browser support docs for details.

+
+ +

Static example

+

A rendered modal with header, body, and set of actions in the footer.

+
+ +
+{% highlight html %} + +{% endhighlight %} + +

Live demo

+

Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.

+ + + +
+ +
+{% highlight html %} + + + + + +{% endhighlight %} + +
+

Make modals accessible

+

Be sure to add role="dialog" to .modal, aria-labelledby="myModalLabel" attribute to reference the modal title, and aria-hidden="true" to tell assistive technologies to skip the modal's DOM elements.

+

Additionally, you may give a description of your modal dialog with aria-describedby on .modal.

+
+ +
+

Embedding YouTube videos

+

Embedding YouTube videos in modals requires additional JavaScript not in Bootstrap to automatically stop playback and more. See this helpful Stack Overflow post for more information.

+
+ +

Optional sizes

+

Modals have two optional sizes, available via modifier classes to be placed on a .modal-dialog.

+
+ + +
+{% highlight html %} + + + + + + + + + +{% endhighlight %} + + + + + +

Remove animation

+

For modals that simply appear rather than fade in to view, remove the .fade class from your modal markup.

+{% highlight html %} + +{% 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.

+ +

Via data attributes

+

Activate a modal without writing JavaScript. Set data-toggle="modal" on a controller element, like a button, along with a data-target="#foo" or href="#foo" to target a specific modal to toggle.

+{% highlight html %} + +{% endhighlight %} + +

Via JavaScript

+

Call a modal with id myModal with a single line of JavaScript:

+ {% highlight js %}$('#myModal').modal(options){% endhighlight %} + +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-backdrop="".

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
backdropboolean or the string 'static'trueIncludes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.
keyboardbooleantrueCloses the modal when escape key is pressed
showbooleantrueShows the modal when initialized.
remotepathfalse

If a remote URL is provided, content will be loaded one time via jQuery's load method and injected into the .modal-content div. If you're using the data-api, you may alternatively use the href attribute to specify the remote source. An example of this is shown below:

+{% highlight html %} +Click me +{% endhighlight %} +
+
+ +

Methods

+ +

.modal(options)

+

Activates your content as a modal. Accepts an optional options object.

+{% highlight js %} +$('#myModal').modal({ + keyboard: false +}) +{% endhighlight %} + +

.modal('toggle')

+

Manually toggles a modal. Returns to the caller before the modal has actually been shown or hidden (i.e. before the shown.bs.modal or hidden.bs.modal event occurs).

+ {% highlight js %}$('#myModal').modal('toggle'){% endhighlight %} + +

.modal('show')

+

Manually opens a modal. Returns to the caller before the modal has actually been shown (i.e. before the shown.bs.modal event occurs).

+ {% highlight js %}$('#myModal').modal('show'){% endhighlight %} + +

.modal('hide')

+

Manually hides a modal. Returns to the caller before the modal has actually been hidden (i.e. before the hidden.bs.modal event occurs).

+ {% highlight js %}$('#myModal').modal('hide'){% endhighlight %} + +

Events

+

Bootstrap's modal class exposes a few events for hooking into modal functionality.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Event TypeDescription
show.bs.modalThis event fires immediately when the show instance method is called. If caused by a click, the clicked element is available as the relatedTarget property of the event.
shown.bs.modalThis event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the relatedTarget property of the event.
hide.bs.modalThis event is fired immediately when the hide instance method has been called.
hidden.bs.modalThis event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).
loaded.bs.modalThis event is fired when the modal has loaded content using the remote option.
+
+{% highlight js %} +$('#myModal').on('hidden.bs.modal', function (e) { + // do something... +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/overview.html b/docs/_includes/js/overview.html new file mode 100644 index 0000000000..abc2a47e5a --- /dev/null +++ b/docs/_includes/js/overview.html @@ -0,0 +1,71 @@ +
+

Overview

+ +

Individual or compiled

+

Plugins can be included individually (using Bootstrap's individual *.js files), or all at once (using bootstrap.js or the minified bootstrap.min.js).

+ +
+

Using the compiled JavaScript

+

Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

+
+ +
+

Component data attributes

+

Don't use data attributes from multiple plugins on the same element. For example, a button cannot both have a tooltip and toggle a modal. To accomplish this, use a wrapping element.

+
+ +
+

Plugin dependencies

+

Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs. Also note that all plugins depend on jQuery (this means jQuery must be included before the plugin files). Consult our bower.json to see which versions of jQuery are supported.

+
+ +

Data attributes

+

You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first-class API and should be your first consideration when using a plugin.

+ +

That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the document namespaced with data-api. This looks like this:

+{% highlight js %} +$(document).off('.data-api') +{% endhighlight %} + +

Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:

+{% highlight js %} +$(document).off('.alert.data-api') +{% endhighlight %} + +

Programmatic API

+

We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.

+{% highlight js %} +$('.btn.danger').button('toggle').addClass('fat') +{% endhighlight %} + +

All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):

+{% highlight js %} +$('#myModal').modal() // initialized with defaults +$('#myModal').modal({ keyboard: false }) // initialized with no keyboard +$('#myModal').modal('show') // initializes and invokes show immediately +{% endhighlight %} + +

Each plugin also exposes its raw constructor on a Constructor property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').

+ +

No conflict

+

Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.

+{% highlight js %} +var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value +$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the Bootstrap functionality +{% endhighlight %} + +

Events

+

Bootstrap provides custom events for most plugins' unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is triggered on the completion of an action.

+

As of 3.0.0, all Bootstrap events are namespaced.

+

All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.

+{% highlight js %} +$('#myModal').on('show.bs.modal', function (e) { + if (!data) return e.preventDefault() // stops modal from being shown +}) +{% endhighlight %} + +
+

Third-party libraries

+

Bootstrap does not officially support third-party JavaScript libraries like Prototype or jQuery UI. Despite .noConflict and namespaced events, there may be compatibility problems that you need to fix on your own.

+
+
diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html new file mode 100644 index 0000000000..7bf515ad4b --- /dev/null +++ b/docs/_includes/js/popovers.html @@ -0,0 +1,341 @@ +
+

Popovers popover.js

+ +

Examples

+

Add small overlays of content, like those on the iPad, to any element for housing secondary information.

+ +
+

Plugin dependency

+

Popovers require the tooltip plugin to be included in your version of Bootstrap.

+
+
+

Opt-in functionality

+

For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

+
+
+

Popovers in button groups and input groups require special setting

+

When using popovers on elements within a .btn-group or an .input-group, you'll have to specify the option container: 'body' (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).

+
+
+

Popovers on disabled elements require wrapper elements

+

To add a popover to a disabled or .disabled element, put the element inside of a <div> and apply the popover to that <div> instead.

+
+ +

Static popover

+

Four options are available: top, right, bottom, and left aligned.

+
+
+
+

Popover top

+
+

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
+
+ +
+
+

Popover right

+
+

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
+
+ +
+
+

Popover bottom

+ +
+

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
+
+ +
+
+

Popover left

+
+

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

+
+
+ +
+
+ +

Live demo

+
+ +
+{% highlight html %} + +{% endhighlight %} + +

Four directions

+
+
+ + + + +
+
+{% highlight html %} + + + + + + + +{% endhighlight %} + +

Dismiss on next click

+

Use the focus trigger to dismiss popovers on their next click.

+
+ +
+{% highlight html %} + +{% endhighlight %} +{% highlight js %} +$('.popover-dismiss').popover({ + trigger: 'focus' +}) +{% endhighlight %} + +
+

Multiple-line links

+

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 white-space: nowrap; to your anchors to avoid this.

+
+ + +

Usage

+

Enable popovers via JavaScript:

+ {% highlight js %}$('#example').popover(options){% endhighlight %} + +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
animationbooleantrueapply a CSS fade transition to the popover
htmlbooleanfalseInsert HTML into the popover. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.
placementstring | function'right'how to position the popover - top | bottom | left | right | auto.
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.
selectorstringfalseif 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 this and an informative example.
triggerstring'click'how popover is triggered - click | hover | focus | manual
titlestring | function''default title value if title attribute isn't present
contentstring | function''default content value if data-content attribute isn't present
delaynumber | object0 +

delay showing and hiding the popover (ms) - does not apply to manual trigger type

+

If a number is supplied, delay is applied to both hide/show

+

Object structure is: delay: { show: 500, hide: 100 }

+
containerstring | falsefalse +

Appends the popover to a specific element. Example: container: 'body'. 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.

+
+
+
+

Data attributes for individual popovers

+

Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.

+
+ +

Methods

+

$().popover(options)

+

Initializes popovers for an element collection.

+ +

.popover('show')

+

Reveals an elements popover.

+ {% highlight js %}$('#element').popover('show'){% endhighlight %} + +

.popover('hide')

+

Hides an elements popover.

+ {% highlight js %}$('#element').popover('hide'){% endhighlight %} + +

.popover('toggle')

+

Toggles an elements popover.

+ {% highlight js %}$('#element').popover('toggle'){% endhighlight %} + +

.popover('destroy')

+

Hides and destroys an element's popover.

+ {% highlight js %}$('#element').popover('destroy'){% endhighlight %} +

Events

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Event TypeDescription
show.bs.popoverThis event fires immediately when the show instance method is called.
shown.bs.popoverThis event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).
hide.bs.popoverThis event is fired immediately when the hide instance method has been called.
hidden.bs.popoverThis event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).
+
+{% highlight js %} +$('#myPopover').on('hidden.bs.popover', function () { + // do something… +}) +{% endhighlight %} +
+ + + + +
+

Alert messages alert.js

+ +

Example alerts

+

Add dismiss functionality to all alert messages with this plugin.

+
+ +
+ +
+ +
+ + +

Usage

+

Enable dismissal of an alert via JavaScript:

+ {% highlight js %}$(".alert").alert(){% endhighlight %} + +

Markup

+

Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

+ {% highlight html %}{% endhighlight %} + +

Methods

+ +

$().alert()

+

Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

+ +

.alert('close')

+

Closes an alert.

+ {% highlight js %}$(".alert").alert('close'){% endhighlight %} + + +

Events

+

Bootstrap's alert class exposes a few events for hooking into alert functionality.

+
+ + + + + + + + + + + + + + + + + +
Event TypeDescription
close.bs.alertThis event fires immediately when the close instance method is called.
closed.bs.alertThis event is fired when the alert has been closed (will wait for CSS transitions to complete).
+
+{% highlight js %} +$('#my-alert').bind('closed.bs.alert', function () { + // do something… +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/scrollspy.html b/docs/_includes/js/scrollspy.html new file mode 100644 index 0000000000..959807a2f2 --- /dev/null +++ b/docs/_includes/js/scrollspy.html @@ -0,0 +1,142 @@ +
+

ScrollSpy scrollspy.js

+ +

Example in navbar

+

The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.

+
+ +
+

@fat

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

@mdo

+

Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

+

one

+

Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

+

two

+

In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

+

three

+

Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

+

Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats. +

+
+
+ + +

Usage

+ +

Requires relative positioning

+

No matter the implementation method, scrollspy requires the use of position: relative; on the element you're spying on. In most cases this is the <body>.

+ +

Via data attributes

+

To easily add scrollspy behavior to your topbar navigation, add data-spy="scroll" to the element you want to spy on (most typically this would be the <body>). Then add the data-target attribute with the ID or class of the parent element of any Bootstrap .nav component.

+{% highlight css %} +body { + position: relative; +} +{% endhighlight %} +{% highlight html %} + + ... + + ... + +{% endhighlight %} + +

Via JavaScript

+

After adding position: relative; in your CSS, call the scrollspy via JavaScript:

+{% highlight js %} +$('body').scrollspy({ target: '.navbar-example' }) +{% endhighlight %} + +
+

Resolvable ID targets required

+

Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the DOM like <div id="home"></div>.

+
+ +

Methods

+

.scrollspy('refresh')

+

When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:

+{% highlight js %} +$('[data-spy="scroll"]').each(function () { + var $spy = $(this).scrollspy('refresh') +}) +{% endhighlight %} + + +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset="".

+
+ + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
offsetnumber10Pixels to offset from top when calculating position of scroll.
+
+ +

Events

+
+ + + + + + + + + + + + + +
Event TypeDescription
activate.bs.scrollspyThis event fires whenever a new item becomes activated by the scrollspy.
+
+{% highlight js %} +$('#myScrollspy').on('activate.bs.scrollspy', function () { + // do something… +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/tabs.html b/docs/_includes/js/tabs.html new file mode 100644 index 0000000000..8ada590286 --- /dev/null +++ b/docs/_includes/js/tabs.html @@ -0,0 +1,144 @@ +
+

Togglable tabs tab.js

+ +

Example tabs

+

Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.

+
+ +
+
+

Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

+
+
+

Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

+
+ + +
+
+ +
+

Extends tabbed navigation

+

This plugin extends the tabbed navigation component to add tabbable areas.

+
+ + +

Usage

+

Enable tabbable tabs via JavaScript (each tab needs to be activated individually):

+ +{% highlight js %} +$('#myTab a').click(function (e) { + e.preventDefault() + $(this).tab('show') +}) +{% endhighlight %} + +

You can activate individual tabs in several ways:

+ +{% highlight js %} +$('#myTab a[href="#profile"]').tab('show') // Select tab by name +$('#myTab a:first').tab('show') // Select first tab +$('#myTab a:last').tab('show') // Select last tab +$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed) +{% endhighlight %} + +

Markup

+

You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the Bootstrap tab styling, while adding the nav and nav-pills classes will apply pill styling.

+{% highlight html %} + + + + +
+
...
+
...
+
...
+
...
+
+{% endhighlight %} + +

Fade effect

+

To make tabs fade in, add .fade to each .tab-pane. The first tab pane must also have .in to properly fade in initial content.

+{% highlight html %} +
+
...
+
...
+
...
+
...
+
+{% endhighlight %} + +

Methods

+

$().tab

+

+ Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM. +

+{% highlight html %} + + +
+
...
+
...
+
...
+
...
+
+ + +{% endhighlight %} + +

Events

+
+ + + + + + + + + + + + + + + + + +
Event TypeDescription
show.bs.tabThis event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
shown.bs.tabThis event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
+
+{% highlight js %} +$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { + e.target // activated tab + e.relatedTarget // previous tab +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html new file mode 100644 index 0000000000..2656556bed --- /dev/null +++ b/docs/_includes/js/tooltips.html @@ -0,0 +1,200 @@ +
+

Tooltips tooltip.js

+ +

Examples

+

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.

+

Hover over the links below to see tooltips:

+
+

Tight pants next level keffiyeh you probably 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 have 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 whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral. +

+
+ +

Four directions

+
+
+ + + + +
+
+{% highlight html %} + + + + + + + +{% endhighlight %} + +
+

Opt-in functionality

+

For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

+
+
+

Tooltips in button groups and input groups require special setting

+

When using tooltips on elements within a .btn-group or an .input-group, you'll have to specify the option container: 'body' (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).

+
+
+

Tooltips on disabled elements require wrapper elements

+

To add a tooltip to a disabled or .disabled element, put the element inside of a <div> and apply the tooltip to that <div> instead.

+
+ +

Usage

+

The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element.

+

Trigger the tooltip via JavaScript:

+{% highlight js %} +$('#example').tooltip(options) +{% endhighlight %} + +

Markup

+

The required markup for a tooltip is only a data attribute and title 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 top by the plugin).

+
+

Multiple-line links

+

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 white-space: nowrap; to your anchors to avoid this.

+
+{% highlight html linenos %} + +Hover over me + + +
+
+ Some tooltip text! +
+
+
+{% endhighlight %} + +

Options

+

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nametypedefaultdescription
animationbooleantrueapply a CSS fade transition to the tooltip
htmlbooleanfalseInsert HTML into the tooltip. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.
placementstring | function'top'how to position the tooltip - top | bottom | left | right | auto.
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.
selectorstringfalseIf a selector is provided, tooltip objects will be delegated to the specified targets.
titlestring | function''default title value if title attribute isn't present
triggerstring'hover focus'how tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.
delaynumber | object0 +

delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

+

If a number is supplied, delay is applied to both hide/show

+

Object structure is: delay: { show: 500, hide: 100 }

+
containerstring | falsefalse +

Appends the tooltip to a specific element. Example: container: 'body'

+
+
+
+

Data attributes for individual tooltips

+

Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.

+
+ +

Methods

+ +

$().tooltip(options)

+

Attaches a tooltip handler to an element collection.

+ +

.tooltip('show')

+

Reveals an element's tooltip.

+ {% highlight js %}$('#element').tooltip('show'){% endhighlight %} + +

.tooltip('hide')

+

Hides an element's tooltip.

+ {% highlight js %}$('#element').tooltip('hide'){% endhighlight %} + +

.tooltip('toggle')

+

Toggles an element's tooltip.

+ {% highlight js %}$('#element').tooltip('toggle'){% endhighlight %} + +

.tooltip('destroy')

+

Hides and destroys an element's tooltip.

+ {% highlight js %}$('#element').tooltip('destroy'){% endhighlight %} + +

Events

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Event TypeDescription
show.bs.tooltipThis event fires immediately when the show instance method is called.
shown.bs.tooltipThis event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).
hide.bs.tooltipThis event is fired immediately when the hide instance method has been called.
hidden.bs.tooltipThis event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).
+
+{% highlight js %} +$('#myTooltip').on('hidden.bs.tooltip', function () { + // do something… +}) +{% endhighlight %} +
diff --git a/docs/_includes/js/transitions.html b/docs/_includes/js/transitions.html new file mode 100644 index 0000000000..cce018805c --- /dev/null +++ b/docs/_includes/js/transitions.html @@ -0,0 +1,8 @@ +
+

Transitions transition.js

+ +

About transitions

+

For simple transition effects, include transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.

+

What's inside

+

Transition.js is a basic helper for transitionEnd events as well as a CSS transition emulator. It's used by the other plugins to check for CSS transition support and to catch hanging transitions.

+
diff --git a/docs/_includes/nav-getting-started.html b/docs/_includes/nav-getting-started.html index 54e24839d6..e253bf1c1a 100644 --- a/docs/_includes/nav-getting-started.html +++ b/docs/_includes/nav-getting-started.html @@ -54,9 +54,6 @@
  • License FAQs
  • -
  • - Customizing Bootstrap -
  • Translations
  • diff --git a/docs/assets/css/docs.min.css b/docs/assets/css/docs.min.css index a1e37fb105..7c78176c53 100644 --- a/docs/assets/css/docs.min.css +++ b/docs/assets/css/docs.min.css @@ -3,4 +3,4 @@ * 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/. - */body{position:relative}.table code{font-size:13px;font-weight:400}.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}.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}.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}.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}.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}}.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}.github-btn{overflow:hidden;border:0}.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}.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-top:80px;padding-bottom:80px}.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}}.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}}.carbonad{width:auto!important;height:auto!important;padding:20px!important;margin:30px -30px -31px!important;overflow:hidden;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}@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;width:330px!important;padding:15px!important;margin:0!important}.bs-docs-masthead .carbonad{position:static}}.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:400;color:#333}.half-rule{width:100px;margin:40px auto}.bs-docs-featurette h3{margin-bottom:5px;font-weight:400;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}.bs-docs-featured-sites{margin-right:-1px;margin-left:-1px}.bs-docs-featured-sites .col-sm-3{padding-right:1px;padding-left:1px}@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-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}.bs-docs-featurette .img-responsive{margin-top:0}}.bs-docs-sidebar.affix{position:static}@media (min-width:768px){.bs-docs-sidebar{padding-left:20px}}.bs-docs-sidenav{margin-top:20px;margin-bottom:20px}.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:700;color:#563d7c;background-color:transparent;border-left:2px solid #563d7c}.bs-docs-sidebar .nav .nav{display:none;padding-bottom:10px}.bs-docs-sidebar .nav .nav>li>a{padding-top:1px;padding-bottom:1px;padding-left:30px;font-size:12px;font-weight:400}.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{display:none;padding:4px 10px;margin-top:10px;margin-left:10px;font-size:12px;font-weight:500;color:#999}.back-to-top:hover{color:#563d7c;text-decoration:none}@media (min-width:768px){.back-to-top{display:block}}@media (min-width:992px){.bs-docs-sidebar .nav>.active>ul{display:block}.bs-docs-sidebar.affix,.bs-docs-sidebar.affix-bottom{width:213px}.bs-docs-sidebar.affix{position:fixed;top:20px}.bs-docs-sidebar.affix-bottom{position:absolute}.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){.bs-docs-sidebar.affix-bottom,.bs-docs-sidebar.affix{width:263px}}.bs-docs-section{margin-bottom:60px}.bs-docs-section:last-child{margin-bottom:0}h1[id]{padding-top:20px;margin-top:0}.bs-callout{padding:20px;margin:20px 0;border-left:3px solid #eee}.bs-callout h4{margin-top:0;margin-bottom:5px}.bs-callout p:last-child{margin-bottom:0}.bs-callout code{background-color:#fff;border-radius:3px}.bs-callout-danger{background-color:#fdf7f7;border-color:#d9534f}.bs-callout-danger h4{color:#d9534f}.bs-callout-warning{background-color:#fcf8f2;border-color:#f0ad4e}.bs-callout-warning h4{color:#f0ad4e}.bs-callout-info{background-color:#f4f8fa;border-color:#5bc0de}.bs-callout-info h4{color:#5bc0de}.color-swatches{margin:0 -5px;overflow:hidden}.color-swatch{float:left;width:60px;height:60px;margin:0 5px;border-radius:3px}@media (min-width:768px){.color-swatch{width:100px;height:100px}}.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}.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}.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}.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)}.bs-example{position:relative;padding:45px 15px 15px;margin:0 -15px 15px;background-color:#fafafa;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)}.bs-example:after{position:absolute;top:15px;left:15px;font-size:12px;font-weight:700;color:#bbb;text-transform:uppercase;letter-spacing:1px;content:"Example"}.bs-example+.highlight{margin:-15px -15px 15px;border-width:0 0 1px;border-radius:0}@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{margin-top:-16px;margin-right:0;margin-left:0;border-width:1px;border-bottom-right-radius:4px;border-bottom-left-radius:4px}}.bs-example .container{width:auto}.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}.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}.bs-example-bg-classes p{padding:15px}.bs-example>.img-circle,.bs-example>.img-rounded,.bs-example>.img-thumbnail{margin:5px}.bs-example>.table-responsive>.table{background-color:#fff}.bs-example>.btn,.bs-example>.btn-group{margin-top:5px;margin-bottom:5px}.bs-example>.btn-toolbar+.btn-toolbar{margin-top:10px}.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}.bs-example>.list-group{max-width:400px}.bs-example .navbar:last-child{margin-bottom:0}.bs-navbar-top-example,.bs-navbar-bottom-example{z-index:1;padding:0;overflow:hidden}.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}.bs-navbar-top-example{border-radius:0 0 4px 4px}.bs-navbar-bottom-example{border-radius:4px 4px 0 0}}.bs-example .pagination{margin-top:10px;margin-bottom:10px}.bs-example>.pager{margin-top:0}.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}.bs-example>.dropdown>.dropdown-menu{position:static;display:block;margin-bottom:5px}.bs-example-tabs .nav-tabs{margin-bottom:15px}.bs-example-tooltips{text-align:center}.bs-example-tooltips>.btn{margin-top:5px;margin-bottom:5px}.bs-example-popover{padding-bottom:24px;background-color:#f9f9f9}.bs-example-popover .popover{position:relative;display:block;float:left;width:260px;margin:20px}.scrollspy-example{position:relative;height:200px;margin-top:10px;overflow:auto}.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;white-space:nowrap;background-color:transparent;border:0}.highlight pre code{font-size:inherit;color:#333}.highlight pre .lineno{display:inline-block;width:22px;padding-right:5px;margin-right:10px;color:#bebec5;text-align:right}.table-responsive .highlight pre{white-space:normal}.bs-table th small,.responsive-utilities th small{display:block;font-weight:400;color:#999}.responsive-utilities tbody th{font-weight:400}.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-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:700;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}.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}.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}}.bs-customizer .toggle{float:right;margin-top:25px}.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;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}#less-section label{font-weight:400}.bs-customizer-input{float:left;width:33.333333%;padding-right:15px;padding-left:15px}.bs-customize-download .btn-outline{padding:20px}.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-brand-logos{display:table;width:100%;margin-bottom:15px;overflow:hidden;color:#563d7c;background-color:#f9f9f9;border-radius:4px}.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}.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}.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}}.bs-examples .thumbnail{margin-bottom:10px}.bs-examples h4{margin-bottom:5px}.bs-examples p{margin-bottom:20px}#focusedInput{border-color:#ccc;border-color:rgba(82,168,236,.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:0 0 8px rgba(82,168,236,.6);box-shadow:0 0 8px rgba(82,168,236,.6)}.hll{background-color:#ffc}.c{color:#999}.err{color:#A00;background-color:#FAA}.k{color:#069}.o{color:#555}.cm{color:#999}.cp{color:#099}.c1{color:#999}.cs{color:#999}.gd{background-color:#FCC;border:1px solid #C00}.ge{font-style:italic}.gr{color:red}.gh{color:#030}.gi{background-color:#CFC;border:1px solid #0C0}.go{color:#AAA}.gp{color:#009}.gu{color:#030}.gt{color:#9C6}.kc{color:#069}.kd{color:#069}.kn{color:#069}.kp{color:#069}.kr{color:#069}.kt{color:#078}.m{color:#F60}.s{color:#d44950}.na{color:#4f9fcf}.nb{color:#366}.nc{color:#0A8}.no{color:#360}.nd{color:#99F}.ni{color:#999}.ne{color:#C00}.nf{color:#C0F}.nl{color:#99F}.nn{color:#0CF}.nt{color:#2f6f9f}.nv{color:#033}.ow{color:#000}.w{color:#bbb}.mf{color:#F60}.mh{color:#F60}.mi{color:#F60}.mo{color:#F60}.sb{color:#C30}.sc{color:#C30}.sd{color:#C30;font-style:italic}.s2{color:#C30}.se{color:#C30}.sh{color:#C30}.si{color:#A00}.sx{color:#C30}.sr{color:#3AA}.s1{color:#C30}.ss{color:#FC3}.bp{color:#366}.vc{color:#033}.vg{color:#033}.vi{color:#033}.il{color:#F60}.css .o,.css .o+.nt,.css .nt+.nt{color:#999} \ No newline at end of file + */body{position:relative}.table code{font-size:13px;font-weight:400}.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}.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}.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}.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}.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}}.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}.github-btn{overflow:hidden;border:0}.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}.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-top:80px;padding-bottom:80px}.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}}.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}}.carbonad{width:auto!important;height:auto!important;padding:20px!important;margin:30px -30px -31px!important;overflow:hidden;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}@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;width:330px!important;padding:15px!important;margin:0!important}.bs-docs-masthead .carbonad{position:static}}.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:400;color:#333}.half-rule{width:100px;margin:40px auto}.bs-docs-featurette h3{margin-bottom:5px;font-weight:400;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}.bs-docs-featured-sites{margin-right:-1px;margin-left:-1px}.bs-docs-featured-sites .col-sm-3{padding-right:1px;padding-left:1px}@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-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}.bs-docs-featurette .img-responsive{margin-top:0}}.bs-docs-sidebar.affix{position:static}@media (min-width:768px){.bs-docs-sidebar{padding-left:20px}}.bs-docs-sidenav{margin-top:20px;margin-bottom:20px}.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:700;color:#563d7c;background-color:transparent;border-left:2px solid #563d7c}.bs-docs-sidebar .nav .nav{display:none;padding-bottom:10px}.bs-docs-sidebar .nav .nav>li>a{padding-top:1px;padding-bottom:1px;padding-left:30px;font-size:12px;font-weight:400}.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{display:none;padding:4px 10px;margin-top:10px;margin-left:10px;font-size:12px;font-weight:500;color:#999}.back-to-top:hover{color:#563d7c;text-decoration:none}@media (min-width:768px){.back-to-top{display:block}}@media (min-width:992px){.bs-docs-sidebar .nav>.active>ul{display:block}.bs-docs-sidebar.affix,.bs-docs-sidebar.affix-bottom{width:213px}.bs-docs-sidebar.affix{position:fixed;top:20px}.bs-docs-sidebar.affix-bottom{position:absolute}.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){.bs-docs-sidebar.affix-bottom,.bs-docs-sidebar.affix{width:263px}}.bs-docs-section{margin-bottom:60px}.bs-docs-section:last-child{margin-bottom:0}h1[id]{padding-top:20px;margin-top:0}.bs-callout{padding:20px;margin:20px 0;border-left:3px solid #eee}.bs-callout h4{margin-top:0;margin-bottom:5px}.bs-callout p:last-child{margin-bottom:0}.bs-callout code{background-color:#fff;border-radius:3px}.bs-callout-danger{background-color:#fdf7f7;border-color:#d9534f}.bs-callout-danger h4{color:#d9534f}.bs-callout-warning{background-color:#fcf8f2;border-color:#f0ad4e}.bs-callout-warning h4{color:#f0ad4e}.bs-callout-info{background-color:#f4f8fa;border-color:#5bc0de}.bs-callout-info h4{color:#5bc0de}.color-swatches{margin:0 -5px;overflow:hidden}.color-swatch{float:left;width:60px;height:60px;margin:0 5px;border-radius:3px}@media (min-width:768px){.color-swatch{width:100px;height:100px}}.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}.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}.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}.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)}.bs-example{position:relative;padding:45px 15px 15px;margin:0 -15px 15px;background-color:#fafafa;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)}.bs-example:after{position:absolute;top:15px;left:15px;font-size:12px;font-weight:700;color:#bbb;text-transform:uppercase;letter-spacing:1px;content:"Example"}.bs-example+.highlight{margin:-15px -15px 15px;border-width:0 0 1px;border-radius:0}@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{margin-top:-16px;margin-right:0;margin-left:0;border-width:1px;border-bottom-right-radius:4px;border-bottom-left-radius:4px}}.bs-example .container{width:auto}.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}.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}.bs-example-bg-classes p{padding:15px}.bs-example>.img-circle,.bs-example>.img-rounded,.bs-example>.img-thumbnail{margin:5px}.bs-example>.table-responsive>.table{background-color:#fff}.bs-example>.btn,.bs-example>.btn-group{margin-top:5px;margin-bottom:5px}.bs-example>.btn-toolbar+.btn-toolbar{margin-top:10px}.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}.bs-example>.list-group{max-width:400px}.bs-example .navbar:last-child{margin-bottom:0}.bs-navbar-top-example,.bs-navbar-bottom-example{z-index:1;padding:0;overflow:hidden}.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}.bs-navbar-top-example{border-radius:0 0 4px 4px}.bs-navbar-bottom-example{border-radius:4px 4px 0 0}}.bs-example .pagination{margin-top:10px;margin-bottom:10px}.bs-example>.pager{margin-top:0}.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}.bs-example>.dropdown>.dropdown-menu{position:static;display:block;margin-bottom:5px}.bs-example-tabs .nav-tabs{margin-bottom:15px}.bs-example-tooltips{text-align:center}.bs-example-tooltips>.btn{margin-top:5px;margin-bottom:5px}.bs-example-popover{padding-bottom:24px;background-color:#f9f9f9}.bs-example-popover .popover{position:relative;display:block;float:left;width:260px;margin:20px}.scrollspy-example{position:relative;height:200px;margin-top:10px;overflow:auto}.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;white-space:nowrap;background-color:transparent;border:0}.highlight pre code{font-size:inherit;color:#333}.highlight pre .lineno{display:inline-block;width:22px;padding-right:5px;margin-right:10px;color:#bebec5;text-align:right}.table-responsive .highlight pre{white-space:normal}.bs-table th small,.responsive-utilities th small{display:block;font-weight:400;color:#999}.responsive-utilities tbody th{font-weight:400}.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-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:700;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}.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}.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}}.bs-customizer .toggle{float:right;margin-top:25px}.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;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}#less-section label{font-weight:400}.bs-customizer-input{float:left;width:33.333333%;padding-right:15px;padding-left:15px}.bs-customize-download .btn-outline{padding:20px}.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-brand-logos{display:table;width:100%;margin-bottom:15px;overflow:hidden;color:#563d7c;background-color:#f9f9f9;border-radius:4px}.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}.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}.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}}.bs-downloads{margin-bottom:20px}.bs-examples .thumbnail{margin-bottom:10px}.bs-examples h4{margin-bottom:5px}.bs-examples p{margin-bottom:20px}#focusedInput{border-color:#ccc;border-color:rgba(82,168,236,.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:0 0 8px rgba(82,168,236,.6);box-shadow:0 0 8px rgba(82,168,236,.6)}.hll{background-color:#ffc}.c{color:#999}.err{color:#A00;background-color:#FAA}.k{color:#069}.o{color:#555}.cm{color:#999}.cp{color:#099}.c1{color:#999}.cs{color:#999}.gd{background-color:#FCC;border:1px solid #C00}.ge{font-style:italic}.gr{color:red}.gh{color:#030}.gi{background-color:#CFC;border:1px solid #0C0}.go{color:#AAA}.gp{color:#009}.gu{color:#030}.gt{color:#9C6}.kc{color:#069}.kd{color:#069}.kn{color:#069}.kp{color:#069}.kr{color:#069}.kt{color:#078}.m{color:#F60}.s{color:#d44950}.na{color:#4f9fcf}.nb{color:#366}.nc{color:#0A8}.no{color:#360}.nd{color:#99F}.ni{color:#999}.ne{color:#C00}.nf{color:#C0F}.nl{color:#99F}.nn{color:#0CF}.nt{color:#2f6f9f}.nv{color:#033}.ow{color:#000}.w{color:#bbb}.mf{color:#F60}.mh{color:#F60}.mi{color:#F60}.mo{color:#F60}.sb{color:#C30}.sc{color:#C30}.sd{color:#C30;font-style:italic}.s2{color:#C30}.se{color:#C30}.sh{color:#C30}.si{color:#A00}.sx{color:#C30}.sr{color:#3AA}.s1{color:#C30}.ss{color:#FC3}.bp{color:#366}.vc{color:#033}.vg{color:#033}.vi{color:#033}.il{color:#F60}.css .o,.css .o+.nt,.css .nt+.nt{color:#999} \ No newline at end of file diff --git a/docs/assets/js/customize.min.js b/docs/assets/js/customize.min.js index 6308ad215d..ec9788a662 100644 --- a/docs/assets/js/customize.min.js +++ b/docs/assets/js/customize.min.js @@ -10,7 +10,7 @@ */ /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ if(!function(a,b){function c(b){return a.less[b.split("/")[1]]}function d(a,b){"undefined"!=typeof console&&w.logLevel>=b&&console.log("less: "+a)}function e(a){return a.replace(/^[a-z-]+:\/+?[^\/]+/,"").replace(/^\//,"").replace(/\.[a-zA-Z]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function f(a,c){var e="{line} {content}",f=a.filename||c,g=[],h=(a.type||"Syntax")+"Error: "+(a.message||"There is an error in your .less file")+" in "+f+" ",i=function(a,c,d){a.extract[c]!==b&&g.push(e.replace(/\{line\}/,(parseInt(a.line,10)||0)+(c-1)).replace(/\{class\}/,d).replace(/\{content\}/,a.extract[c]))};a.extract?(i(a,0,""),i(a,1,"line"),i(a,2,""),h+="on line "+a.line+", column "+(a.column+1)+":\n"+g.join("\n")):a.stack&&(h+=a.stack),d(h,z.errors)}function g(a,b,c){var f=b.href||"",g="less:"+(b.title||e(f)),h=document.getElementById(g),i=!1,j=document.createElement("style");if(j.setAttribute("type","text/css"),b.media&&j.setAttribute("media",b.media),j.id=g,j.styleSheet)try{j.styleSheet.cssText=a}catch(k){throw new Error("Couldn't reassign styleSheet.cssText.")}else j.appendChild(document.createTextNode(a)),i=null!==h&&h.childNodes.length>0&&j.childNodes.length>0&&h.firstChild.nodeValue===j.firstChild.nodeValue;var l=document.getElementsByTagName("head")[0];if(null===h||i===!1){var m=b&&b.nextSibling||null;m?m.parentNode.insertBefore(j,m):l.appendChild(j)}if(h&&i===!1&&h.parentNode.removeChild(h),c&&D){d("saving "+f+" to cache.",z.info);try{D.setItem(f,a),D.setItem(f+":timestamp",c)}catch(k){d("failed to save",z.errors)}}}function h(a){return w.postProcessor&&"function"==typeof w.postProcessor&&(a=w.postProcessor.call(a,a)||a),a}function i(a,c){var d,f,h="less-error-message:"+e(c||""),i='
  • {content}
  • ',j=document.createElement("div"),k=[],l=a.filename||c,m=l.match(/([^\/]+(\?.*)?)$/)[1];j.id=h,j.className="less-error-message",f="

    "+(a.type||"Syntax")+"Error: "+(a.message||"There is an error in your .less file")+'

    in '+m+" ";var n=function(a,c,d){a.extract[c]!==b&&k.push(i.replace(/\{line\}/,(parseInt(a.line,10)||0)+(c-1)).replace(/\{class\}/,d).replace(/\{content\}/,a.extract[c]))};a.extract?(n(a,0,""),n(a,1,"line"),n(a,2,""),f+="on line "+a.line+", column "+(a.column+1)+":

    "):a.stack&&(f+="
    "+a.stack.split("\n").slice(1).join("
    ")),j.innerHTML=f,g([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),j.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),"development"==w.env&&(d=setInterval(function(){document.body&&(document.getElementById(h)?document.body.replaceChild(j,document.getElementById(h)):document.body.insertBefore(j,document.body.firstChild),clearInterval(d))},10))}function j(a,b){w.errorReporting&&"html"!==w.errorReporting?"console"===w.errorReporting?f(a,b):"function"==typeof w.errorReporting&&w.errorReporting("add",a,b):i(a,b)}function k(a){var b=document.getElementById("less-error-message:"+e(a));b&&b.parentNode.removeChild(b)}function l(){}function m(a){w.errorReporting&&"html"!==w.errorReporting?"console"===w.errorReporting?l(a):"function"==typeof w.errorReporting&&w.errorReporting("remove",a):k(a)}function n(a){for(var b,c=document.getElementsByTagName("style"),d=0;d0&&(h.splice(c-1,2),c-=2)}return g.hostPart=f[1],g.directories=h,g.path=f[1]+h.join("/"),g.fileUrl=g.path+(f[4]||""),g.url=g.fileUrl+(f[5]||""),g}function p(a,b){var c,d,e,f,g=o(a),h=o(b),i="";if(g.hostPart!==h.hostPart)return"";for(d=Math.max(h.directories.length,g.directories.length),c=0;d>c&&h.directories[c]===g.directories[c];c++);for(f=h.directories.slice(c),e=g.directories.slice(c),c=0;c=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):"function"==typeof d&&d(b.status,a)}var g=q(),h=y?w.fileAsync:w.async;"function"==typeof g.overrideMimeType&&g.overrideMimeType("text/css"),d("XHR: Getting '"+a+"'",z.debug),g.open("GET",a,h),g.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),g.send(null),y&&!w.fileAsync?0===g.status||g.status>=200&&g.status<300?c(g.responseText):e(g.status,a):h?g.onreadystatechange=function(){4==g.readyState&&f(g,c,e)}:f(g,c,e)}function s(b,c,d,e){c&&c.currentDirectory&&!/^([a-z-]+:)?\//.test(b)&&(b=c.currentDirectory+b);var f=o(b,a.location.href),g=f.url,h={currentDirectory:f.path,filename:g};if(c?(h.entryPath=c.entryPath,h.rootpath=c.rootpath,h.rootFilename=c.rootFilename,h.relativeUrls=c.relativeUrls):(h.entryPath=f.path,h.rootpath=w.rootpath||f.path,h.rootFilename=g,h.relativeUrls=e.relativeUrls),h.relativeUrls&&(h.rootpath=e.rootpath?o(e.rootpath+p(f.path,h.entryPath)).path:f.path),e.useFileCache&&E[g])try{var i=E[g];d(null,i,g,h,{lastModified:new Date})}catch(j){d(j,null,g)}else r(g,e.mime,function(a,b){E[g]=a;try{d(null,a,g,h,{lastModified:b})}catch(c){d(c,null,g)}},function(a,b){d({type:"File",message:"'"+b+"' wasn't found ("+a+")"},null,g)})}function t(a,b,c,d,e){var f=new w.tree.parseEnv(w);f.mime=a.type,(e||w.globalVars)&&(f.useFileCache=!0),s(a.href,null,function(h,i,j,k,l){if(l){l.remaining=d;var n=D&&D.getItem(j),o=D&&D.getItem(j+":timestamp");if(!c&&o&&l.lastModified&&new Date(l.lastModified).valueOf()===new Date(o).valueOf())return g(n,a),l.local=!0,void b(null,null,i,a,l,j)}m(j),i?(f.currentFileInfo=k,new w.Parser(f).parse(i,function(c,d){if(c)return b(c,null,null,a);try{b(c,d,i,a,l,j)}catch(c){b(c,null,null,a)}},{modifyVars:e,globalVars:w.globalVars})):b(h,null,null,a,l,j)},f,e)}function u(a,b,c){for(var d=0;dD&&(C=C.slice(y-D),D=y)}function h(a,b){var c=a.charCodeAt(0|b);return 32>=c&&(32===c||10===c||9===c)}function i(a){var b,c,d=typeof a;return"string"===d?v.charAt(y)!==a?null:(l(1),a):(g(),(b=a.exec(C))?(c=b[0].length,l(c),"string"==typeof b?b:1===b.length?b[0]:b):null)}function j(a){y>D&&(C=C.slice(y-D),D=y);var b=a.exec(C);return b?(l(b[0].length),"string"==typeof b?b:1===b.length?b[0]:b):null}function k(a){return v.charAt(y)!==a?null:(l(1),a)}function l(a){for(var b,c=y,d=z,e=y-D,f=y+C.length-e,g=y+=a,h=v;f>y&&(b=h.charCodeAt(y),!(b>32))&&(32===b||10===b||9===b||13===b);y++);return C=C.slice(a+y-g+e),D=y,!C.length&&z=0&&"\n"!==b.charAt(c);)e++;return"number"==typeof a&&(d=(b.slice(0,a).match(/\n/g)||"").length),{line:d,column:e}}function t(a,b,d){var e=d.currentFileInfo.filename;return"browser"!==w.mode&&"rhino"!==w.mode&&(e=c("path").resolve(e)),{lineNumber:s(a,b).line+1,fileName:e}}function u(a,b){var c=r(a,b),d=s(a.index,c),e=d.line,f=d.column,g=a.call&&s(a.call,c).line,h=c.split("\n");this.type=a.type||"Syntax",this.message=a.message,this.filename=a.filename||b.currentFileInfo.filename,this.index=a.index,this.line="number"==typeof e?e+1:null,this.callLine=g+1,this.callExtract=h[g],this.stack=a.stack,this.column=f,this.extract=[h[e-1],h[e],h[e+1]]}var v,y,z,A,B,C,D,E,F,G=[],H=a&&a.filename;a instanceof x.parseEnv||(a=new x.parseEnv(a));var I=this.imports={paths:a.paths||[],queue:[],files:a.files,contents:a.contents,contentsIgnoredChars:a.contentsIgnoredChars,mime:a.mime,error:null,push:function(b,c,d,e){var f=this;this.queue.push(b);var g=function(a,c,d){f.queue.splice(f.queue.indexOf(b),1);var g=d===H;f.files[d]=c,a&&!f.error&&(f.error=a),e(a,c,g,d)};w.Parser.importer?w.Parser.importer(b,c,g,a):w.Parser.fileLoader(b,c,function(b,e,f,h){if(b)return void g(b);var i=new x.parseEnv(a);i.currentFileInfo=h,i.processImports=!1,i.contents[f]=e,(c.reference||d.reference)&&(h.reference=!0),d.inline?g(null,e,f):new w.Parser(i).parse(e,function(a,b){g(a,b,f)})},a)}},J=j;return u.prototype=new Error,u.prototype.constructor=u,this.env=a=a||{},this.optimization="optimization"in this.env?this.env.optimization:1,E={imports:I,parse:function(d,e,f){var g,h,i,j,k,l=null,m="";if(y=z=D=A=0,j=f&&f.globalVars?w.Parser.serializeVars(f.globalVars)+"\n":"",k=f&&f.modifyVars?"\n"+w.Parser.serializeVars(f.modifyVars):"",(j||f&&f.banner)&&(m=(f&&f.banner?f.banner:"")+j,E.imports.contentsIgnoredChars[a.currentFileInfo.filename]=m.length),d=d.replace(/\r\n/g,"\n"),v=d=m+d.replace(/^\uFEFF/,"")+k,E.imports.contents[a.currentFileInfo.filename]=d,B=function(b){function c(b,c){l=new u({index:c||i,type:"Parse",message:b,filename:a.currentFileInfo.filename},a)}function d(a){var c=i-s;512>c&&!a||!c||(r.push(b.slice(s,i+1)),s=i+1)}var e,f,g,h,i,j,k,m,n,o=b.length,p=0,q=0,r=[],s=0;for(i=0;o>i;i++)if(k=b.charCodeAt(i),!(k>=97&&122>=k||34>k))switch(k){case 40:q++,f=i;continue;case 41:if(--q<0)return c("missing opening `(`");continue;case 59:q||d();continue;case 123:p++,e=i;continue;case 125:if(--p<0)return c("missing opening `{`");p||q||d();continue;case 92:if(o-1>i){i++;continue}return c("unescaped `\\`");case 34:case 39:case 96:for(n=0,j=i,i+=1;o>i;i++)if(m=b.charCodeAt(i),!(m>96)){if(m==k){n=1;break}if(92==m){if(i==o-1)return c("unescaped `\\`");i++}}if(n)continue;return c("unmatched `"+String.fromCharCode(k)+"`",j);case 47:if(q||i==o-1)continue;if(m=b.charCodeAt(i+1),47==m)for(i+=2;o>i&&(m=b.charCodeAt(i),!(13>=m)||10!=m&&13!=m);i++);else if(42==m){for(g=j=i,i+=2;o-1>i&&(m=b.charCodeAt(i),125==m&&(h=i),42!=m||47!=b.charCodeAt(i+1));i++);if(i==o-1)return c("missing closing `*/`",j);i++}continue;case 42:if(o-1>i&&47==b.charCodeAt(i+1))return c("unmatched `/*`");continue}return 0!==p?g>e&&h>g?c("missing closing `}` or `*/`",e):c("missing closing `}`",e):0!==q?c("missing closing `)`",f):(d(!0),r)}(d),l)return e(new u(l,a));C=B[0];try{g=new x.Ruleset(null,this.parsers.primary()),g.root=!0,g.firstRoot=!0}catch(n){return e(new u(n,a))}if(g.toCSS=function(d){return function(e,f){e=e||{};var g,h,i=new x.evalEnv(e);"object"!=typeof f||Array.isArray(f)||(f=Object.keys(f).map(function(a){var b=f[a];return b instanceof x.Value||(b instanceof x.Expression||(b=new x.Expression([b])),b=new x.Value([b])),new x.Rule("@"+a,b,!1,null,0)}),i.frames=[new x.Ruleset(null,f)]);try{var j,k=[],l=[new x.joinSelectorVisitor,new x.processExtendsVisitor,new x.toCSSVisitor({compress:Boolean(e.compress)})],m=this;if(e.plugins)for(j=0;j57||43>b||47===b||44==b?void 0:(a=j(/^([+-]?\d*\.?\d+)(%|[a-z]+)?/),a?new x.Dimension(a[1],a[2]):void 0)},unicodeDescriptor:function(){var a;return a=j(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/),a?new x.UnicodeDescriptor(a[0]):void 0},javascript:function(){var c,d,e=y;return"~"===v.charAt(e)&&(e++,d=!0),"`"===v.charAt(e)?(a.javascriptEnabled===b||a.javascriptEnabled||o("You are using JavaScript, which has been disabled."),d&&k("~"),c=j(/^`([^`]*)`/),c?new x.JavaScript(c[1],y,d):void 0):void 0}},variable:function(){var a;return"@"===v.charAt(y)&&(a=j(/^(@[\w-]+)\s*:/))?a[1]:void 0},rulesetCall:function(){var a;return"@"===v.charAt(y)&&(a=j(/^(@[\w-]+)\s*\(\s*\)\s*;/))?new x.RulesetCall(a[1]):void 0},extend:function(a){var b,c,d,e,f,g=y;if(j(a?/^&:extend\(/:/^:extend\(/)){do{for(d=null,b=null;!(d=j(/^(all)(?=\s*(\)|,))/))&&(c=this.element());)b?b.push(c):b=[c];d=d&&d[1],f=new x.Extend(new x.Selector(b),d,g),e?e.push(f):e=[f]}while(k(","));return m(/^\)/),a&&m(/^;/),e}},extendRule:function(){return this.extend(!0)},mixin:{call:function(){var b,c,g,h,i,l,m=v.charAt(y),o=!1,p=y;if("."===m||"#"===m){for(d();b=y,h=j(/^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/),h;)g=new x.Element(i,h,b,a.currentFileInfo),c?c.push(g):c=[g],i=k(">");return c&&(k("(")&&(l=this.args(!0).args,n(")")),F.important()&&(o=!0),F.end())?(f(),new x.mixin.Call(c,l,p,a.currentFileInfo,o)):void e()}},args:function(a){var b,c,g,h,i,l,m=E.parsers,n=m.entities,p={args:null,variadic:!1},q=[],r=[],s=[];for(d();;){if(a)l=m.detachedRuleset()||m.expression();else{if(m.comments(),"."===v.charAt(y)&&j(/^\.{3}/)){p.variadic=!0,k(";")&&!b&&(b=!0),(b?r:s).push({variadic:!0});break}l=n.variable()||n.literal()||n.keyword()}if(!l)break;h=null,l.throwAwayComments&&l.throwAwayComments(),i=l;var t=null;if(a?l.value&&1==l.value.length&&(t=l.value[0]):t=l,t&&t instanceof x.Variable)if(k(":")){if(q.length>0&&(b&&o("Cannot mix ; and , as delimiter types"),c=!0),i=a&&m.detachedRuleset()||m.expression(),!i){if(!a)return e(),p.args=[],p;o("could not understand value for named argument")}h=g=t.name}else{if(!a&&j(/^\.{3}/)){p.variadic=!0,k(";")&&!b&&(b=!0),(b?r:s).push({name:l.name,variadic:!0});break}a||(g=h=t.name,i=null)}i&&q.push(i),s.push({name:h,value:i}),k(",")||(k(";")||b)&&(c&&o("Cannot mix ; and , as delimiter types"),b=!0,q.length>1&&(i=new x.Value(q)),r.push({name:g,value:i}),g=null,q=[],c=!1)}return f(),p.args=b?r:s,p},definition:function(){var a,b,c,g,h=[],i=!1;if(!("."!==v.charAt(y)&&"#"!==v.charAt(y)||p(/^[^{]*\}/)))if(d(),b=j(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/)){a=b[1];var l=this.args(!1);if(h=l.args,i=l.variadic,!k(")"))return A=y,void e();if(F.comments(),j(/^when/)&&(g=m(F.conditions,"expected condition")),c=F.block())return f(),new x.mixin.Definition(a,h,c,g,i);e()}else f()}},entity:function(){var a=this.entities;return a.literal()||a.variable()||a.url()||a.call()||a.keyword()||a.javascript()||this.comment()},end:function(){return k(";")||q("}")},alpha:function(){var a;return j(/^\(opacity=/i)?(a=j(/^\d+/)||this.entities.variable(),a?(n(")"),new x.Alpha(a)):void 0):void 0},element:function(){var b,c,g,h=y;return c=this.combinator(),b=j(/^(?:\d+\.\d+|\d+)%/)||j(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/)||k("*")||k("&")||this.attribute()||j(/^\([^()@]+\)/)||j(/^[\.#](?=@)/)||this.entities.variableCurly(),b||(d(),k("(")?(g=this.selector())&&k(")")?(b=new x.Paren(g),f()):e():f()),b?new x.Element(c,b,h,a.currentFileInfo):void 0},combinator:function(){var a=v.charAt(y);if(">"===a||"+"===a||"~"===a||"|"===a||"^"===a){for(y++,"^"===v.charAt(y)&&(a="^^",y++);h(v,y);)y++;return new x.Combinator(a)}return new x.Combinator(h(v,y-1)?" ":null)},lessSelector:function(){return this.selector(!0)},selector:function(b){for(var c,d,e,f,g,h,i,j=y,k=J;(b&&(g=this.extend())||b&&(h=k(/^when/))||(f=this.element()))&&(h?i=m(this.conditions,"expected condition"):i?o("CSS guard can only be used at the end of selector"):g?d?d.push(g):d=[g]:(d&&o("Extend can only be used at the end of selector"),e=v.charAt(y),c?c.push(f):c=[f],f=null),"{"!==e&&"}"!==e&&";"!==e&&","!==e&&")"!==e););return c?new x.Selector(c,d,i,j,a.currentFileInfo):void(d&&o("Extend must be used to extend a selector, it cannot be used on its own"))},attribute:function(){if(k("[")){var a,b,c,d=this.entities;return(a=d.variableCurly())||(a=m(/^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/)),c=j(/^[|~*$^]?=/),c&&(b=d.quoted()||j(/^[0-9]+%/)||j(/^[\w-]+/)||d.variableCurly()),n("]"),new x.Attribute(a,c,b)}},block:function(){var a;return k("{")&&(a=this.primary())&&k("}")?a:void 0},blockRuleset:function(){var a=this.block();return a&&(a=new x.Ruleset(null,a)),a},detachedRuleset:function(){var a=this.blockRuleset();return a?new x.DetachedRuleset(a):void 0},ruleset:function(){var b,c,g,h;for(d(),a.dumpLineNumbers&&(h=t(y,v,a));(c=this.lessSelector(),c)&&(b?b.push(c):b=[c],this.comments(),c.condition&&b.length>1&&o("Guards are only currently allowed on a single selector."),k(","));)c.condition&&o("Guards are only currently allowed on a single selector."),this.comments();if(b&&(g=this.block())){f();var i=new x.Ruleset(b,g,a.strictImports);return a.dumpLineNumbers&&(i.debugInfo=h),i}A=y,e()},rule:function(b){var c,g,h,i,j,k=y,l=v.charAt(k);if("."!==l&&"#"!==l&&"&"!==l)if(d(),c=this.variable()||this.ruleProperty()){if(j="string"==typeof c,j&&(g=this.detachedRuleset()),g||(g=b||!a.compress&&!j?this.anonymousValue()||this.value():this.value()||this.anonymousValue(),h=this.important(),i=!j&&c.pop().value),g&&this.end())return f(),new x.Rule(c,g,h,i,k,a.currentFileInfo);if(A=y,e(),g&&!b)return this.rule(!0)}else f()},anonymousValue:function(){var a;return a=/^([^@+\/'"*`(;{}-]*);/.exec(C),a?(y+=a[0].length-1,new x.Anonymous(a[1])):void 0},"import":function(){var b,c,g=y;d();var h=j(/^@import?\s+/),i=(h?this.importOptions():null)||{};return h&&(b=this.entities.quoted()||this.entities.url())&&(c=this.mediaFeatures(),k(";"))?(f(),c=c&&new x.Value(c),new x.Import(b,c,i,g,a.currentFileInfo)):void e()},importOptions:function(){var a,b,c,d={};if(!k("("))return null;do if(a=this.importOption()){switch(b=a,c=!0,b){case"css":b="less",c=!1;break;case"once":b="multiple",c=!1}if(d[b]=c,!k(","))break}while(a);return n(")"),d},importOption:function(){var a=j(/^(less|css|multiple|once|inline|reference)/);return a?a[1]:void 0},mediaFeature:function(){var b,c,d=this.entities,e=[];do if(b=d.keyword()||d.variable())e.push(b);else if(k("(")){if(c=this.property(),b=this.value(),!k(")"))return null;if(c&&b)e.push(new x.Paren(new x.Rule(c,b,null,null,y,a.currentFileInfo,!0)));else{if(!b)return null;e.push(new x.Paren(b))}}while(b);return e.length>0?new x.Expression(e):void 0},mediaFeatures:function(){var a,b=this.entities,c=[];do if(a=this.mediaFeature()){if(c.push(a),!k(","))break}else if(a=b.variable(),a&&(c.push(a),!k(",")))break;while(a);return c.length>0?c:null},media:function(){var b,c,d,e;return a.dumpLineNumbers&&(e=t(y,v,a)),j(/^@media/)&&(b=this.mediaFeatures(),c=this.block())?(d=new x.Media(c,b,y,a.currentFileInfo),a.dumpLineNumbers&&(d.debugInfo=e),d):void 0},directive:function(){var b,c,g,h,i,l,m,n=y,p=!0;if("@"===v.charAt(y)){if(c=this["import"]()||this.media())return c;if(d(),b=j(/^@[a-z-]+/)){switch(h=b,"-"==b.charAt(1)&&b.indexOf("-",2)>0&&(h="@"+b.slice(b.indexOf("-",2)+1)),h){case"@charset":i=!0,p=!1;break;case"@namespace":l=!0,p=!1;break;case"@keyframes":i=!0;break;case"@host":case"@page":case"@document":case"@supports":m=!0}return i?(c=this.entity(),c||o("expected "+b+" identifier")):l?(c=this.expression(),c||o("expected "+b+" expression")):m&&(c=(j(/^[^{;]+/)||"").trim(),c&&(c=new x.Anonymous(c))),p&&(g=this.blockRuleset()),g||!p&&c&&k(";")?(f(),new x.Directive(b,c,g,n,a.currentFileInfo,a.dumpLineNumbers?t(n,v,a):null)):void e()}}},value:function(){var a,b=[];do if(a=this.expression(),a&&(b.push(a),!k(",")))break;while(a);return b.length>0?new x.Value(b):void 0},important:function(){return"!"===v.charAt(y)?j(/^! *important/):void 0},sub:function(){var a,b;return k("(")&&(a=this.addition())?(b=new x.Expression([a]),n(")"),b.parens=!0,b):void 0},multiplication:function(){var a,b,c,d,e;if(a=this.operand()){for(e=h(v,y-1);!p(/^\/[*\/]/)&&(c=k("/")||k("*"),c)&&(b=this.operand(),b);)a.parensInOp=!0,b.parensInOp=!0,d=new x.Operation(c,[d||a,b],e),e=h(v,y-1);return d||a}},addition:function(){var a,b,c,d,e;if(a=this.multiplication()){for(e=h(v,y-1);(c=j(/^[-+]\s+/)||!e&&(k("+")||k("-")),c)&&(b=this.multiplication(),b);)a.parensInOp=!0,b.parensInOp=!0,d=new x.Operation(c,[d||a,b],e),e=h(v,y-1);return d||a}},conditions:function(){var a,b,c,d=y;if(a=this.condition()){for(;p(/^,\s*(not\s*)?\(/)&&k(",")&&(b=this.condition(),b);)c=new x.Condition("or",c||a,b,d);return c||a}},condition:function(){var a,b,c,d,e=this.entities,f=y,g=!1;return j(/^not/)&&(g=!0),n("("),a=this.addition()||e.keyword()||e.quoted(),a?(d=j(/^(?:>=|<=|=<|[<=>])/),d?(b=this.addition()||e.keyword()||e.quoted(),b?c=new x.Condition(d,a,b,f,g):o("expected expression")):c=new x.Condition("=",a,new x.Keyword("true"),f,g),n(")"),j(/^and/)?new x.Condition("and",c,this.condition()):c):void 0},operand:function(){var a,b=this.entities,c=v.charAt(y+1);"-"!==v.charAt(y)||"@"!==c&&"("!==c||(a=k("-"));var d=this.sub()||b.dimension()||b.color()||b.variable()||b.call();return a&&(d.parensInOp=!0,d=new x.Negative(d)),d},expression:function(){var a,b,c=[];do a=this.addition()||this.entity(),a&&(c.push(a),p(/^\/[\/*]/)||(b=k("/"),b&&c.push(new x.Anonymous(b))));while(a);return c.length>0?new x.Expression(c):void 0},property:function(){var a=j(/^(\*?-?[_a-zA-Z0-9-]+)\s*:/);return a?a[1]:void 0},ruleProperty:function(){function b(a){var b=a.exec(e);return b?(g.push(y+h),h+=b[0].length,e=e.slice(b[1].length),f.push(b[1])):void 0}var c,d,e=C,f=[],g=[],h=0;for(b(/^(\*?)/);b(/^((?:[\w-]+)|(?:@\{[\w-]+\}))/););if(f.length>1&&b(/^\s*((?:\+_|\+)?)\s*:/)){for(l(h),""===f[0]&&(f.shift(),g.shift()),d=0;dl;l++)e=b.rgb[l]/255,f=c.rgb[l]/255,h=a(e,f),g&&(h=(j*f+i*(e-j*(e+f-h)))/g),k[l]=255*h;return new d.Color(k,g)}function g(){var a,b=d.functions;for(a in l)l.hasOwnProperty(a)&&(b[a]=e.bind(null,Math[a],l[a]));for(a in m)m.hasOwnProperty(a)&&(b[a]=f.bind(null,m[a]));a=d.defaultFunc,b["default"]=a.eval.bind(a)}function h(a){return d.functions.hsla(a.h,a.s,a.l,a.a)}function i(a,b){return a instanceof d.Dimension&&a.unit.is("%")?parseFloat(a.value*b/100):j(a)}function j(a){if(a instanceof d.Dimension)return parseFloat(a.unit.is("%")?a.value/100:a.value);if("number"==typeof a)return a;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function k(a){return Math.min(1,Math.max(0,a))}d.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(a,b,c,e){var f=[a,b,c].map(function(a){return i(a,255)});return e=j(e),new d.Color(f,e)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,c,d){function e(a){return a=0>a?a+1:a>1?a-1:a,1>6*a?g+(f-g)*a*6:1>2*a?f:2>3*a?g+(f-g)*(2/3-a)*6:g}a=j(a)%360/360,b=k(j(b)),c=k(j(c)),d=k(j(d));var f=.5>=c?c*(b+1):c+b-c*b,g=2*c-f;return this.rgba(255*e(a+1/3),255*e(a),255*e(a-1/3),d)},hsv:function(a,b,c){return this.hsva(a,b,c,1)},hsva:function(a,b,c,d){a=j(a)%360/360*360,b=j(b),c=j(c),d=j(d);var e,f;e=Math.floor(a/60%6),f=a/60-e;var g=[c,c*(1-b),c*(1-f*b),c*(1-(1-f)*b)],h=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]];return this.rgba(255*g[h[e][0]],255*g[h[e][1]],255*g[h[e][2]],d)},hue:function(a){return new d.Dimension(Math.round(a.toHSL().h))},saturation:function(a){return new d.Dimension(Math.round(100*a.toHSL().s),"%")},lightness:function(a){return new d.Dimension(Math.round(100*a.toHSL().l),"%")},hsvhue:function(a){return new d.Dimension(Math.round(a.toHSV().h))},hsvsaturation:function(a){return new d.Dimension(Math.round(100*a.toHSV().s),"%")},hsvvalue:function(a){return new d.Dimension(Math.round(100*a.toHSV().v),"%")},red:function(a){return new d.Dimension(a.rgb[0])},green:function(a){return new d.Dimension(a.rgb[1])},blue:function(a){return new d.Dimension(a.rgb[2])},alpha:function(a){return new d.Dimension(a.toHSL().a)},luma:function(a){return new d.Dimension(Math.round(a.luma()*a.alpha*100),"%")},luminance:function(a){var b=.2126*a.rgb[0]/255+.7152*a.rgb[1]/255+.0722*a.rgb[2]/255;return new d.Dimension(Math.round(b*a.alpha*100),"%")},saturate:function(a,b){if(!a.rgb)return null;var c=a.toHSL();return c.s+=b.value/100,c.s=k(c.s),h(c)},desaturate:function(a,b){var c=a.toHSL();return c.s-=b.value/100,c.s=k(c.s),h(c)},lighten:function(a,b){var c=a.toHSL();return c.l+=b.value/100,c.l=k(c.l),h(c)},darken:function(a,b){var c=a.toHSL();return c.l-=b.value/100,c.l=k(c.l),h(c)},fadein:function(a,b){var c=a.toHSL();return c.a+=b.value/100,c.a=k(c.a),h(c)},fadeout:function(a,b){var c=a.toHSL();return c.a-=b.value/100,c.a=k(c.a),h(c)},fade:function(a,b){var c=a.toHSL();return c.a=b.value/100,c.a=k(c.a),h(c)},spin:function(a,b){var c=a.toHSL(),d=(c.h+b.value)%360;return c.h=0>d?360+d:d,h(c)},mix:function(a,b,c){c||(c=new d.Dimension(50));var e=c.value/100,f=2*e-1,g=a.toHSL().a-b.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[a.rgb[0]*h+b.rgb[0]*i,a.rgb[1]*h+b.rgb[1]*i,a.rgb[2]*h+b.rgb[2]*i],k=a.alpha*e+b.alpha*(1-e);return new d.Color(j,k)},greyscale:function(a){return this.desaturate(a,new d.Dimension(100))},contrast:function(a,b,c,d){if(!a.rgb)return null;if("undefined"==typeof c&&(c=this.rgba(255,255,255,1)),"undefined"==typeof b&&(b=this.rgba(0,0,0,1)),b.luma()>c.luma()){var e=c;c=b,b=e}return d="undefined"==typeof d?.43:j(d),a.luma()i.value)&&(m[f]=g);else{if(k!==b&&j!==k)throw{type:"Argument",message:"incompatible types"};n[j]=m.length,m.push(g)}else Array.isArray(c[e].value)&&Array.prototype.push.apply(c,Array.prototype.slice.call(c[e].value));return 1==m.length?m[0]:(c=m.map(function(a){return a.toCSS(this.env)}).join(this.env.compress?",":", "),new d.Anonymous((a?"min":"max")+"("+c+")"))},min:function(){return this._minmax(!0,arguments)},max:function(){return this._minmax(!1,arguments)},"get-unit":function(a){return new d.Anonymous(a.unit)},argb:function(a){return new d.Anonymous(a.toARGB())},percentage:function(a){return new d.Dimension(100*a.value,"%")},color:function(a){if(a instanceof d.Quoted){var b,c=a.value;if(b=d.Color.fromKeyword(c))return b;if(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/.test(c))return new d.Color(c.slice(1));throw{type:"Argument",message:"argument must be a color keyword or 3/6 digit hex e.g. #FFF"}}throw{type:"Argument",message:"argument must be a string"}},iscolor:function(a){return this._isa(a,d.Color)},isnumber:function(a){return this._isa(a,d.Dimension)},isstring:function(a){return this._isa(a,d.Quoted)},iskeyword:function(a){return this._isa(a,d.Keyword)},isurl:function(a){return this._isa(a,d.URL)},ispixel:function(a){return this.isunit(a,"px")},ispercentage:function(a){return this.isunit(a,"%")},isem:function(a){return this.isunit(a,"em")},isunit:function(a,b){return a instanceof d.Dimension&&a.unit.is(b.value||b)?d.True:d.False},_isa:function(a,b){return a instanceof b?d.True:d.False},tint:function(a,b){return this.mix(this.rgb(255,255,255),a,b)},shade:function(a,b){return this.mix(this.rgb(0,0,0),a,b)},extract:function(a,b){return b=b.value-1,Array.isArray(a.value)?a.value[b]:Array(a)[b]},length:function(a){var b=Array.isArray(a.value)?a.value.length:1;return new d.Dimension(b)},"data-uri":function(b,e){if("undefined"!=typeof a)return new d.URL(e||b,this.currentFileInfo).eval(this.env);var f=b.value,g=e&&e.value,h=c("fs"),i=c("path"),j=!1;if(arguments.length<2&&(g=f),this.env.isPathRelative(g)&&(g=this.currentFileInfo.relativeUrls?i.join(this.currentFileInfo.currentDirectory,g):i.join(this.currentFileInfo.entryPath,g)),arguments.length<2){var k;try{k=c("mime")}catch(l){k=d._mime}f=k.lookup(g);var m=k.charsets.lookup(f);j=["US-ASCII","UTF-8"].indexOf(m)<0,j&&(f+=";base64")}else j=/;base64$/.test(f);var n=h.readFileSync(g),o=32,p=parseInt(n.length/1024,10);if(p>=o&&this.env.ieCompat!==!1)return this.env.silent||console.warn("Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!",g,p,o),new d.URL(e||b,this.currentFileInfo).eval(this.env);n=j?n.toString("base64"):encodeURIComponent(n);var q='"data:'+f+","+n+'"';return new d.URL(new d.Anonymous(q))},"svg-gradient":function(a){function e(){throw{type:"Argument",message:"svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position]"}}arguments.length<3&&e();var f,g,h,i,j,k,l,m=Array.prototype.slice.call(arguments,1),n="linear",o='x="0" y="0" width="1" height="1"',p=!0,q={compress:!1},r=a.toCSS(q);switch(r){case"to bottom":f='x1="0%" y1="0%" x2="0%" y2="100%"';break;case"to right":f='x1="0%" y1="0%" x2="100%" y2="0%"';break;case"to bottom right":f='x1="0%" y1="0%" x2="100%" y2="100%"';break;case"to top right":f='x1="0%" y1="100%" x2="100%" y2="0%"';break;case"ellipse":case"ellipse at center":n="radial",f='cx="50%" cy="50%" r="75%"',o='x="-50" y="-50" width="101" height="101"';break;default:throw{type:"Argument",message:"svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center'"}}for(g='<'+n+'Gradient id="gradient" gradientUnits="userSpaceOnUse" '+f+">",h=0;hl?' stop-opacity="'+l+'"':"")+"/>";if(g+="',p)try{g=c("./encoder").encodeBase64(g)}catch(s){p=!1}return g="'data:image/svg+xml"+(p?";base64":"")+","+g+"'",new d.URL(new d.Anonymous(g))}},d._mime={_types:{".htm":"text/html",".html":"text/html",".gif":"image/gif",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png"},lookup:function(a){var e=c("path").extname(a),f=d._mime._types[e];if(f===b)throw new Error('Optional dependency "mime" is required for '+e);return f},charsets:{lookup:function(a){return a&&/^text\//.test(a)?"UTF-8":""}}};var l={ceil:null,floor:null,sqrt:null,abs:null,tan:"",sin:"",cos:"",atan:"rad",asin:"rad",acos:"rad"},m={multiply:function(a,b){return a*b},screen:function(a,b){return a+b-a*b},overlay:function(a,b){return a*=2,1>=a?m.multiply(a,b):m.screen(a-1,b)},softlight:function(a,b){var c=1,d=a;return b>.5&&(d=1,c=a>.25?Math.sqrt(a):((16*a-12)*a+4)*a),a-(1-2*b)*d*(c-a)},hardlight:function(a,b){return m.overlay(b,a)},difference:function(a,b){return Math.abs(a-b)},exclusion:function(a,b){return a+b-2*a*b},average:function(a,b){return(a+b)/2},negation:function(a,b){return 1-Math.abs(a+b-1)}};d.defaultFunc={eval:function(){var a=this.value_,b=this.error_;if(b)throw b;return null!=a?a?d.True:d.False:void 0},value:function(a){this.value_=a},error:function(a){this.error_=a},reset:function(){this.value_=this.error_=null}},g(),d.fround=function(a,b){var c;return a&&null!=a.numPrecision?(c=Math.pow(10,a.numPrecision),Math.round(b*c)/c):b},d.functionCall=function(a,b){this.env=a,this.currentFileInfo=b},d.functionCall.prototype=d.functions}(c("./tree")),function(a){a.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(c("./tree")),function(a){a.debugInfo=function(b,c,d){var e="";if(b.dumpLineNumbers&&!b.compress)switch(b.dumpLineNumbers){case"comments":e=a.debugInfo.asComment(c);break;case"mediaquery":e=a.debugInfo.asMediaQuery(c);break;case"all":e=a.debugInfo.asComment(c)+(d||"")+a.debugInfo.asMediaQuery(c)}return e},a.debugInfo.asComment=function(a){return"/* line "+a.debugInfo.lineNumber+", "+a.debugInfo.fileName+" */\n"},a.debugInfo.asMediaQuery=function(a){return"@media -sass-debug-info{filename{font-family:"+("file://"+a.debugInfo.fileName).replace(/([.:\/\\])/g,function(a){return"\\"==a&&(a="/"),"\\"+a})+"}line{font-family:\\00003"+a.debugInfo.lineNumber+"}}\n"},a.find=function(a,b){for(var c,d=0;d1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)},a.toCSS=function(a){var b=[];return this.genCSS(a,{add:function(a){b.push(a)},isEmpty:function(){return 0===b.length}}),b.join("")},a.outputRuleset=function(a,b,c){var d,e=c.length;if(a.tabLevel=(0|a.tabLevel)+1,a.compress){for(b.add("{"),d=0;e>d;d++)c[d].genCSS(a,b);return b.add("}"),void a.tabLevel--}var f="\n"+Array(a.tabLevel).join(" "),g=f+" ";if(e){for(b.add(" {"+g),c[0].genCSS(a,b),d=1;e>d;d++)b.add(g),c[d].genCSS(a,b);b.add(f+"}")}else b.add(" {"+f+"}");a.tabLevel--}}(c("./tree")),function(a){a.Alpha=function(a){this.value=a},a.Alpha.prototype={type:"Alpha",accept:function(a){this.value=a.visit(this.value)},eval:function(b){return this.value.eval?new a.Alpha(this.value.eval(b)):this},genCSS:function(a,b){b.add("alpha(opacity="),this.value.genCSS?this.value.genCSS(a,b):b.add(this.value),b.add(")")},toCSS:a.toCSS}}(c("../tree")),function(a){a.Anonymous=function(a,b,c,d){this.value=a.value||a,this.index=b,this.mapLines=d,this.currentFileInfo=c},a.Anonymous.prototype={type:"Anonymous",eval:function(){return new a.Anonymous(this.value,this.index,this.currentFileInfo,this.mapLines)},compare:function(a){if(!a.toCSS)return-1;var b=this.toCSS(),c=a.toCSS();return b===c?0:c>b?-1:1},genCSS:function(a,b){b.add(this.value,this.currentFileInfo,this.index,this.mapLines)},toCSS:a.toCSS}}(c("../tree")),function(a){a.Assignment=function(a,b){this.key=a,this.value=b},a.Assignment.prototype={type:"Assignment",accept:function(a){this.value=a.visit(this.value)},eval:function(b){return this.value.eval?new a.Assignment(this.key,this.value.eval(b)):this},genCSS:function(a,b){b.add(this.key+"="),this.value.genCSS?this.value.genCSS(a,b):b.add(this.value)},toCSS:a.toCSS}}(c("../tree")),function(a){a.Call=function(a,b,c,d){this.name=a,this.args=b,this.index=c,this.currentFileInfo=d},a.Call.prototype={type:"Call",accept:function(a){this.args&&(this.args=a.visitArray(this.args))},eval:function(b){var c,d,e=this.args.map(function(a){return a.eval(b)}),f=this.name.toLowerCase();if(f in a.functions)try{if(d=new a.functionCall(b,this.currentFileInfo),c=d[f].apply(d,e),null!=c)return c}catch(g){throw{type:g.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(g.message?": "+g.message:""),index:this.index,filename:this.currentFileInfo.filename}}return new a.Call(this.name,e,this.index,this.currentFileInfo)},genCSS:function(a,b){b.add(this.name+"(",this.currentFileInfo,this.index);for(var c=0;ca?"0":"")+a.toString(16)}).join("")}function c(a,b){return Math.min(Math.max(a,0),b)}a.Color=function(a,b){this.rgb=Array.isArray(a)?a:6==a.length?a.match(/.{2}/g).map(function(a){return parseInt(a,16)}):a.split("").map(function(a){return parseInt(a+a,16)}),this.alpha="number"==typeof b?b:1};var d="transparent";a.Color.prototype={type:"Color",eval:function(){return this},luma:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255;return a=.03928>=a?a/12.92:Math.pow((a+.055)/1.055,2.4),b=.03928>=b?b/12.92:Math.pow((b+.055)/1.055,2.4),c=.03928>=c?c/12.92:Math.pow((c+.055)/1.055,2.4),.2126*a+.7152*b+.0722*c},genCSS:function(a,b){b.add(this.toCSS(a))},toCSS:function(b,e){var f=b&&b.compress&&!e,g=a.fround(b,this.alpha);if(1>g)return 0===g&&this.isTransparentKeyword?d:"rgba("+this.rgb.map(function(a){return c(Math.round(a),255)}).concat(c(g,1)).join(","+(f?"":" "))+")";var h=this.toRGB();if(f){var i=h.split("");i[1]===i[2]&&i[3]===i[4]&&i[5]===i[6]&&(h="#"+i[1]+i[3]+i[5])}return h},operate:function(b,c,d){for(var e=[],f=this.alpha*(1-d.alpha)+d.alpha,g=0;3>g;g++)e[g]=a.operate(b,c,this.rgb[g],d.rgb[g]);return new a.Color(e,f)},toRGB:function(){return b(this.rgb)},toHSL:function(){var a,b,c=this.rgb[0]/255,d=this.rgb[1]/255,e=this.rgb[2]/255,f=this.alpha,g=Math.max(c,d,e),h=Math.min(c,d,e),i=(g+h)/2,j=g-h;if(g===h)a=b=0;else{switch(b=i>.5?j/(2-g-h):j/(g+h),g){case c:a=(d-e)/j+(e>d?6:0);break;case d:a=(e-c)/j+2;break;case e:a=(c-d)/j+4}a/=6}return{h:360*a,s:b,l:i,a:f}},toHSV:function(){var a,b,c=this.rgb[0]/255,d=this.rgb[1]/255,e=this.rgb[2]/255,f=this.alpha,g=Math.max(c,d,e),h=Math.min(c,d,e),i=g,j=g-h;if(b=0===g?0:j/g,g===h)a=0;else{switch(g){case c:a=(d-e)/j+(e>d?6:0);break;case d:a=(e-c)/j+2;break;case e:a=(c-d)/j+4}a/=6}return{h:360*a,s:b,v:i,a:f}},toARGB:function(){return b([255*this.alpha].concat(this.rgb))},compare:function(a){return a.rgb&&a.rgb[0]===this.rgb[0]&&a.rgb[1]===this.rgb[1]&&a.rgb[2]===this.rgb[2]&&a.alpha===this.alpha?0:-1}},a.Color.fromKeyword=function(b){if(b=b.toLowerCase(),a.colors.hasOwnProperty(b))return new a.Color(a.colors[b].slice(1));if(b===d){var c=new a.Color([0,0,0],0);return c.isTransparentKeyword=!0,c}}}(c("../tree")),function(a){a.Comment=function(a,b,c,d){this.value=a,this.silent=!!b,this.currentFileInfo=d},a.Comment.prototype={type:"Comment",genCSS:function(b,c){this.debugInfo&&c.add(a.debugInfo(b,this),this.currentFileInfo,this.index),c.add(this.value.trim())},toCSS:a.toCSS,isSilent:function(a){var b=this.currentFileInfo&&this.currentFileInfo.reference&&!this.isReferenced,c=a.compress&&!this.value.match(/^\/\*!/);return this.silent||b||c},eval:function(){return this},markReferenced:function(){this.isReferenced=!0}}}(c("../tree")),function(a){a.Condition=function(a,b,c,d,e){this.op=a.trim(),this.lvalue=b,this.rvalue=c,this.index=d,this.negate=e},a.Condition.prototype={type:"Condition",accept:function(a){this.lvalue=a.visit(this.lvalue),this.rvalue=a.visit(this.rvalue)},eval:function(a){var b,c=this.lvalue.eval(a),d=this.rvalue.eval(a),e=this.index;return b=function(a){switch(a){case"and":return c&&d;case"or":return c||d;default:if(c.compare)b=c.compare(d);else{if(!d.compare)throw{type:"Type",message:"Unable to perform comparison",index:e};b=d.compare(c)}switch(b){case-1:return"<"===a||"=<"===a||"<="===a;case 0:return"="===a||">="===a||"=<"===a||"<="===a;case 1:return">"===a||">="===a}}}(this.op),this.negate?!b:b}}}(c("../tree")),function(a){a.DetachedRuleset=function(a,b){this.ruleset=a,this.frames=b},a.DetachedRuleset.prototype={type:"DetachedRuleset",accept:function(a){this.ruleset=a.visit(this.ruleset)},eval:function(b){var c=this.frames||b.frames.slice(0);return new a.DetachedRuleset(this.ruleset,c)},callEval:function(b){return this.ruleset.eval(this.frames?new a.evalEnv(b,this.frames.concat(b.frames)):b)}}}(c("../tree")),function(a){a.Dimension=function(c,d){this.value=parseFloat(c),this.unit=d&&d instanceof a.Unit?d:new a.Unit(d?[d]:b)},a.Dimension.prototype={type:"Dimension",accept:function(a){this.unit=a.visit(this.unit)},eval:function(){return this},toColor:function(){return new a.Color([this.value,this.value,this.value])},genCSS:function(b,c){if(b&&b.strictUnits&&!this.unit.isSingular())throw new Error("Multiple units in dimension. Correct the units or use the unit function. Bad unit: "+this.unit.toString());var d=a.fround(b,this.value),e=String(d);if(0!==d&&1e-6>d&&d>-1e-6&&(e=d.toFixed(20).replace(/0+$/,"")),b&&b.compress){if(0===d&&this.unit.isLength())return void c.add(e);d>0&&1>d&&(e=e.substr(1))}c.add(e),this.unit.genCSS(b,c)},toCSS:a.toCSS,operate:function(b,c,d){var e=a.operate(b,c,this.value,d.value),f=this.unit.clone();if("+"===c||"-"===c)if(0===f.numerator.length&&0===f.denominator.length)f.numerator=d.unit.numerator.slice(0),f.denominator=d.unit.denominator.slice(0);else if(0===d.unit.numerator.length&&0===f.denominator.length);else{if(d=d.convertTo(this.unit.usedUnits()),b.strictUnits&&d.unit.toString()!==f.toString())throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '"+f.toString()+"' and '"+d.unit.toString()+"'.");e=a.operate(b,c,this.value,d.value)}else"*"===c?(f.numerator=f.numerator.concat(d.unit.numerator).sort(),f.denominator=f.denominator.concat(d.unit.denominator).sort(),f.cancel()):"/"===c&&(f.numerator=f.numerator.concat(d.unit.denominator).sort(),f.denominator=f.denominator.concat(d.unit.numerator).sort(),f.cancel());return new a.Dimension(e,f)},compare:function(b){if(b instanceof a.Dimension){var c,d,e,f;if(this.unit.isEmpty()||b.unit.isEmpty())c=this,d=b;else if(c=this.unify(),d=b.unify(),0!==c.unit.compare(d.unit))return-1;return e=c.value,f=d.value,f>e?-1:e>f?1:0}return-1},unify:function(){return this.convertTo({length:"px",duration:"s",angle:"rad"})},convertTo:function(b){var c,d,e,f,g,h=this.value,i=this.unit.clone(),j={};if("string"==typeof b){for(c in a.UnitConversions)a.UnitConversions[c].hasOwnProperty(b)&&(j={},j[c]=b);b=j}g=function(a,b){return e.hasOwnProperty(a)?(b?h/=e[a]/e[f]:h*=e[a]/e[f],f):a};for(d in b)b.hasOwnProperty(d)&&(f=b[d],e=a.UnitConversions[d],i.map(g));return i.cancel(),new a.Dimension(h,i)}},a.UnitConversions={length:{m:1,cm:.01,mm:.001,"in":.0254,px:.0254/96,pt:.0254/72,pc:.0254/72*12},duration:{s:1,ms:.001},angle:{rad:1/(2*Math.PI),deg:1/360,grad:.0025,turn:1}},a.Unit=function(a,b,c){this.numerator=a?a.slice(0).sort():[],this.denominator=b?b.slice(0).sort():[],this.backupUnit=c},a.Unit.prototype={type:"Unit",clone:function(){return new a.Unit(this.numerator.slice(0),this.denominator.slice(0),this.backupUnit)},genCSS:function(a,b){this.numerator.length>=1?b.add(this.numerator[0]):this.denominator.length>=1?b.add(this.denominator[0]):a&&a.strictUnits||!this.backupUnit||b.add(this.backupUnit)},toCSS:a.toCSS,toString:function(){var a,b=this.numerator.join("*");for(a=0;a0)for(b=0;e>b;b++)this.numerator.push(a);else if(0>e)for(b=0;-e>b;b++)this.denominator.push(a)}0===this.numerator.length&&0===this.denominator.length&&c&&(this.backupUnit=c),this.numerator.sort(),this.denominator.sort()}}}(c("../tree")),function(a){a.Directive=function(a,b,c,d,e,f){this.name=a,this.value=b,c&&(this.rules=c,this.rules.allowImports=!0),this.index=d,this.currentFileInfo=e,this.debugInfo=f},a.Directive.prototype={type:"Directive",accept:function(a){var b=this.value,c=this.rules;c&&(c=a.visit(c)),b&&(b=a.visit(b))},genCSS:function(b,c){var d=this.value,e=this.rules;c.add(this.name,this.currentFileInfo,this.index),d&&(c.add(" "),d.genCSS(b,c)),e?a.outputRuleset(b,c,[e]):c.add(";")},toCSS:a.toCSS,eval:function(b){var c=this.value,d=this.rules;return c&&(c=c.eval(b)),d&&(d=d.eval(b),d.root=!0),new a.Directive(this.name,c,d,this.index,this.currentFileInfo,this.debugInfo)},variable:function(b){return this.rules?a.Ruleset.prototype.variable.call(this.rules,b):void 0},find:function(){return this.rules?a.Ruleset.prototype.find.apply(this.rules,arguments):void 0},rulesets:function(){return this.rules?a.Ruleset.prototype.rulesets.apply(this.rules):void 0},markReferenced:function(){var a,b;if(this.isReferenced=!0,this.rules)for(b=this.rules.rules,a=0;a":" > ","|":"|","^":" ^ ","^^":" ^^ "},_outputMapCompressed:{"":""," ":" ",":":" :","+":"+","~":"~",">":">","|":"|","^":"^","^^":"^^"},genCSS:function(a,b){b.add((a.compress?this._outputMapCompressed:this._outputMap)[this.value])},toCSS:a.toCSS}}(c("../tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={type:"Expression",accept:function(a){this.value&&(this.value=a.visitArray(this.value))},eval:function(b){var c,d=this.parens&&!this.parensInOp,e=!1;return d&&b.inParenthesis(),this.value.length>1?c=new a.Expression(this.value.map(function(a){return a.eval(b)})):1===this.value.length?(this.value[0].parens&&!this.value[0].parensInOp&&(e=!0),c=this.value[0].eval(b)):c=this,d&&b.outOfParenthesis(),this.parens&&this.parensInOp&&!b.isMathOn()&&!e&&(c=new a.Paren(c)),c},genCSS:function(a,b){for(var c=0;c0&&c.length&&""===c[0].combinator.value&&(c[0].combinator.value=" "),d=d.concat(a[b].elements);this.selfSelectors=[{elements:d}]}}}(c("../tree")),function(a){a.Import=function(a,c,d,e,f){if(this.options=d,this.index=e,this.path=a,this.features=c,this.currentFileInfo=f,this.options.less!==b||this.options.inline)this.css=!this.options.less||this.options.inline;else{var g=this.getPath();g&&/css([\?;].*)?$/.test(g)&&(this.css=!0)}},a.Import.prototype={type:"Import",accept:function(a){this.features&&(this.features=a.visit(this.features)),this.path=a.visit(this.path),!this.options.inline&&this.root&&(this.root=a.visit(this.root))},genCSS:function(a,b){this.css&&(b.add("@import ",this.currentFileInfo,this.index),this.path.genCSS(a,b),this.features&&(b.add(" "),this.features.genCSS(a,b)),b.add(";"))},toCSS:a.toCSS,getPath:function(){if(this.path instanceof a.Quoted){var c=this.path.value;return this.css!==b||/(\.[a-z]*$)|([\?;].*)$/.test(c)?c:c+".less"}return this.path instanceof a.URL?this.path.value.value:null},evalForImport:function(b){return new a.Import(this.path.eval(b),this.features,this.options,this.index,this.currentFileInfo)},evalPath:function(b){var c=this.path.eval(b),d=this.currentFileInfo&&this.currentFileInfo.rootpath;if(!(c instanceof a.URL)){if(d){var e=c.value;e&&b.isPathRelative(e)&&(c.value=d+e)}c.value=b.normalizePath(c.value)}return c},eval:function(b){var c,d=this.features&&this.features.eval(b);if(this.skip&&("function"==typeof this.skip&&(this.skip=this.skip()),this.skip))return[];if(this.options.inline){var e=new a.Anonymous(this.root,0,{filename:this.importedFilename},!0);return this.features?new a.Media([e],this.features.value):[e]}if(this.css){var f=new a.Import(this.evalPath(b),d,this.options,this.index);if(!f.css&&this.error)throw this.error;return f}return c=new a.Ruleset(null,this.root.rules.slice(0)),c.evalImports(b),this.features?new a.Media(c.rules,this.features.value):c.rules}}}(c("../tree")),function(a){a.JavaScript=function(a,b,c){this.escaped=c,this.expression=a,this.index=b},a.JavaScript.prototype={type:"JavaScript",eval:function(b){var c,d=this,e={},f=this.expression.replace(/@\{([\w-]+)\}/g,function(c,e){return a.jsify(new a.Variable("@"+e,d.index).eval(b))});try{f=new Function("return ("+f+")")}catch(g){throw{message:"JavaScript evaluation error: "+g.message+" from `"+f+"`",index:this.index}}var h=b.frames[0].variables();for(var i in h)h.hasOwnProperty(i)&&(e[i.slice(1)]={value:h[i].value,toJS:function(){return this.value.eval(b).toCSS()}});try{c=f.call(e)}catch(g){throw{message:"JavaScript evaluation error: '"+g.name+": "+g.message.replace(/["]/g,"'")+"'",index:this.index}}return"number"==typeof c?new a.Dimension(c):"string"==typeof c?new a.Quoted('"'+c+'"',c,this.escaped,this.index):new a.Anonymous(Array.isArray(c)?c.join(", "):c)}}}(c("../tree")),function(a){a.Keyword=function(a){this.value=a},a.Keyword.prototype={type:"Keyword",eval:function(){return this},genCSS:function(a,b){if("%"===this.value)throw{type:"Syntax",message:"Invalid % without number"};b.add(this.value)},toCSS:a.toCSS,compare:function(b){return b instanceof a.Keyword?b.value===this.value?0:1:-1}},a.True=new a.Keyword("true"),a.False=new a.Keyword("false")}(c("../tree")),function(a){a.Media=function(b,c,d,e){this.index=d,this.currentFileInfo=e;var f=this.emptySelectors();this.features=new a.Value(c),this.rules=[new a.Ruleset(f,b)],this.rules[0].allowImports=!0},a.Media.prototype={type:"Media",accept:function(a){this.features&&(this.features=a.visit(this.features)),this.rules&&(this.rules=a.visitArray(this.rules))},genCSS:function(b,c){c.add("@media ",this.currentFileInfo,this.index),this.features.genCSS(b,c),a.outputRuleset(b,c,this.rules)},toCSS:a.toCSS,eval:function(b){b.mediaBlocks||(b.mediaBlocks=[],b.mediaPath=[]);var c=new a.Media(null,[],this.index,this.currentFileInfo);this.debugInfo&&(this.rules[0].debugInfo=this.debugInfo,c.debugInfo=this.debugInfo);var d=!1;b.strictMath||(d=!0,b.strictMath=!0);try{c.features=this.features.eval(b)}finally{d&&(b.strictMath=!1)}return b.mediaPath.push(c),b.mediaBlocks.push(c),b.frames.unshift(this.rules[0]),c.rules=[this.rules[0].eval(b)],b.frames.shift(),b.mediaPath.pop(),0===b.mediaPath.length?c.evalTop(b):c.evalNested(b)},variable:function(b){return a.Ruleset.prototype.variable.call(this.rules[0],b)},find:function(){return a.Ruleset.prototype.find.apply(this.rules[0],arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.rules[0])},emptySelectors:function(){var b=new a.Element("","&",this.index,this.currentFileInfo),c=[new a.Selector([b],null,null,this.index,this.currentFileInfo)];return c[0].mediaEmpty=!0,c},markReferenced:function(){var a,b=this.rules[0].rules;for(this.rules[0].markReferenced(),this.isReferenced=!0,a=0;a1){var d=this.emptySelectors();c=new a.Ruleset(d,b.mediaBlocks),c.multiMedia=!0}return delete b.mediaBlocks,delete b.mediaPath,c},evalNested:function(b){var c,d,e=b.mediaPath.concat([this]);for(c=0;c0;c--)b.splice(c,0,new a.Anonymous("and"));return new a.Expression(b)})),new a.Ruleset([],[])},permute:function(a){if(0===a.length)return[];if(1===a.length)return a[0];for(var b=[],c=this.permute(a.slice(1)),d=0;di.value)&&(m[f]=g);else{if(k!==b&&j!==k)throw{type:"Argument",message:"incompatible types"};n[j]=m.length,m.push(g)}else Array.isArray(c[e].value)&&Array.prototype.push.apply(c,Array.prototype.slice.call(c[e].value));return 1==m.length?m[0]:(c=m.map(function(a){return a.toCSS(this.env)}).join(this.env.compress?",":", "),new d.Anonymous((a?"min":"max")+"("+c+")"))},min:function(){return this._minmax(!0,arguments)},max:function(){return this._minmax(!1,arguments)},"get-unit":function(a){return new d.Anonymous(a.unit)},argb:function(a){return new d.Anonymous(a.toARGB())},percentage:function(a){return new d.Dimension(100*a.value,"%")},color:function(a){if(a instanceof d.Quoted){var b,c=a.value;if(b=d.Color.fromKeyword(c))return b;if(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/.test(c))return new d.Color(c.slice(1));throw{type:"Argument",message:"argument must be a color keyword or 3/6 digit hex e.g. #FFF"}}throw{type:"Argument",message:"argument must be a string"}},iscolor:function(a){return this._isa(a,d.Color)},isnumber:function(a){return this._isa(a,d.Dimension)},isstring:function(a){return this._isa(a,d.Quoted)},iskeyword:function(a){return this._isa(a,d.Keyword)},isurl:function(a){return this._isa(a,d.URL)},ispixel:function(a){return this.isunit(a,"px")},ispercentage:function(a){return this.isunit(a,"%")},isem:function(a){return this.isunit(a,"em")},isunit:function(a,b){return a instanceof d.Dimension&&a.unit.is(b.value||b)?d.True:d.False},_isa:function(a,b){return a instanceof b?d.True:d.False},tint:function(a,b){return this.mix(this.rgb(255,255,255),a,b)},shade:function(a,b){return this.mix(this.rgb(0,0,0),a,b)},extract:function(a,b){return b=b.value-1,Array.isArray(a.value)?a.value[b]:Array(a)[b]},length:function(a){var b=Array.isArray(a.value)?a.value.length:1;return new d.Dimension(b)},"data-uri":function(b,e){if("undefined"!=typeof a)return new d.URL(e||b,this.currentFileInfo).eval(this.env);var f=b.value,g=e&&e.value,h=c("fs"),i=c("path"),j=!1;if(arguments.length<2&&(g=f),this.env.isPathRelative(g)&&(g=this.currentFileInfo.relativeUrls?i.join(this.currentFileInfo.currentDirectory,g):i.join(this.currentFileInfo.entryPath,g)),arguments.length<2){var k;try{k=c("mime")}catch(l){k=d._mime}f=k.lookup(g);var m=k.charsets.lookup(f);j=["US-ASCII","UTF-8"].indexOf(m)<0,j&&(f+=";base64")}else j=/;base64$/.test(f);var n=h.readFileSync(g),o=32,p=parseInt(n.length/1024,10);if(p>=o&&this.env.ieCompat!==!1)return this.env.silent||console.warn("Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!",g,p,o),new d.URL(e||b,this.currentFileInfo).eval(this.env);n=j?n.toString("base64"):encodeURIComponent(n);var q='"data:'+f+","+n+'"';return new d.URL(new d.Anonymous(q))},"svg-gradient":function(a){function e(){throw{type:"Argument",message:"svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position]"}}arguments.length<3&&e();var f,g,h,i,j,k,l,m=Array.prototype.slice.call(arguments,1),n="linear",o='x="0" y="0" width="1" height="1"',p=!0,q={compress:!1},r=a.toCSS(q);switch(r){case"to bottom":f='x1="0%" y1="0%" x2="0%" y2="100%"';break;case"to right":f='x1="0%" y1="0%" x2="100%" y2="0%"';break;case"to bottom right":f='x1="0%" y1="0%" x2="100%" y2="100%"';break;case"to top right":f='x1="0%" y1="100%" x2="100%" y2="0%"';break;case"ellipse":case"ellipse at center":n="radial",f='cx="50%" cy="50%" r="75%"',o='x="-50" y="-50" width="101" height="101"';break;default:throw{type:"Argument",message:"svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center'"}}for(g='<'+n+'Gradient id="gradient" gradientUnits="userSpaceOnUse" '+f+">",h=0;hl?' stop-opacity="'+l+'"':"")+"/>";if(g+="',p)try{g=c("./encoder").encodeBase64(g)}catch(s){p=!1}return g="'data:image/svg+xml"+(p?";base64":"")+","+g+"'",new d.URL(new d.Anonymous(g))}},d._mime={_types:{".htm":"text/html",".html":"text/html",".gif":"image/gif",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png"},lookup:function(a){var e=c("path").extname(a),f=d._mime._types[e];if(f===b)throw new Error('Optional dependency "mime" is required for '+e);return f},charsets:{lookup:function(a){return a&&/^text\//.test(a)?"UTF-8":""}}};var l={ceil:null,floor:null,sqrt:null,abs:null,tan:"",sin:"",cos:"",atan:"rad",asin:"rad",acos:"rad"},m={multiply:function(a,b){return a*b},screen:function(a,b){return a+b-a*b},overlay:function(a,b){return a*=2,1>=a?m.multiply(a,b):m.screen(a-1,b)},softlight:function(a,b){var c=1,d=a;return b>.5&&(d=1,c=a>.25?Math.sqrt(a):((16*a-12)*a+4)*a),a-(1-2*b)*d*(c-a)},hardlight:function(a,b){return m.overlay(b,a)},difference:function(a,b){return Math.abs(a-b)},exclusion:function(a,b){return a+b-2*a*b},average:function(a,b){return(a+b)/2},negation:function(a,b){return 1-Math.abs(a+b-1)}};d.defaultFunc={eval:function(){var a=this.value_,b=this.error_;if(b)throw b;return null!=a?a?d.True:d.False:void 0},value:function(a){this.value_=a},error:function(a){this.error_=a},reset:function(){this.value_=this.error_=null}},g(),d.fround=function(a,b){var c;return a&&null!=a.numPrecision?(c=Math.pow(10,a.numPrecision),Math.round(b*c)/c):b},d.functionCall=function(a,b){this.env=a,this.currentFileInfo=b},d.functionCall.prototype=d.functions}(c("./tree")),function(a){a.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(c("./tree")),function(a){a.debugInfo=function(b,c,d){var e="";if(b.dumpLineNumbers&&!b.compress)switch(b.dumpLineNumbers){case"comments":e=a.debugInfo.asComment(c);break;case"mediaquery":e=a.debugInfo.asMediaQuery(c);break;case"all":e=a.debugInfo.asComment(c)+(d||"")+a.debugInfo.asMediaQuery(c)}return e},a.debugInfo.asComment=function(a){return"/* line "+a.debugInfo.lineNumber+", "+a.debugInfo.fileName+" */\n"},a.debugInfo.asMediaQuery=function(a){return"@media -sass-debug-info{filename{font-family:"+("file://"+a.debugInfo.fileName).replace(/([.:\/\\])/g,function(a){return"\\"==a&&(a="/"),"\\"+a})+"}line{font-family:\\00003"+a.debugInfo.lineNumber+"}}\n"},a.find=function(a,b){for(var c,d=0;d1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)},a.toCSS=function(a){var b=[];return this.genCSS(a,{add:function(a){b.push(a)},isEmpty:function(){return 0===b.length}}),b.join("")},a.outputRuleset=function(a,b,c){var d,e=c.length;if(a.tabLevel=(0|a.tabLevel)+1,a.compress){for(b.add("{"),d=0;e>d;d++)c[d].genCSS(a,b);return b.add("}"),void a.tabLevel--}var f="\n"+Array(a.tabLevel).join(" "),g=f+" ";if(e){for(b.add(" {"+g),c[0].genCSS(a,b),d=1;e>d;d++)b.add(g),c[d].genCSS(a,b);b.add(f+"}")}else b.add(" {"+f+"}");a.tabLevel--}}(c("./tree")),function(a){a.Alpha=function(a){this.value=a},a.Alpha.prototype={type:"Alpha",accept:function(a){this.value=a.visit(this.value)},eval:function(b){return this.value.eval?new a.Alpha(this.value.eval(b)):this},genCSS:function(a,b){b.add("alpha(opacity="),this.value.genCSS?this.value.genCSS(a,b):b.add(this.value),b.add(")")},toCSS:a.toCSS}}(c("../tree")),function(a){a.Anonymous=function(a,b,c,d){this.value=a.value||a,this.index=b,this.mapLines=d,this.currentFileInfo=c},a.Anonymous.prototype={type:"Anonymous",eval:function(){return new a.Anonymous(this.value,this.index,this.currentFileInfo,this.mapLines)},compare:function(a){if(!a.toCSS)return-1;var b=this.toCSS(),c=a.toCSS();return b===c?0:c>b?-1:1},genCSS:function(a,b){b.add(this.value,this.currentFileInfo,this.index,this.mapLines)},toCSS:a.toCSS}}(c("../tree")),function(a){a.Assignment=function(a,b){this.key=a,this.value=b},a.Assignment.prototype={type:"Assignment",accept:function(a){this.value=a.visit(this.value)},eval:function(b){return this.value.eval?new a.Assignment(this.key,this.value.eval(b)):this},genCSS:function(a,b){b.add(this.key+"="),this.value.genCSS?this.value.genCSS(a,b):b.add(this.value)},toCSS:a.toCSS}}(c("../tree")),function(a){a.Call=function(a,b,c,d){this.name=a,this.args=b,this.index=c,this.currentFileInfo=d},a.Call.prototype={type:"Call",accept:function(a){this.args&&(this.args=a.visitArray(this.args))},eval:function(b){var c,d,e=this.args.map(function(a){return a.eval(b)}),f=this.name.toLowerCase();if(f in a.functions)try{if(d=new a.functionCall(b,this.currentFileInfo),c=d[f].apply(d,e),null!=c)return c}catch(g){throw{type:g.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(g.message?": "+g.message:""),index:this.index,filename:this.currentFileInfo.filename}}return new a.Call(this.name,e,this.index,this.currentFileInfo)},genCSS:function(a,b){b.add(this.name+"(",this.currentFileInfo,this.index);for(var c=0;ca?"0":"")+a.toString(16)}).join("")}function c(a,b){return Math.min(Math.max(a,0),b)}a.Color=function(a,b){this.rgb=Array.isArray(a)?a:6==a.length?a.match(/.{2}/g).map(function(a){return parseInt(a,16)}):a.split("").map(function(a){return parseInt(a+a,16)}),this.alpha="number"==typeof b?b:1};var d="transparent";a.Color.prototype={type:"Color",eval:function(){return this},luma:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255;return a=.03928>=a?a/12.92:Math.pow((a+.055)/1.055,2.4),b=.03928>=b?b/12.92:Math.pow((b+.055)/1.055,2.4),c=.03928>=c?c/12.92:Math.pow((c+.055)/1.055,2.4),.2126*a+.7152*b+.0722*c},genCSS:function(a,b){b.add(this.toCSS(a))},toCSS:function(b,e){var f=b&&b.compress&&!e,g=a.fround(b,this.alpha);if(1>g)return 0===g&&this.isTransparentKeyword?d:"rgba("+this.rgb.map(function(a){return c(Math.round(a),255)}).concat(c(g,1)).join(","+(f?"":" "))+")";var h=this.toRGB();if(f){var i=h.split("");i[1]===i[2]&&i[3]===i[4]&&i[5]===i[6]&&(h="#"+i[1]+i[3]+i[5])}return h},operate:function(b,c,d){for(var e=[],f=this.alpha*(1-d.alpha)+d.alpha,g=0;3>g;g++)e[g]=a.operate(b,c,this.rgb[g],d.rgb[g]);return new a.Color(e,f)},toRGB:function(){return b(this.rgb)},toHSL:function(){var a,b,c=this.rgb[0]/255,d=this.rgb[1]/255,e=this.rgb[2]/255,f=this.alpha,g=Math.max(c,d,e),h=Math.min(c,d,e),i=(g+h)/2,j=g-h;if(g===h)a=b=0;else{switch(b=i>.5?j/(2-g-h):j/(g+h),g){case c:a=(d-e)/j+(e>d?6:0);break;case d:a=(e-c)/j+2;break;case e:a=(c-d)/j+4}a/=6}return{h:360*a,s:b,l:i,a:f}},toHSV:function(){var a,b,c=this.rgb[0]/255,d=this.rgb[1]/255,e=this.rgb[2]/255,f=this.alpha,g=Math.max(c,d,e),h=Math.min(c,d,e),i=g,j=g-h;if(b=0===g?0:j/g,g===h)a=0;else{switch(g){case c:a=(d-e)/j+(e>d?6:0);break;case d:a=(e-c)/j+2;break;case e:a=(c-d)/j+4}a/=6}return{h:360*a,s:b,v:i,a:f}},toARGB:function(){return b([255*this.alpha].concat(this.rgb))},compare:function(a){return a.rgb?a.rgb[0]===this.rgb[0]&&a.rgb[1]===this.rgb[1]&&a.rgb[2]===this.rgb[2]&&a.alpha===this.alpha?0:-1:-1}},a.Color.fromKeyword=function(b){if(b=b.toLowerCase(),a.colors.hasOwnProperty(b))return new a.Color(a.colors[b].slice(1));if(b===d){var c=new a.Color([0,0,0],0);return c.isTransparentKeyword=!0,c}}}(c("../tree")),function(a){a.Comment=function(a,b,c,d){this.value=a,this.silent=!!b,this.currentFileInfo=d},a.Comment.prototype={type:"Comment",genCSS:function(b,c){this.debugInfo&&c.add(a.debugInfo(b,this),this.currentFileInfo,this.index),c.add(this.value.trim())},toCSS:a.toCSS,isSilent:function(a){var b=this.currentFileInfo&&this.currentFileInfo.reference&&!this.isReferenced,c=a.compress&&!this.value.match(/^\/\*!/);return this.silent||b||c},eval:function(){return this},markReferenced:function(){this.isReferenced=!0}}}(c("../tree")),function(a){a.Condition=function(a,b,c,d,e){this.op=a.trim(),this.lvalue=b,this.rvalue=c,this.index=d,this.negate=e},a.Condition.prototype={type:"Condition",accept:function(a){this.lvalue=a.visit(this.lvalue),this.rvalue=a.visit(this.rvalue)},eval:function(a){var b,c=this.lvalue.eval(a),d=this.rvalue.eval(a),e=this.index;return b=function(a){switch(a){case"and":return c&&d;case"or":return c||d;default:if(c.compare)b=c.compare(d);else{if(!d.compare)throw{type:"Type",message:"Unable to perform comparison",index:e};b=d.compare(c)}switch(b){case-1:return"<"===a||"=<"===a||"<="===a;case 0:return"="===a||">="===a||"=<"===a||"<="===a;case 1:return">"===a||">="===a}}}(this.op),this.negate?!b:b}}}(c("../tree")),function(a){a.DetachedRuleset=function(a,b){this.ruleset=a,this.frames=b},a.DetachedRuleset.prototype={type:"DetachedRuleset",accept:function(a){this.ruleset=a.visit(this.ruleset)},eval:function(b){var c=this.frames||b.frames.slice(0);return new a.DetachedRuleset(this.ruleset,c)},callEval:function(b){return this.ruleset.eval(this.frames?new a.evalEnv(b,this.frames.concat(b.frames)):b)}}}(c("../tree")),function(a){a.Dimension=function(c,d){this.value=parseFloat(c),this.unit=d&&d instanceof a.Unit?d:new a.Unit(d?[d]:b)},a.Dimension.prototype={type:"Dimension",accept:function(a){this.unit=a.visit(this.unit)},eval:function(){return this},toColor:function(){return new a.Color([this.value,this.value,this.value])},genCSS:function(b,c){if(b&&b.strictUnits&&!this.unit.isSingular())throw new Error("Multiple units in dimension. Correct the units or use the unit function. Bad unit: "+this.unit.toString());var d=a.fround(b,this.value),e=String(d);if(0!==d&&1e-6>d&&d>-1e-6&&(e=d.toFixed(20).replace(/0+$/,"")),b&&b.compress){if(0===d&&this.unit.isLength())return void c.add(e);d>0&&1>d&&(e=e.substr(1))}c.add(e),this.unit.genCSS(b,c)},toCSS:a.toCSS,operate:function(b,c,d){var e=a.operate(b,c,this.value,d.value),f=this.unit.clone();if("+"===c||"-"===c)if(0===f.numerator.length&&0===f.denominator.length)f.numerator=d.unit.numerator.slice(0),f.denominator=d.unit.denominator.slice(0);else if(0===d.unit.numerator.length&&0===f.denominator.length);else{if(d=d.convertTo(this.unit.usedUnits()),b.strictUnits&&d.unit.toString()!==f.toString())throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '"+f.toString()+"' and '"+d.unit.toString()+"'.");e=a.operate(b,c,this.value,d.value)}else"*"===c?(f.numerator=f.numerator.concat(d.unit.numerator).sort(),f.denominator=f.denominator.concat(d.unit.denominator).sort(),f.cancel()):"/"===c&&(f.numerator=f.numerator.concat(d.unit.denominator).sort(),f.denominator=f.denominator.concat(d.unit.numerator).sort(),f.cancel());return new a.Dimension(e,f)},compare:function(b){if(b instanceof a.Dimension){var c,d,e,f;if(this.unit.isEmpty()||b.unit.isEmpty())c=this,d=b;else if(c=this.unify(),d=b.unify(),0!==c.unit.compare(d.unit))return-1;return e=c.value,f=d.value,f>e?-1:e>f?1:0}return-1},unify:function(){return this.convertTo({length:"px",duration:"s",angle:"rad"})},convertTo:function(b){var c,d,e,f,g,h=this.value,i=this.unit.clone(),j={};if("string"==typeof b){for(c in a.UnitConversions)a.UnitConversions[c].hasOwnProperty(b)&&(j={},j[c]=b);b=j}g=function(a,b){return e.hasOwnProperty(a)?(b?h/=e[a]/e[f]:h*=e[a]/e[f],f):a};for(d in b)b.hasOwnProperty(d)&&(f=b[d],e=a.UnitConversions[d],i.map(g));return i.cancel(),new a.Dimension(h,i)}},a.UnitConversions={length:{m:1,cm:.01,mm:.001,"in":.0254,px:.0254/96,pt:.0254/72,pc:.0254/72*12},duration:{s:1,ms:.001},angle:{rad:1/(2*Math.PI),deg:1/360,grad:.0025,turn:1}},a.Unit=function(a,b,c){this.numerator=a?a.slice(0).sort():[],this.denominator=b?b.slice(0).sort():[],this.backupUnit=c},a.Unit.prototype={type:"Unit",clone:function(){return new a.Unit(this.numerator.slice(0),this.denominator.slice(0),this.backupUnit)},genCSS:function(a,b){this.numerator.length>=1?b.add(this.numerator[0]):this.denominator.length>=1?b.add(this.denominator[0]):a&&a.strictUnits||!this.backupUnit||b.add(this.backupUnit)},toCSS:a.toCSS,toString:function(){var a,b=this.numerator.join("*");for(a=0;a0)for(b=0;e>b;b++)this.numerator.push(a);else if(0>e)for(b=0;-e>b;b++)this.denominator.push(a)}0===this.numerator.length&&0===this.denominator.length&&c&&(this.backupUnit=c),this.numerator.sort(),this.denominator.sort()}}}(c("../tree")),function(a){a.Directive=function(a,b,c,d,e,f){this.name=a,this.value=b,c&&(this.rules=c,this.rules.allowImports=!0),this.index=d,this.currentFileInfo=e,this.debugInfo=f},a.Directive.prototype={type:"Directive",accept:function(a){var b=this.value,c=this.rules;c&&(c=a.visit(c)),b&&(b=a.visit(b))},genCSS:function(b,c){var d=this.value,e=this.rules;c.add(this.name,this.currentFileInfo,this.index),d&&(c.add(" "),d.genCSS(b,c)),e?a.outputRuleset(b,c,[e]):c.add(";")},toCSS:a.toCSS,eval:function(b){var c=this.value,d=this.rules;return c&&(c=c.eval(b)),d&&(d=d.eval(b),d.root=!0),new a.Directive(this.name,c,d,this.index,this.currentFileInfo,this.debugInfo)},variable:function(b){return this.rules?a.Ruleset.prototype.variable.call(this.rules,b):void 0},find:function(){return this.rules?a.Ruleset.prototype.find.apply(this.rules,arguments):void 0},rulesets:function(){return this.rules?a.Ruleset.prototype.rulesets.apply(this.rules):void 0},markReferenced:function(){var a,b;if(this.isReferenced=!0,this.rules)for(b=this.rules.rules,a=0;a":" > ","|":"|","^":" ^ ","^^":" ^^ "},_outputMapCompressed:{"":""," ":" ",":":" :","+":"+","~":"~",">":">","|":"|","^":"^","^^":"^^"},genCSS:function(a,b){b.add((a.compress?this._outputMapCompressed:this._outputMap)[this.value])},toCSS:a.toCSS}}(c("../tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={type:"Expression",accept:function(a){this.value&&(this.value=a.visitArray(this.value))},eval:function(b){var c,d=this.parens&&!this.parensInOp,e=!1;return d&&b.inParenthesis(),this.value.length>1?c=new a.Expression(this.value.map(function(a){return a.eval(b)})):1===this.value.length?(this.value[0].parens&&!this.value[0].parensInOp&&(e=!0),c=this.value[0].eval(b)):c=this,d&&b.outOfParenthesis(),this.parens&&this.parensInOp&&!b.isMathOn()&&!e&&(c=new a.Paren(c)),c},genCSS:function(a,b){for(var c=0;c0&&c.length&&""===c[0].combinator.value&&(c[0].combinator.value=" "),d=d.concat(a[b].elements);this.selfSelectors=[{elements:d}]}}}(c("../tree")),function(a){a.Import=function(a,c,d,e,f){if(this.options=d,this.index=e,this.path=a,this.features=c,this.currentFileInfo=f,this.options.less!==b||this.options.inline)this.css=!this.options.less||this.options.inline;else{var g=this.getPath();g&&/css([\?;].*)?$/.test(g)&&(this.css=!0)}},a.Import.prototype={type:"Import",accept:function(a){this.features&&(this.features=a.visit(this.features)),this.path=a.visit(this.path),!this.options.inline&&this.root&&(this.root=a.visit(this.root))},genCSS:function(a,b){this.css&&(b.add("@import ",this.currentFileInfo,this.index),this.path.genCSS(a,b),this.features&&(b.add(" "),this.features.genCSS(a,b)),b.add(";"))},toCSS:a.toCSS,getPath:function(){if(this.path instanceof a.Quoted){var c=this.path.value;return this.css!==b||/(\.[a-z]*$)|([\?;].*)$/.test(c)?c:c+".less"}return this.path instanceof a.URL?this.path.value.value:null},evalForImport:function(b){return new a.Import(this.path.eval(b),this.features,this.options,this.index,this.currentFileInfo)},evalPath:function(b){var c=this.path.eval(b),d=this.currentFileInfo&&this.currentFileInfo.rootpath;if(!(c instanceof a.URL)){if(d){var e=c.value;e&&b.isPathRelative(e)&&(c.value=d+e)}c.value=b.normalizePath(c.value)}return c},eval:function(b){var c,d=this.features&&this.features.eval(b);if(this.skip&&("function"==typeof this.skip&&(this.skip=this.skip()),this.skip))return[];if(this.options.inline){var e=new a.Anonymous(this.root,0,{filename:this.importedFilename},!0);return this.features?new a.Media([e],this.features.value):[e]}if(this.css){var f=new a.Import(this.evalPath(b),d,this.options,this.index);if(!f.css&&this.error)throw this.error;return f}return c=new a.Ruleset(null,this.root.rules.slice(0)),c.evalImports(b),this.features?new a.Media(c.rules,this.features.value):c.rules}}}(c("../tree")),function(a){a.JavaScript=function(a,b,c){this.escaped=c,this.expression=a,this.index=b},a.JavaScript.prototype={type:"JavaScript",eval:function(b){var c,d=this,e={},f=this.expression.replace(/@\{([\w-]+)\}/g,function(c,e){return a.jsify(new a.Variable("@"+e,d.index).eval(b))});try{f=new Function("return ("+f+")")}catch(g){throw{message:"JavaScript evaluation error: "+g.message+" from `"+f+"`",index:this.index}}var h=b.frames[0].variables();for(var i in h)h.hasOwnProperty(i)&&(e[i.slice(1)]={value:h[i].value,toJS:function(){return this.value.eval(b).toCSS()}});try{c=f.call(e)}catch(g){throw{message:"JavaScript evaluation error: '"+g.name+": "+g.message.replace(/["]/g,"'")+"'",index:this.index}}return"number"==typeof c?new a.Dimension(c):"string"==typeof c?new a.Quoted('"'+c+'"',c,this.escaped,this.index):new a.Anonymous(Array.isArray(c)?c.join(", "):c)}}}(c("../tree")),function(a){a.Keyword=function(a){this.value=a},a.Keyword.prototype={type:"Keyword",eval:function(){return this},genCSS:function(a,b){if("%"===this.value)throw{type:"Syntax",message:"Invalid % without number"};b.add(this.value)},toCSS:a.toCSS,compare:function(b){return b instanceof a.Keyword?b.value===this.value?0:1:-1}},a.True=new a.Keyword("true"),a.False=new a.Keyword("false")}(c("../tree")),function(a){a.Media=function(b,c,d,e){this.index=d,this.currentFileInfo=e;var f=this.emptySelectors();this.features=new a.Value(c),this.rules=[new a.Ruleset(f,b)],this.rules[0].allowImports=!0},a.Media.prototype={type:"Media",accept:function(a){this.features&&(this.features=a.visit(this.features)),this.rules&&(this.rules=a.visitArray(this.rules))},genCSS:function(b,c){c.add("@media ",this.currentFileInfo,this.index),this.features.genCSS(b,c),a.outputRuleset(b,c,this.rules)},toCSS:a.toCSS,eval:function(b){b.mediaBlocks||(b.mediaBlocks=[],b.mediaPath=[]);var c=new a.Media(null,[],this.index,this.currentFileInfo);this.debugInfo&&(this.rules[0].debugInfo=this.debugInfo,c.debugInfo=this.debugInfo);var d=!1;b.strictMath||(d=!0,b.strictMath=!0);try{c.features=this.features.eval(b)}finally{d&&(b.strictMath=!1)}return b.mediaPath.push(c),b.mediaBlocks.push(c),b.frames.unshift(this.rules[0]),c.rules=[this.rules[0].eval(b)],b.frames.shift(),b.mediaPath.pop(),0===b.mediaPath.length?c.evalTop(b):c.evalNested(b)},variable:function(b){return a.Ruleset.prototype.variable.call(this.rules[0],b)},find:function(){return a.Ruleset.prototype.find.apply(this.rules[0],arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.rules[0])},emptySelectors:function(){var b=new a.Element("","&",this.index,this.currentFileInfo),c=[new a.Selector([b],null,null,this.index,this.currentFileInfo)];return c[0].mediaEmpty=!0,c},markReferenced:function(){var a,b=this.rules[0].rules;for(this.rules[0].markReferenced(),this.isReferenced=!0,a=0;a1){var d=this.emptySelectors();c=new a.Ruleset(d,b.mediaBlocks),c.multiMedia=!0}return delete b.mediaBlocks,delete b.mediaPath,c},evalNested:function(b){var c,d,e=b.mediaPath.concat([this]);for(c=0;c0;c--)b.splice(c,0,new a.Anonymous("and"));return new a.Expression(b)})),new a.Ruleset([],[])},permute:function(a){if(0===a.length)return[];if(1===a.length)return a[0];for(var b=[],c=this.permute(a.slice(1)),d=0;d0){for(j=!0,g=0;gh;h++)s.value(h),r[h]=d.matchCondition(e,b);(r[0]||r[1])&&(r[0]!=r[1]&&(l.group=r[1]?u:v),q.push(l))}else q.push(l);p=!0}}for(s.reset(),n=[0,0,0],g=0;g0)m=v;else if(m=u,n[u]+n[v]>1)throw{type:"Runtime",message:"Ambiguous use of `default()` found when matching for `"+this.format(e)+"`",index:this.index,filename:this.currentFileInfo.filename};for(g=0;gh;h++)if(g=d[h],k=g&&g.name){for(l=!1,i=0;ii;i++)f.push(d[i].value.eval(b));n.prependRule(new a.Rule(k,new a.Expression(f).eval(b)))}else{if(j=g&&g.value)j=j.eval(b);else{if(!o[h].value)throw{type:"Runtime",message:"wrong number of arguments for "+this.name+" ("+p+" for "+this.arity+")"};j=o[h].value.eval(c),n.resetCache()}n.prependRule(new a.Rule(k,j)),e[h]=j}if(o[h].variadic&&d)for(i=m;p>i;i++)e[i]=d[i].value.eval(b);m++}return n},eval:function(b){return new a.mixin.Definition(this.name,this.params,this.rules,this.condition,this.variadic,this.frames||b.frames.slice(0))},evalCall:function(b,c,d){var e,f,g=[],h=this.frames?this.frames.concat(b.frames):b.frames,i=this.evalParams(b,new a.evalEnv(b,h),c,g);return i.prependRule(new a.Rule("@arguments",new a.Expression(g).eval(b))),e=this.rules.slice(0),f=new a.Ruleset(null,e),f.originalRuleset=this,f=f.eval(new a.evalEnv(b,[this,i].concat(h))),d&&(f=this.parent.makeImportant.apply(f)),f},matchCondition:function(b,c){return this.condition&&!this.condition.eval(new a.evalEnv(c,[this.evalParams(c,new a.evalEnv(c,this.frames.concat(c.frames)),b,[])].concat(this.frames).concat(c.frames)))?!1:!0},matchArgs:function(a,b){var c,d=a&&a.length||0;if(this.variadic){if(dthis.params.length)return!1}c=Math.min(d,this.arity);for(var e=0;c>e;e++)if(!this.params[e].name&&!this.params[e].variadic&&a[e].value.eval(b).toCSS()!=this.params[e].value.eval(b).toCSS())return!1;return!0}}}(c("../tree")),function(a){a.Negative=function(a){this.value=a},a.Negative.prototype={type:"Negative",accept:function(a){this.value=a.visit(this.value)},genCSS:function(a,b){b.add("-"),this.value.genCSS(a,b)},toCSS:a.toCSS,eval:function(b){return b.isMathOn()?new a.Operation("*",[new a.Dimension(-1),this.value]).eval(b):new a.Negative(this.value.eval(b))}}}(c("../tree")),function(a){a.Operation=function(a,b,c){this.op=a.trim(),this.operands=b,this.isSpaced=c},a.Operation.prototype={type:"Operation",accept:function(a){this.operands=a.visit(this.operands)},eval:function(b){var c=this.operands[0].eval(b),d=this.operands[1].eval(b);if(b.isMathOn()){if(c instanceof a.Dimension&&d instanceof a.Color&&(c=c.toColor()),d instanceof a.Dimension&&c instanceof a.Color&&(d=d.toColor()),!c.operate)throw{type:"Operation",message:"Operation on an invalid type"};return c.operate(b,this.op,d)}return new a.Operation(this.op,[c,d],this.isSpaced)},genCSS:function(a,b){this.operands[0].genCSS(a,b),this.isSpaced&&b.add(" "),b.add(this.op),this.isSpaced&&b.add(" "),this.operands[1].genCSS(a,b)},toCSS:a.toCSS},a.operate=function(a,b,c,d){switch(b){case"+":return c+d;case"-":return c-d;case"*":return c*d;case"/":return c/d}}}(c("../tree")),function(a){a.Paren=function(a){this.value=a},a.Paren.prototype={type:"Paren",accept:function(a){this.value=a.visit(this.value)},genCSS:function(a,b){b.add("("),this.value.genCSS(a,b),b.add(")")},toCSS:a.toCSS,eval:function(b){return new a.Paren(this.value.eval(b))}}}(c("../tree")),function(a){a.Quoted=function(a,b,c,d,e){this.escaped=c,this.value=b||"",this.quote=a.charAt(0),this.index=d,this.currentFileInfo=e},a.Quoted.prototype={type:"Quoted",genCSS:function(a,b){this.escaped||b.add(this.quote,this.currentFileInfo,this.index),b.add(this.value),this.escaped||b.add(this.quote)},toCSS:a.toCSS,eval:function(b){var c=this,d=this.value.replace(/`([^`]+)`/g,function(d,e){return new a.JavaScript(e,c.index,!0).eval(b).value}).replace(/@\{([\w-]+)\}/g,function(d,e){var f=new a.Variable("@"+e,c.index,c.currentFileInfo).eval(b,!0);return f instanceof a.Quoted?f.value:f.toCSS()});return new a.Quoted(this.quote+d+this.quote,d,this.escaped,this.index,this.currentFileInfo)},compare:function(a){if(!a.toCSS)return-1;var b=this.toCSS(),c=a.toCSS();return b===c?0:c>b?-1:1}}}(c("../tree")),function(a){function b(a,b){var c,d="",e=b.length,f={add:function(a){d+=a}};for(c=0;e>c;c++)b[c].eval(a).genCSS(a,f);return d}a.Rule=function(b,c,d,e,f,g,h){this.name=b,this.value=c instanceof a.Value||c instanceof a.Ruleset?c:new a.Value([c]),this.important=d?" "+d.trim():"",this.merge=e,this.index=f,this.currentFileInfo=g,this.inline=h||!1,this.variable=b.charAt&&"@"===b.charAt(0)},a.Rule.prototype={type:"Rule",accept:function(a){this.value=a.visit(this.value)},genCSS:function(a,b){b.add(this.name+(a.compress?":":": "),this.currentFileInfo,this.index);try{this.value.genCSS(a,b)}catch(c){throw c.index=this.index,c.filename=this.currentFileInfo.filename,c}b.add(this.important+(this.inline||a.lastRule&&a.compress?"":";"),this.currentFileInfo,this.index)},toCSS:a.toCSS,eval:function(c){var d,e=!1,f=this.name;"string"!=typeof f&&(f=1===f.length&&f[0]instanceof a.Keyword?f[0].value:b(c,f)),"font"!==f||c.strictMath||(e=!0,c.strictMath=!0);try{if(d=this.value.eval(c),!this.variable&&"DetachedRuleset"===d.type)throw{message:"Rulesets cannot be evaluated on a property.",index:this.index,filename:this.currentFileInfo.filename};return new a.Rule(f,d,this.important,this.merge,this.index,this.currentFileInfo,this.inline)}catch(g){throw"number"!=typeof g.index&&(g.index=this.index,g.filename=this.currentFileInfo.filename),g}finally{e&&(c.strictMath=!1)}},makeImportant:function(){return new a.Rule(this.name,this.value,"!important",this.merge,this.index,this.currentFileInfo,this.inline)}}}(c("../tree")),function(a){a.RulesetCall=function(a){this.variable=a},a.RulesetCall.prototype={type:"RulesetCall",accept:function(){},eval:function(b){var c=new a.Variable(this.variable).eval(b);return c.callEval(b)}}}(c("../tree")),function(a){a.Ruleset=function(a,b,c){this.selectors=a,this.rules=b,this._lookups={},this.strictImports=c},a.Ruleset.prototype={type:"Ruleset",accept:function(a){this.paths?a.visitArray(this.paths,!0):this.selectors&&(this.selectors=a.visitArray(this.selectors)),this.rules&&this.rules.length&&(this.rules=a.visitArray(this.rules))},eval:function(b){var c,d,e,f,g=this.selectors,h=a.defaultFunc,i=!1;if(g&&(d=g.length)){for(c=[],h.error({type:"Syntax",message:"it is currently only allowed in parametric mixin guards,"}),f=0;d>f;f++)e=g[f].eval(b),c.push(e),e.evaldCondition&&(i=!0);h.reset()}else i=!0;var j,k,l=this.rules?this.rules.slice(0):null,m=new a.Ruleset(c,l,this.strictImports);m.originalRuleset=this,m.root=this.root,m.firstRoot=this.firstRoot,m.allowImports=this.allowImports,this.debugInfo&&(m.debugInfo=this.debugInfo),i||(l.length=0);var n=b.frames;n.unshift(m);var o=b.selectors;o||(b.selectors=o=[]),o.unshift(this.selectors),(m.root||m.allowImports||!m.strictImports)&&m.evalImports(b);var p=m.rules,q=p?p.length:0;for(f=0;q>f;f++)(p[f]instanceof a.mixin.Definition||p[f]instanceof a.DetachedRuleset)&&(p[f]=p[f].eval(b));var r=b.mediaBlocks&&b.mediaBlocks.length||0;for(f=0;q>f;f++)p[f]instanceof a.mixin.Call?(l=p[f].eval(b).filter(function(b){return b instanceof a.Rule&&b.variable?!m.variable(b.name):!0}),p.splice.apply(p,[f,1].concat(l)),q+=l.length-1,f+=l.length-1,m.resetCache()):p[f]instanceof a.RulesetCall&&(l=p[f].eval(b).rules.filter(function(b){return b instanceof a.Rule&&b.variable?!1:!0}),p.splice.apply(p,[f,1].concat(l)),q+=l.length-1,f+=l.length-1,m.resetCache());for(f=0;fb;b++)c=g[b],(c instanceof d||c instanceof e)&&f.push(c);return f},prependRule:function(a){var b=this.rules;b?b.unshift(a):this.rules=[a]},find:function(b,c){c=c||this;var d,e=[],f=b.toCSS();return f in this._lookups?this._lookups[f]:(this.rulesets().forEach(function(f){if(f!==c)for(var g=0;gd?Array.prototype.push.apply(e,f.find(new a.Selector(b.elements.slice(d)),c)):e.push(f);break}}),this._lookups[f]=e,e)},genCSS:function(b,c){var d,e,f,g,h,i,j=[],k=[];b.tabLevel=b.tabLevel||0,this.root||b.tabLevel++;var l,m=b.compress?"":Array(b.tabLevel+1).join(" "),n=b.compress?"":Array(b.tabLevel).join(" ");for(d=0;dd;d++)if(i=p[d],o=i.length)for(d>0&&c.add(l),b.firstSelector=!0,i[0].genCSS(b,c),b.firstSelector=!1,e=1;o>e;e++)i[e].genCSS(b,c);c.add((b.compress?"{":" {\n")+m)}for(d=0;dd;d++)l&&c.add(l),k[d].genCSS(b,c);c.isEmpty()||b.compress||!this.firstRoot||c.add("\n")},toCSS:a.toCSS,markReferenced:function(){if(this.selectors)for(var a=0;a0&&this.mergeElementsOnToSelectors(r,i),f=0;f0&&(k[0].elements=k[0].elements.slice(0),k[0].elements.push(new a.Element(j.combinator,"",j.index,j.currentFileInfo))),s.push(k);else for(g=0;g0?(m=k.slice(0),q=m.pop(),o=d.createDerived(q.elements.slice(0)),p=!1):o=d.createDerived([]),l.length>1&&(n=n.concat(l.slice(1))),l.length>0&&(p=!1,o.elements.push(new a.Element(j.combinator,l[0].elements[0].value,j.index,j.currentFileInfo)),o.elements=o.elements.concat(l[0].elements.slice(1))),p||m.push(o),m=m.concat(n),s.push(m);i=s,r=[]}for(r.length>0&&this.mergeElementsOnToSelectors(r,i),e=0;e0&&b.push(i[e])}else if(c.length>0)for(e=0;e0?e[e.length-1]=e[e.length-1].createDerived(e[e.length-1].elements.concat(b)):e.push(new a.Selector(b))}}}(c("../tree")),function(a){a.Selector=function(a,b,c,d,e,f){this.elements=a,this.extendList=b,this.condition=c,this.currentFileInfo=e||{},this.isReferenced=f,c||(this.evaldCondition=!0)},a.Selector.prototype={type:"Selector",accept:function(a){this.elements&&(this.elements=a.visitArray(this.elements)),this.extendList&&(this.extendList=a.visitArray(this.extendList)),this.condition&&(this.condition=a.visit(this.condition))},createDerived:function(b,c,d){d=null!=d?d:this.evaldCondition;var e=new a.Selector(b,c||this.extendList,null,this.index,this.currentFileInfo,this.isReferenced);return e.evaldCondition=d,e.mediaEmpty=this.mediaEmpty,e},match:function(a){var b,c,d=this.elements,e=d.length;if(a.CacheElements(),b=a._elements.length,0===b||b>e)return 0;for(c=0;b>c;c++)if(d[c].value!==a._elements[c])return 0;return b},CacheElements:function(){var a,b,c,d="";if(!this._elements){for(a=this.elements.length,c=0;a>c;c++)if(b=this.elements[c],d+=b.combinator.value,b.value.value){if("string"!=typeof b.value.value){d="";break}d+=b.value.value}else d+=b.value;this._elements=d.match(/[,&#\.\w-]([\w-]|(\\.))*/g),this._elements?"&"===this._elements[0]&&this._elements.shift():this._elements=[]}},isJustParentSelector:function(){return!this.mediaEmpty&&1===this.elements.length&&"&"===this.elements[0].value&&(" "===this.elements[0].combinator.value||""===this.elements[0].combinator.value)},eval:function(a){var b=this.condition&&this.condition.eval(a),c=this.elements,d=this.extendList;return c=c&&c.map(function(b){return b.eval(a)}),d=d&&d.map(function(b){return b.eval(a)}),this.createDerived(c,d,b)},genCSS:function(a,b){var c,d;if(a&&a.firstSelector||""!==this.elements[0].combinator.value||b.add(" ",this.currentFileInfo,this.index),!this._css)for(c=0;cc;c++)this.visit(a[c]);return a}var e=[];for(c=0;d>c;c++){var f=this.visit(a[c]);f.splice?f.length&&this.flatten(f,e):e.push(f)}return e},flatten:function(a,b){b||(b=[]);var c,d,e,f,g,h;for(d=0,c=a.length;c>d;d++)if(e=a[d],e.splice)for(g=0,f=e.length;f>g;g++)h=e[g],h.splice?h.length&&this.flatten(h,b):b.push(h);else b.push(e);return b}}}(c("./tree")),function(a){a.importVisitor=function(b,c,d,e,f){if(this._visitor=new a.visitor(this),this._importer=b,this._finish=c,this.env=d||new a.evalEnv,this.importCount=0,this.onceFileDetectionMap=e||{},this.recursionDetector={},f)for(var g in f)f.hasOwnProperty(g)&&(this.recursionDetector[g]=!0)},a.importVisitor.prototype={isReplacing:!0,run:function(a){var b;try{this._visitor.visit(a)}catch(c){b=c}this.isFinished=!0,0===this.importCount&&this._finish(b)},visitImport:function(b,c){var d,e=this,f=b.options.inline;if(!b.css||f){try{d=b.evalForImport(this.env)}catch(g){g.filename||(g.index=b.index,g.filename=b.currentFileInfo.filename),b.css=!0,b.error=g}if(d&&(!d.css||f)){b=d,this.importCount++;var h=new a.evalEnv(this.env,this.env.frames.slice(0));b.options.multiple&&(h.importMultiple=!0),this._importer.push(b.getPath(),b.currentFileInfo,b.options,function(c,d,g,i){c&&!c.filename&&(c.index=b.index,c.filename=b.currentFileInfo.filename),h.importMultiple||(b.skip=g?!0:function(){return i in e.onceFileDetectionMap?!0:(e.onceFileDetectionMap[i]=!0,!1)});var j=function(a){e.importCount--,0===e.importCount&&e.isFinished&&e._finish(a)};if(d){b.root=d,b.importedFilename=i;var k=g||i in e.recursionDetector;if(!f&&(h.importMultiple||!k))return e.recursionDetector[i]=!0,void new a.importVisitor(e._importer,j,h,e.onceFileDetectionMap,e.recursionDetector).run(d)}j()})}}return c.visitDeeper=!1,b},visitRule:function(a,b){return b.visitDeeper=!1,a},visitDirective:function(a){return this.env.frames.unshift(a),a},visitDirectiveOut:function(){this.env.frames.shift()},visitMixinDefinition:function(a){return this.env.frames.unshift(a),a},visitMixinDefinitionOut:function(){this.env.frames.shift()},visitRuleset:function(a){return this.env.frames.unshift(a),a},visitRulesetOut:function(){this.env.frames.shift()},visitMedia:function(a){return this.env.frames.unshift(a.ruleset),a},visitMediaOut:function(){this.env.frames.shift()}}}(c("./tree")),function(a){a.joinSelectorVisitor=function(){this.contexts=[[]],this._visitor=new a.visitor(this)},a.joinSelectorVisitor.prototype={run:function(a){return this._visitor.visit(a)},visitRule:function(a,b){b.visitDeeper=!1},visitMixinDefinition:function(a,b){b.visitDeeper=!1},visitRuleset:function(a){var b,c=this.contexts[this.contexts.length-1],d=[];this.contexts.push(d),a.root||(b=a.selectors,b&&(b=b.filter(function(a){return a.getIsOutput()}),a.selectors=b.length?b:b=null,b&&a.joinSelectors(d,c,b)),b||(a.rules=null),a.paths=d)},visitRulesetOut:function(){this.contexts.length=this.contexts.length-1},visitMedia:function(a){var b=this.contexts[this.contexts.length-1];a.rules[0].root=0===b.length||b[0].multiMedia}}}(c("./tree")),function(a){a.toCSSVisitor=function(b){this._visitor=new a.visitor(this),this._env=b},a.toCSSVisitor.prototype={isReplacing:!0,run:function(a){return this._visitor.visit(a)},visitRule:function(a){return a.variable?[]:a},visitMixinDefinition:function(a){return a.frames=[],[]},visitExtend:function(){return[]},visitComment:function(a){return a.isSilent(this._env)?[]:a},visitMedia:function(a,b){return a.accept(this._visitor),b.visitDeeper=!1,a.rules.length?a:[]},visitDirective:function(b){if(b.currentFileInfo.reference&&!b.isReferenced)return[];if("@charset"===b.name){if(this.charset){if(b.debugInfo){var c=new a.Comment("/* "+b.toCSS(this._env).replace(/\n/g,"")+" */\n");return c.debugInfo=b.debugInfo,this._visitor.visit(c)}return[]}this.charset=!0}return b},checkPropertiesInRoot:function(b){for(var c,d=0;d0)&&e.splice(0,0,b);else{b.paths&&(b.paths=b.paths.filter(function(b){var c;for(" "===b[0].elements[0].combinator.value&&(b[0].elements[0].combinator=new a.Combinator("")),c=0;ch;)d=f[h],d&&d.rules?(e.push(this._visitor.visit(d)),f.splice(h,1),g--):h++;g>0?b.accept(this._visitor):b.rules=null,c.visitDeeper=!1,f=b.rules,f&&(this._mergeRules(f),f=b.rules),f&&(this._removeDuplicateRules(f),f=b.rules),f&&f.length>0&&b.paths.length>0&&e.splice(0,0,b)}return 1===e.length?e[0]:e},_removeDuplicateRules:function(b){if(b){var c,d,e,f={};for(e=b.length-1;e>=0;e--)if(d=b[e],d instanceof a.Rule)if(f[d.name]){c=f[d.name],c instanceof a.Rule&&(c=f[d.name]=[f[d.name].toCSS(this._env)]);var g=d.toCSS(this._env);-1!==c.indexOf(g)?b.splice(e,1):c.push(g)}else f[d.name]=d}},_mergeRules:function(b){if(b){for(var c,d,e,f={},g=0;g1){d=c[0];var h=[],i=[];c.map(function(a){"+"===a.merge&&(i.length>0&&h.push(e(i)),i=[]),i.push(a)}),h.push(e(i)),d.value=g(h)}})}}}}(c("./tree")),function(a){a.extendFinderVisitor=function(){this._visitor=new a.visitor(this),this.contexts=[],this.allExtendsStack=[[]]},a.extendFinderVisitor.prototype={run:function(a){return a=this._visitor.visit(a),a.allExtends=this.allExtendsStack[0],a},visitRule:function(a,b){b.visitDeeper=!1},visitMixinDefinition:function(a,b){b.visitDeeper=!1},visitRuleset:function(b){if(!b.root){var c,d,e,f,g=[],h=b.rules,i=h?h.length:0;for(c=0;i>c;c++)b.rules[c]instanceof a.Extend&&(g.push(h[c]),b.extendOnEveryPath=!0);var j=b.paths;for(c=0;c=0||(i=[k.selfSelectors[0]],g=n.findMatch(j,i),g.length&&j.selfSelectors.forEach(function(b){h=n.extendSelector(g,i,b),l=new a.Extend(k.selector,k.option,0),l.selfSelectors=h,h[h.length-1].extendList=[l],m.push(l),l.ruleset=k.ruleset,l.parent_ids=l.parent_ids.concat(k.parent_ids,j.parent_ids),k.firstExtendOnThisSelectorPath&&(l.firstExtendOnThisSelectorPath=!0,k.ruleset.paths.push(h))}));if(m.length){if(this.extendChainCount++,d>100){var o="{unable to calculate}",p="{unable to calculate}";try{o=m[0].selfSelectors[0].toCSS(),p=m[0].selector.toCSS()}catch(q){}throw{message:"extend circular reference detected. One of the circular extends is currently:"+o+":extend("+p+")"}}return m.concat(n.doExtendChaining(m,c,d+1))}return m},visitRule:function(a,b){b.visitDeeper=!1},visitMixinDefinition:function(a,b){b.visitDeeper=!1},visitSelector:function(a,b){b.visitDeeper=!1},visitRuleset:function(a){if(!a.root){var b,c,d,e,f=this.allExtendsStack[this.allExtendsStack.length-1],g=[],h=this;for(d=0;d0&&k[i.matched].combinator.value!==g?i=null:i.matched++,i&&(i.finished=i.matched===k.length,i.finished&&!a.allowAfter&&(e+1j&&k>0&&(l[l.length-1].elements=l[l.length-1].elements.concat(c[j].elements.slice(k)),k=0,j++),i=f.elements.slice(k,h.index).concat([g]).concat(d.elements.slice(1)),j===h.pathIndex&&e>0?l[l.length-1].elements=l[l.length-1].elements.concat(i):(l=l.concat(c.slice(j,h.pathIndex)),l.push(new a.Selector(i))),j=h.endPathIndex,k=h.endPathElementIndex,k>=c[j].elements.length&&(k=0,j++);return j0&&(l[l.length-1].elements=l[l.length-1].elements.concat(c[j].elements.slice(k)),j++),l=l.concat(c.slice(j,c.length)) },visitRulesetOut:function(){},visitMedia:function(a){var b=a.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);b=b.concat(this.doExtendChaining(b,a.allExtends)),this.allExtendsStack.push(b)},visitMediaOut:function(){this.allExtendsStack.length=this.allExtendsStack.length-1},visitDirective:function(a){var b=a.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);b=b.concat(this.doExtendChaining(b,a.allExtends)),this.allExtendsStack.push(b)},visitDirectiveOut:function(){this.allExtendsStack.length=this.allExtendsStack.length-1}}}(c("./tree")),function(a){a.sourceMapOutput=function(a){this._css=[],this._rootNode=a.rootNode,this._writeSourceMap=a.writeSourceMap,this._contentsMap=a.contentsMap,this._contentsIgnoredCharsMap=a.contentsIgnoredCharsMap,this._sourceMapFilename=a.sourceMapFilename,this._outputFilename=a.outputFilename,this._sourceMapURL=a.sourceMapURL,a.sourceMapBasepath&&(this._sourceMapBasepath=a.sourceMapBasepath.replace(/\\/g,"/")),this._sourceMapRootpath=a.sourceMapRootpath,this._outputSourceFiles=a.outputSourceFiles,this._sourceMapGeneratorConstructor=a.sourceMapGenerator||c("source-map").SourceMapGenerator,this._sourceMapRootpath&&"/"!==this._sourceMapRootpath.charAt(this._sourceMapRootpath.length-1)&&(this._sourceMapRootpath+="/"),this._lineNumber=0,this._column=0},a.sourceMapOutput.prototype.normalizeFilename=function(a){return a=a.replace(/\\/g,"/"),this._sourceMapBasepath&&0===a.indexOf(this._sourceMapBasepath)&&(a=a.substring(this._sourceMapBasepath.length),("\\"===a.charAt(0)||"/"===a.charAt(0))&&(a=a.substring(1))),(this._sourceMapRootpath||"")+a},a.sourceMapOutput.prototype.add=function(a,b,c,d){if(a){var e,f,g,h,i;if(b){var j=this._contentsMap[b.filename];this._contentsIgnoredCharsMap[b.filename]&&(c-=this._contentsIgnoredCharsMap[b.filename],0>c&&(c=0),j=j.slice(this._contentsIgnoredCharsMap[b.filename])),j=j.substring(0,c),f=j.split("\n"),h=f[f.length-1]}if(e=a.split("\n"),g=e[e.length-1],b)if(d)for(i=0;i0){var d,e=JSON.stringify(this._sourceMapGenerator.toJSON());this._sourceMapURL?d=this._sourceMapURL:this._sourceMapFilename&&(d=this.normalizeFilename(this._sourceMapFilename)),this._writeSourceMap?this._writeSourceMap(e):d="data:application/json,"+encodeURIComponent(e),d&&this._css.push("/*# sourceMappingURL="+d+" */")}return this._css.join("")}}(c("./tree"));var y=/^(file|chrome(-extension)?|resource|qrc|app):/.test(location.protocol);w.env=w.env||("127.0.0.1"==location.hostname||"0.0.0.0"==location.hostname||"localhost"==location.hostname||location.port&&location.port.length>0||y?"development":"production");var z={debug:3,info:2,errors:1,none:0};if(w.logLevel="undefined"!=typeof w.logLevel?w.logLevel:"development"===w.env?z.debug:z.errors,w.async=w.async||!1,w.fileAsync=w.fileAsync||!1,w.poll=w.poll||(y?1e3:1500),w.functions)for(var A in w.functions)w.functions.hasOwnProperty(A)&&(w.tree.functions[A]=w.functions[A]);var B=/!dumpLineNumbers:(comments|mediaquery|all)/.exec(location.hash);B&&(w.dumpLineNumbers=B[1]);var C=/^text\/(x-)?less$/,D=null,E={};if(w.watch=function(){return w.watchMode||(w.env="development",v()),this.watchMode=!0,!0},w.unwatch=function(){return clearInterval(w.watchTimer),this.watchMode=!1,!1},/!watch/.test(location.hash)&&w.watch(),"development"!=w.env)try{D="undefined"==typeof a.localStorage?null:a.localStorage}catch(F){}var G=document.getElementsByTagName("link");w.sheets=[];for(var H=0;H -
    -

    Glyphicons

    - -

    Available glyphs

    -

    Includes 200 glyphs in font format from the Glyphicon Halflings set. Glyphicons Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, we only ask that you include a link back to Glyphicons whenever possible.

    -
    -
      - {% for iconClassName in site.data.glyphicons %} -
    • - - glyphicon {{ iconClassName }} -
    • - {% endfor %} -
    -
    - - -

    How to use

    -

    For performance reasons, all icons require a base class and individual icon class. To use, place the following code just about anywhere. Be sure to leave a space between the icon and text for proper padding.

    -
    -

    Don't mix with other components

    -

    Icon classes cannot be directly combined with other components. They should not be used along with other classes on the same element. Instead, add a nested <span> and apply the icon classes to the <span>.

    -
    -{% highlight html %} - -{% endhighlight %} - - -

    Examples

    -

    Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

    -
    - - -
    -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Dropdowns

    - -

    Toggleable, contextual menu for displaying lists of links. Made interactive with the dropdown JavaScript plugin.

    - - -

    Wrap the dropdown's trigger and the dropdown menu within .dropdown, or another element that declares position: relative;. Then add the menu's HTML.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - -

    By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add .dropdown-menu-right to a .dropdown-menu to right align the dropdown menu.

    -
    -

    May require additional positioning

    -

    Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain overflow properties or appear out of bounds of the viewport. Address these issues on your own as they arise.

    -
    -
    -

    Deprecated .pull-right alignment

    -

    As of v3.1.0, we've deprecated .pull-right on dropdown menus. To right-align a menu, use .dropdown-menu-right. Right-aligned nav components in the navbar use a mixin version of this class to automatically align the menu. To override it, use .dropdown-menu-left.

    -
    -{% highlight html %} - -{% endhighlight %} - - -

    Add a header to label sections of actions in any dropdown menu.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - -

    Add .disabled to a <li> in the dropdown to disable the link.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Button groups

    - -

    Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with our buttons plugin.

    - -
    -

    Tooltips & popovers in button groups require special setting

    -

    When using tooltips or popovers on elements within a .btn-group, you'll have to specify the option container: 'body' to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).

    -
    - -

    Basic example

    -

    Wrap a series of buttons with .btn in .btn-group.

    -
    -
    - - - -
    -
    -{% highlight html %} -
    - - - -
    -{% endhighlight %} - -

    Button toolbar

    -

    Combine sets of <div class="btn-group"> into a <div class="btn-toolbar"> for more complex components.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -

    Sizing

    -

    Instead of applying button sizing classes to every button in a group, just add .btn-group-* to the .btn-group.

    -
    - - - - -
    -{% highlight html %} -
    ...
    -
    ...
    -
    ...
    -
    ...
    -{% endhighlight %} - -

    Nesting

    -

    Place a .btn-group within another .btn-group when you want dropdown menus mixed with a series of buttons.

    -
    -
    - - - -
    - - -
    -
    -
    -{% highlight html %} -
    - - - -
    - - -
    -
    -{% endhighlight %} - -

    Vertical variation

    -

    Make a set of buttons appear vertically stacked rather than horizontally. Split button dropdowns are not supported here.

    -
    -
    - - -
    - - -
    - - -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -{% highlight html %} -
    - ... -
    -{% endhighlight %} - -

    Justified button groups

    -

    Make a group of buttons stretch at equal sizes to span the entire width of its parent. Also works with button dropdowns within the button group.

    - -
    -

    Handling borders

    -

    Due to the specific HTML and CSS used to justify buttons (namely display: table-cell), the borders between them are doubled. In regular button groups, margin-left: -1px is used to stack the borders instead of removing them. However, margin doesn't work with display: table-cell. As a result, depending on your customizations to Bootstrap, you may wish to remove or re-color the borders.

    -
    -
    -

    IE8 and borders

    -

    Internet Explorer 8 doesn't render borders in on buttons in a justified button group, whether it's on <a> or <button> elements. To get around that, wrap each button in another .btn-group.

    -

    See #12476 for more information.

    -
    - -

    With <a> elements

    -

    Just wrap a series of .btns in .btn-group.btn-group-justified.

    - -{% highlight html %} -
    - ... -
    -{% endhighlight %} - -

    With <button> elements

    -

    To use justified button groups with <button> elements, you must wrap each button in a button group. Most browsers don't properly apply our CSS for justification to <button> elements, but since we support button dropdowns, we can workaround that.

    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -{% highlight html %} -
    -
    - -
    -
    - -
    -
    - -
    -
    -{% endhighlight %} -
    - - - - -
    -

    Button dropdowns

    - -

    Use any button to trigger a dropdown menu by placing it within a .btn-group and providing the proper menu markup.

    - -
    -

    Plugin dependency

    -

    Button dropdowns require the dropdown plugin to be included in your version of Bootstrap.

    -
    - -

    Single button dropdowns

    -

    Turn a button into a dropdown toggle with some basic markup changes.

    - -{% highlight html %} - - -{% endhighlight %} - -

    Split button dropdowns

    -

    Similarly, create split button dropdowns with the same markup changes, only with a separate button.

    -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    -{% highlight html %} - -
    - - - -
    -{% endhighlight %} - -

    Sizing

    -

    Button dropdowns work with buttons of all sizes.

    -
    - - - -
    -{% highlight html %} - -
    - - -
    - - -
    - - -
    - - -
    - - -
    -{% endhighlight %} - -

    Dropup variation

    -

    Trigger dropdown menus above elements by adding .dropup to the parent.

    -
    - -
    -{% highlight html %} -
    - - - -
    -{% endhighlight %} -
    - - - - -
    -

    Input groups

    - -

    Extend form controls by adding text or buttons before, after, or on both sides of any text-based input. Use .input-group with an .input-group-addon to prepend or append elements to a single .form-control.

    - -
    -

    Cross-browser compatibility

    -

    Avoid using <select> elements here as they cannot be fully styled in WebKit browsers.

    -
    -
    -

    Tooltips & popovers in input groups require special setting

    -

    When using tooltips or popovers on elements within an .input-group, you'll have to specify the option container: 'body' to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).

    -
    -
    -

    Don't mix with other components

    -

    Do not mix form groups or grid column classes directly with input groups. Instead, nest the input group inside of the form group or grid-related element.

    -
    - - -

    Basic example

    -

    Place one add-on or button on either side of an input. You may also place one on both sides of an input.

    -

    We do not support multiple add-ons on a single side.

    -

    We do not support multiple form-controls in a single input group.

    -
    -
    - @ - -
    -
    -
    - - .00 -
    -
    -
    - $ - - .00 -
    -
    -{% highlight html %} -
    - @ - -
    - -
    - - .00 -
    - -
    - $ - - .00 -
    -{% endhighlight %} - -

    Sizing

    -

    Add the relative form sizing classes to the .input-group itself and contents within will automatically resize—no need for repeating the form control size classes on each element.

    -
    -
    - @ - -
    -
    -
    - @ - -
    -
    -
    - @ - -
    -
    -{% highlight html %} -
    - @ - -
    - -
    - @ - -
    - -
    - @ - -
    -{% endhighlight %} - - -

    Checkboxes and radio addons

    -

    Place any checkbox or radio option within an input group's addon instead of text.

    -
    -
    -
    -
    - - - - -
    -
    -
    -
    - - - - -
    -
    -
    -
    -{% highlight html %} -
    -
    -
    - - - - -
    -
    -
    -
    - - - - -
    -
    -
    -{% endhighlight %} - - -

    Button addons

    -

    Buttons in input groups are a bit different and require one extra level of nesting. Instead of .input-group-addon, you'll need to use .input-group-btn to wrap the buttons. This is required due to default browser styles that cannot be overridden.

    -
    -
    -
    -
    - - - - -
    -
    -
    -
    - - - - -
    -
    -
    -
    -{% highlight html %} -
    -
    -
    - - - - -
    -
    -
    -
    - - - - -
    -
    -
    -{% endhighlight %} - -

    Buttons with dropdowns

    -

    -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    -{% highlight html %} -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -{% endhighlight %} - -

    Segmented buttons

    -
    -
    -
    -
    -
    - - - -
    - -
    -
    -
    -
    - -
    - - - -
    -
    -
    -
    -
    -{% highlight html %} -
    -
    - -
    - -
    - -
    - -
    - -
    -
    -{% endhighlight %} -
    - - - - -
    -

    Navs

    - -

    Navs available in Bootstrap have shared markup, starting with the base .nav class, as well as shared states. Swap modifier classes to switch between each style.

    - - -

    Note the .nav-tabs class requires the .nav base class.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} -
    -

    Requires JavaScript tabs plugin

    -

    For tabs with tabbable areas, you must use the tabs JavaScript plugin.

    -
    - - -

    Take that same HTML, but use .nav-pills instead:

    -
    - -
    -{% highlight html %} - -{% endhighlight %} -

    Pills are also vertically stackable. Just add .nav-stacked.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - - -

    Easily make tabs or pills equal widths of their parent at screens wider than 768px with .nav-justified. On smaller screens, the nav links are stacked.

    -
    -

    Safari and responsive justified navs

    -

    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. This bug is also shown in the justified nav example.

    -
    -
    - -
    - -
    -{% highlight html %} - - -{% endhighlight %} - - - -

    For any nav component (tabs or pills), add .disabled for gray links and no hover effects.

    - -
    -

    Link functionality not impacted

    -

    This class will only change the <a>'s appearance, not its functionality. Use custom JavaScript to disable links here.

    -
    - - -{% highlight html %} - -{% endhighlight %} - - - -

    Add dropdown menus with a little extra HTML and the dropdowns JavaScript plugin.

    - -

    Tabs with dropdowns

    - -{% highlight html %} - -{% endhighlight %} - -

    Pills with dropdowns

    - -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Navbar

    - - -

    Navbars are responsive meta components that serve as navigation headers for your application or site. They begin collapsed (and are toggleable) in mobile views and become horizontal as the available viewport width increases.

    - -
    -

    Overflowing content

    -

    Since Bootstrap doesn't know how much space the content in your navbar needs, you might run into issues with content wrapping into a second row. To resolve this, you can:

    -
      -
    1. Reduce the amount or width of navbar items.
    2. -
    3. Hide certain navbar items at certain screen sizes using responsive utility classes.
    4. -
    5. Change the point at which your navbar switches between collapsed and horizontal mode. Customize the @grid-float-breakpoint variable or add your own media query.
    6. -
    -
    -
    -

    Requires JavaScript

    -

    If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossible to expand the navbar and view the content within the .navbar-collapse.

    -
    - -
    - -
    -{% highlight html %} - -{% endhighlight %} - -
    -

    Plugin dependency

    -

    The responsive navbar requires the collapse plugin to be included in your version of Bootstrap.

    -
    - -
    -

    Make navbars accessible

    -

    Be sure to add a role="navigation" to every navbar to help with accessibility.

    -
    - - - -

    Place form content within .navbar-form for proper vertical alignment and collapsed behavior in narrow viewports. Use the alignment options to decide where it resides within the navbar content.

    -

    As a heads up, .navbar-form shares much of its code with .form-inline via mixin. Some form controls, like input groups, may require fixed widths to be show up properly within a navbar.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -
    -

    Mobile device caveats

    -

    There are some caveats regarding using form controls within fixed elements on mobile devices. See our browser support docs for details.

    -
    - -
    -

    Always add labels

    -

    Screen readers will have trouble with your forms if you don't include a label for every input. For these inline navbar forms, you can hide the labels using the .sr-only class.

    -
    - - - -

    Add the .navbar-btn class to <button> elements not residing in a <form> to vertically center them in the navbar.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -
    -

    Context-specific usage

    -

    Like the standard button classes, .navbar-btn can be used on <a> and <input> elements. However, neither .navbar-btn nor the standard button classes should be used on <a> elements within .navbar-nav.

    -
    - - -

    Wrap strings of text in an element with .navbar-text, usually on a <p> tag for proper leading and color.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - - -

    For folks using standard links that are not within the regular navbar navigation component, use the .navbar-link class to add the proper colors for the default and inverse navbar options.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - - -

    Align nav links, forms, buttons, or text, using the .navbar-left or .navbar-right utility classes. Both classes will add a CSS float in the specified direction. For example, to align nav links, put them in a separate <ul> with the respective utility class applied.

    -

    These classes are mixin-ed versions of .pull-left and .pull-right, but they're scoped to media queries for easier handling of navbar components across device sizes.

    -
    -

    Right aligning multiple components

    -

    Navbars currently have a limitation with multiple .navbar-right classes. To properly space content, we use negative margin on the last .navbar-right element. When there are multiple elements using that class, these margins don't work as intended.

    -

    We'll revisit this when we can rewrite that component in v4.

    -
    - - - -

    Add .navbar-fixed-top and include a .container or .container-fluid to center and pad navbar content.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -
    -

    Body padding required

    -

    The fixed navbar will overlay your other content, unless you add padding to the top of the <body>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.

    -{% highlight scss %} -body { padding-top: 70px; } -{% endhighlight %} -

    Make sure to include this after the core Bootstrap CSS.

    -
    - - - -

    Add .navbar-fixed-bottom and include a .container or .container-fluid to center and pad navbar content.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -
    -

    Body padding required

    -

    The fixed navbar will overlay your other content, unless you add padding to the bottom of the <body>. Try out your own values or use our snippet below. Tip: By default, the navbar is 50px high.

    -{% highlight scss %} -body { padding-bottom: 70px; } -{% endhighlight %} -

    Make sure to include this after the core Bootstrap CSS.

    -
    - - - -

    Create a full-width navbar that scrolls away with the page by adding .navbar-static-top and include a .container or .container-fluid to center and pad navbar content.

    -

    Unlike the .navbar-fixed-* classes, you do not need to change any padding on the body.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - - -

    Modify the look of the navbar by adding .navbar-inverse.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Breadcrumbs

    - -

    Indicate the current page's location within a navigational hierarchy.

    -

    Separators are automatically added in CSS through :before and content.

    -
    - - - -
    -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Pagination

    - -

    Provide pagination links for your site or app with the multi-page pagination component, or the simpler pager alternative.

    - -

    Default pagination

    -

    Simple pagination inspired by Rdio, great for apps and search results. The large block is hard to miss, easily scalable, and provides large click areas.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -

    Disabled and active states

    -

    Links are customizable for different circumstances. Use .disabled for unclickable links and .active to indicate the current page.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} -

    You can optionally swap out active or disabled anchors for <span> to remove click functionality while retaining intended styles.

    -{% highlight html %} -
      -
    • «
    • -
    • 1 (current)
    • - ... -
    -{% endhighlight %} - - -

    Sizing

    -

    Fancy larger or smaller pagination? Add .pagination-lg or .pagination-sm for additional sizes.

    -
    -
    - -
    -
    - -
    -
    - -
    -
    -{% highlight html %} -
      ...
    -
      ...
    -
      ...
    -{% endhighlight %} - - -

    Pager

    -

    Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines.

    - -

    Default example

    -

    By default, the pager centers links.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -

    Aligned links

    -

    Alternatively, you can align each link to the sides:

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - -

    Optional disabled state

    -

    Pager links also use the general .disabled utility class from the pagination.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Labels

    - -

    Example

    -
    -

    Example heading New

    -

    Example heading New

    -

    Example heading New

    -

    Example heading New

    -
    Example heading New
    -
    Example heading New
    -
    -{% highlight html %} -

    Example heading New

    -{% endhighlight %} - -

    Available variations

    -

    Add any of the below mentioned modifier classes to change the appearance of a label.

    -
    - Default - Primary - Success - Info - Warning - Danger -
    -{% highlight html %} -Default -Primary -Success -Info -Warning -Danger -{% endhighlight %} -
    - - - - -
    -

    Badges

    - -

    Easily highlight new or unread items by adding a <span class="badge"> to links, Bootstrap navs, and more.

    - -
    - Inbox 42 -
    -{% highlight html %} -Inbox 42 -{% endhighlight %} - -

    Self collapsing

    -

    When there are no new or unread items, badges will simply collapse (via CSS's :empty selector) provided no content exists within.

    - -
    -

    Cross-browser compatibility

    -

    Badges won't self collapse in Internet Explorer 8 because it lacks support for the :empty selector.

    -
    - -

    Adapts to active nav states

    -

    Built-in styles are included for placing badges in active states in pill navigations.

    -
    - -
    - -
    - -
    -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Jumbotron

    - -

    A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site.

    -
    -
    -

    Hello, world!

    -

    This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

    -

    Learn more

    -
    -
    -{% highlight html %} -
    -

    Hello, world!

    -

    ...

    -

    Learn more

    -
    -{% endhighlight %} -

    To make the jumbotron full width, and without rounded corners, place it outside all .containers and instead add a .container within.

    -{% highlight html %} -
    -
    - ... -
    -
    -{% endhighlight %} -
    - - - - -
    -

    Page header

    - -

    A simple shell for an h1 to appropriately space out and segment sections of content on a page. It can utilize the h1's default small element, as well as most other components (with additional styles).

    -
    - -
    -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Thumbnails

    - -

    Extend Bootstrap's grid system with the thumbnail component to easily display grids of images, videos, text, and more.

    - -

    Default example

    -

    By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.

    -
    -
    -
    - - Generic placeholder thumbnail - -
    -
    - - Generic placeholder thumbnail - -
    -
    - - Generic placeholder thumbnail - -
    -
    - - Generic placeholder thumbnail - -
    -
    -
    -{% highlight html %} -
    -
    - - ... - -
    - ... -
    -{% endhighlight %} - -

    Custom content

    -

    With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.

    -
    -
    -
    -
    - Generic placeholder thumbnail -
    -

    Thumbnail label

    -

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    -

    Button Button

    -
    -
    -
    -
    -
    - Generic placeholder thumbnail -
    -

    Thumbnail label

    -

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    -

    Button Button

    -
    -
    -
    -
    -
    - Generic placeholder thumbnail -
    -

    Thumbnail label

    -

    Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    -

    Button Button

    -
    -
    -
    -
    -
    -{% highlight html %} -
    -
    -
    - ... -
    -

    Thumbnail label

    -

    ...

    -

    Button Button

    -
    -
    -
    -
    -{% endhighlight %} -
    - - - - -
    -

    Alerts

    - -

    Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the alerts jQuery plugin.

    - -

    Examples

    -

    Wrap any text and an optional dismiss button in .alert and one of the four contextual classes (e.g., .alert-success) for basic alert messages.

    - -
    -

    No default class

    -

    Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.

    -
    - -
    - - - - -
    -{% highlight html %} - - - - -{% endhighlight %} - -

    Dismissable alerts

    -

    Build on any alert by adding an optional .alert-dismissable and close button.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -
    -

    Ensure proper behavior across all devices

    -

    Be sure to use the <button> element with the data-dismiss="alert" data attribute.

    -
    - - -

    Use the .alert-link utility class to quickly provide matching colored links within any alert.

    -
    - - - - -
    -{% highlight html %} - - - - -{% endhighlight %} -
    - - - - -
    -

    Progress bars

    - -

    Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.

    - -
    -

    Cross-browser compatibility

    -

    Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.

    -
    - -

    Basic example

    -

    Default progress bar.

    -
    -
    -
    - 60% Complete -
    -
    -
    -{% highlight html %} -
    -
    - 60% Complete -
    -
    -{% endhighlight %} - -

    With label

    -

    Remove the .sr-only class from within the progress bar to show a visible percentage. For low percentages, consider adding a min-width to ensure the label's text is fully visible.

    -
    -
    -
    - 60% -
    -
    -
    -{% highlight html %} -
    -
    - 60% -
    -
    -{% endhighlight %} - -

    Low percentages

    -

    Progress bars representing low single digit percentages, as well as 0%, include a min-width: 20px; for legibility.

    -
    -
    -
    - 0% -
    -
    -
    -
    - 2% -
    -
    -
    -{% highlight html %} -
    -
    - 0% -
    -
    -
    -
    - 2% -
    -
    -{% endhighlight %} - - -

    Contextual alternatives

    -

    Progress bars use some of the same button and alert classes for consistent styles.

    -
    -
    -
    - 40% Complete (success) -
    -
    -
    -
    - 20% Complete -
    -
    -
    -
    - 60% Complete (warning) -
    -
    -
    -
    - 80% Complete (danger) -
    -
    -
    -{% highlight html %} -
    -
    - 40% Complete (success) -
    -
    -
    -
    - 20% Complete -
    -
    -
    -
    - 60% Complete (warning) -
    -
    -
    -
    - 80% Complete -
    -
    -{% endhighlight %} - -

    Striped

    -

    Uses a gradient to create a striped effect. Not available in IE8.

    -
    -
    -
    - 40% Complete (success) -
    -
    -
    -
    - 20% Complete -
    -
    -
    -
    - 60% Complete (warning) -
    -
    -
    -
    - 80% Complete (danger) -
    -
    -
    -{% highlight html %} -
    -
    - 40% Complete (success) -
    -
    -
    -
    - 20% Complete -
    -
    -
    -
    - 60% Complete (warning) -
    -
    -
    -
    - 80% Complete (danger) -
    -
    -{% endhighlight %} - -

    Animated

    -

    Add .active to .progress-striped to animate the stripes right to left. Not available in IE9 and below.

    -
    -
    -
    45% Complete
    -
    -
    -{% highlight html %} -
    -
    - 45% Complete -
    -
    -{% endhighlight %} - -

    Stacked

    -

    Place multiple bars into the same .progress to stack them.

    -
    -
    -
    - 35% Complete (success) -
    -
    - 20% Complete (warning) -
    -
    - 10% Complete (danger) -
    -
    -
    -{% highlight html %} -
    -
    - 35% Complete (success) -
    -
    - 20% Complete (warning) -
    -
    - 10% Complete (danger) -
    -
    -{% endhighlight %} -
    - - - - -
    -

    Media object

    - -

    Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.

    - -

    Default media

    -

    The default media allow to float a media object (images, video, audio) to the left or right of a content block.

    -
    -
    - - Generic placeholder image - -
    -

    Media heading

    - 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. -
    -
    -
    - - Generic placeholder image - -
    -

    Media heading

    - 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. -
    - - Generic placeholder image - -
    -

    Nested media heading

    - 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. -
    -
    -
    -
    -
    -{% highlight html %} -
    - - ... - -
    -

    Media heading

    - ... -
    -
    -{% endhighlight %} - -

    Media list

    -

    With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).

    -
    -
      -
    • - - Generic placeholder image - -
      -

      Media heading

      -

      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.

      - -
      - - Generic placeholder image - -
      -

      Nested media heading

      - 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. - -
      - - Generic placeholder image - -
      -

      Nested media heading

      - 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. -
      -
      -
      -
      - -
      - - Generic placeholder image - -
      -

      Nested media heading

      - 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. -
      -
      -
      -
    • -
    • - - Generic placeholder image - -
      -

      Media heading

      - 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. -
      -
    • -
    -
    -{% highlight html %} -
      -
    • - - ... - -
      -

      Media heading

      - ... -
      -
    • -
    -{% endhighlight %} -
    - - - - -
    -

    List group

    - -

    List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content.

    - -

    Basic example

    -

    The most basic list group is simply an unordered list with list items, and the proper classes. Build upon it with the options that follow, or your own CSS as needed.

    -
    -
      -
    • Cras justo odio
    • -
    • Dapibus ac facilisis in
    • -
    • Morbi leo risus
    • -
    • Porta ac consectetur ac
    • -
    • Vestibulum at eros
    • -
    -
    -{% highlight html %} -
      -
    • Cras justo odio
    • -
    • Dapibus ac facilisis in
    • -
    • Morbi leo risus
    • -
    • Porta ac consectetur ac
    • -
    • Vestibulum at eros
    • -
    -{% endhighlight %} - -

    Badges

    -

    Add the badges component to any list group item and it will automatically be positioned on the right.

    -
    -
      -
    • - 14 - Cras justo odio -
    • -
    • - 2 - Dapibus ac facilisis in -
    • -
    • - 1 - Morbi leo risus -
    • -
    -
    -{% highlight html %} -
      -
    • - 14 - Cras justo odio -
    • -
    -{% endhighlight %} - -

    Linked items

    -

    Linkify list group items by using anchor tags instead of list items (that also means a parent <div> instead of an <ul>). No need for individual parents around each element.

    - -{% highlight html %} - -{% endhighlight %} - -

    Disabled items

    -

    Add .disabled to a .list-group-item to gray it out to appear disabled.

    - -{% highlight html %} - -{% endhighlight %} - -

    Contextual classes

    -

    Use contextual classes to style list items, default or linked. Also includes .active state.

    -
    -
    -
    -
      -
    • Dapibus ac facilisis in
    • -
    • Cras sit amet nibh libero
    • -
    • Porta ac consectetur ac
    • -
    • Vestibulum at eros
    • -
    -
    - -
    -
    -{% highlight html %} -
      -
    • Dapibus ac facilisis in
    • -
    • Cras sit amet nibh libero
    • -
    • Porta ac consectetur ac
    • -
    • Vestibulum at eros
    • -
    - -{% endhighlight %} - -

    Custom content

    -

    Add nearly any HTML within, even for linked list groups like the one below.

    - -{% highlight html %} - -{% endhighlight %} -
    - - - - -
    -

    Panels

    - -

    While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.

    - -

    Basic example

    -

    By default, all the .panel does is apply some basic border and padding to contain some content.

    -
    -
    -
    - Basic panel example -
    -
    -
    -{% highlight html %} -
    -
    - Basic panel example -
    -
    -{% endhighlight %} - -

    Panel with heading

    -

    Easily add a heading container to your panel with .panel-heading. You may also include any <h1>-<h6> with a .panel-title class to add a pre-styled heading.

    -
    -
    -
    Panel heading without title
    -
    - Panel content -
    -
    -
    -
    -

    Panel title

    -
    -
    - Panel content -
    -
    -
    -{% highlight html %} -
    -
    Panel heading without title
    -
    - Panel content -
    -
    - -
    -
    -

    Panel title

    -
    -
    - Panel content -
    -
    -{% endhighlight %} - - -

    Wrap buttons or secondary text in .panel-footer. Note that panel footers do not inherit colors and borders when using contextual variations as they are not meant to be in the foreground.

    -
    -
    -
    - Panel content -
    - -
    -
    -{% highlight html %} -
    -
    - Panel content -
    - -
    -{% endhighlight %} - -

    Contextual alternatives

    -

    Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.

    -
    -
    -
    -

    Panel title

    -
    -
    - Panel content -
    -
    -
    -
    -

    Panel title

    -
    -
    - Panel content -
    -
    -
    -
    -

    Panel title

    -
    -
    - Panel content -
    -
    -
    -
    -

    Panel title

    -
    -
    - Panel content -
    -
    -
    -
    -

    Panel title

    -
    -
    - Panel content -
    -
    -
    -{% highlight html %} -
    ...
    -
    ...
    -
    ...
    -
    ...
    -
    ...
    -{% endhighlight %} - -

    With tables

    -

    Add any non-bordered .table within a panel for a seamless design. If there is a .panel-body, we add an extra border to the top of the table for separation.

    -
    -
    - -
    Panel heading
    -
    -

    Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    -
    -
    -{% highlight html %} -
    - -
    Panel heading
    -
    -

    ...

    -
    - - - - ... -
    -
    -{% endhighlight %} - -

    If there is no panel body, the component moves from panel header to table without interruption.

    -
    -
    - -
    Panel heading
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    -
    -
    -{% highlight html %} -
    - -
    Panel heading
    - - - - ... -
    -
    -{% endhighlight %} - - -

    With list groups

    -

    Easily include full-width list groups within any panel.

    -
    -
    - -
    Panel heading
    -
    -

    Some default panel content here. Nulla vitae elit libero, a pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.

    -
    - - -
      -
    • Cras justo odio
    • -
    • Dapibus ac facilisis in
    • -
    • Morbi leo risus
    • -
    • Porta ac consectetur ac
    • -
    • Vestibulum at eros
    • -
    -
    -
    -{% highlight html %} -
    - -
    Panel heading
    -
    -

    ...

    -
    - - -
      -
    • Cras justo odio
    • -
    • Dapibus ac facilisis in
    • -
    • Morbi leo risus
    • -
    • Porta ac consectetur ac
    • -
    • Vestibulum at eros
    • -
    -
    -{% endhighlight %} -
    - - - - -
    -

    Responsive embed

    - -

    Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device.

    -

    Rules are directly apply to <iframe>, <embed> and <object> elements, optionally use of an explicit descendant class .embed-responsive-item when you want to match the styling for other attributes.

    -

    Pro-Tip! You don't need to include frameborder="0" in your <iframe>s as we override that for you.

    -
    -
    - -
    -
    -{% highlight html %} - -
    - -
    - - -
    - -
    -{% endhighlight %} -
    - - - - -
    -

    Wells

    - -

    Default well

    -

    Use the well as a simple effect on an element to give it an inset effect.

    -
    -
    - Look, I'm in a well! -
    -
    -{% highlight html %} -
    ...
    -{% endhighlight %} -

    Optional classes

    -

    Control padding and rounded corners with two optional modifier classes.

    -
    -
    - Look, I'm in a large well! -
    -
    -{% highlight html %} -
    ...
    -{% endhighlight %} - -
    -
    - Look, I'm in a small well! -
    -
    -{% highlight html %} -
    ...
    -{% endhighlight %} -
    +{% include components/glyphicons.html %} +{% include components/dropdowns.html %} +{% include components/button-groups.html %} +{% include components/button-dropdowns.html %} +{% include components/input-groups.html %} +{% include components/navs.html %} +{% include components/navbar.html %} +{% include components/breadcrumbs.html %} +{% include components/pagination.html %} +{% include components/labels.html %} +{% include components/badges.html %} +{% include components/jumbotron.html %} +{% include components/page-header.html %} +{% include components/thumbnails.html %} +{% include components/alerts.html %} +{% include components/progress-bars.html %} +{% include components/media.html %} +{% include components/list-group.html %} +{% include components/panels.html %} +{% include components/responsive-embed.html %} +{% include components/wells.html %} diff --git a/docs/css.html b/docs/css.html index 20b00fae96..021406d489 100644 --- a/docs/css.html +++ b/docs/css.html @@ -5,3491 +5,16 @@ slug: css lead: "Global CSS settings, fundamental HTML elements styled and enhanced with extensible classes, and an advanced grid system." --- - - -
    -

    Overview

    - -

    Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.

    - -

    HTML5 doctype

    -

    Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.

    -{% highlight html %} - - - ... - -{% endhighlight %} - -

    Mobile first

    -

    With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, Bootstrap is mobile first. Mobile first styles can be found throughout the entire library instead of in separate files.

    -

    To ensure proper rendering and touch zooming, add the viewport meta tag to your <head>.

    -{% highlight html %} - -{% endhighlight %} -

    You can disable zooming capabilities on mobile devices by adding user-scalable=no to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall, we don't recommend this on every site, so use caution!

    -{% highlight html %} - -{% endhighlight %} - - -

    Bootstrap sets basic global display, typography, and link styles. Specifically, we:

    -
      -
    • Set background-color: #fff; on the body
    • -
    • Use the @font-family-base, @font-size-base, and @line-height-base attributes as our typographic base
    • -
    • Set the global link color via @link-color and apply link underlines only on :hover
    • -
    -

    These styles can be found within scaffolding.less.

    - -

    Normalize.css

    -

    For improved cross-browser rendering, we use Normalize.css, a project by Nicolas Gallagher and Jonathan Neal.

    - -

    Containers

    -

    Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Note that, due to padding and more, neither container is nestable.

    -

    Use .container for a responsive fixed width container.

    -{% highlight html %} -
    - ... -
    -{% endhighlight %} -

    Use .container-fluid for a full width container, spanning the entire width of your viewport.

    -{% highlight html %} -
    - ... -
    -{% endhighlight %} -
    - - - - -
    -

    Grid system

    - -

    Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes predefined classes for easy layout options, as well as powerful mixins for generating more semantic layouts.

    - -

    Introduction

    -

    Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works:

    -
      -
    • Rows must be placed within a .container (fixed-width) or .container-fluid (full-width) for proper alignment and padding.
    • -
    • Use rows to create horizontal groups of columns.
    • -
    • Content should be placed within columns, and only columns may be immediate children of rows.
    • -
    • Predefined grid classes like .row and .col-xs-4 are available for quickly making grid layouts. Less mixins can also be used for more semantic layouts.
    • -
    • Columns create gutters (gaps between column content) via padding. That padding is offset in rows for the first and last column via negative margin on .rows.
    • -
    • The negative margin is why the examples below are outdented. It's so that content within grid columns is lined up with non-grid content.
    • -
    • Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three .col-xs-4.
    • -
    • Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any .col-md- class to an element will not only affect its styling on medium devices but also on large devices if a .col-lg- class is not present.
    • -
    -

    Look to the examples for applying these principles to your code.

    - -

    Media queries

    -

    We use the following media queries in our Less files to create the key breakpoints in our grid system.

    -{% highlight scss %} -/* Extra small devices (phones, less than 768px) */ -/* No media query since this is the default in Bootstrap */ - -/* Small devices (tablets, 768px and up) */ -@media (min-width: @screen-sm-min) { ... } - -/* Medium devices (desktops, 992px and up) */ -@media (min-width: @screen-md-min) { ... } - -/* Large devices (large desktops, 1200px and up) */ -@media (min-width: @screen-lg-min) { ... } -{% endhighlight %} -

    We occasionally expand on these media queries to include a max-width to limit CSS to a narrower set of devices.

    -{% highlight scss %} -@media (max-width: @screen-xs-max) { ... } -@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { ... } -@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { ... } -@media (min-width: @screen-lg-min) { ... } -{% endhighlight %} - -

    Grid options

    -

    See how aspects of the Bootstrap grid system work across multiple devices with a handy table.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Extra small devices - Phones (<768px) - - Small devices - Tablets (≥768px) - - Medium devices - Desktops (≥992px) - - Large devices - Desktops (≥1200px) -
    Grid behaviorHorizontal at all timesCollapsed to start, horizontal above breakpoints
    Container widthNone (auto)750px970px1170px
    Class prefix.col-xs-.col-sm-.col-md-.col-lg-
    # of columns12
    Column widthAuto~62px~81px~97px
    Gutter width30px (15px on each side of a column)
    NestableYes
    OffsetsYes
    Column orderingYes
    -
    - -

    Example: Stacked-to-horizontal

    -

    Using a single set of .col-md-* grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any .row.

    -
    -
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    -
    -
    .col-md-8
    -
    .col-md-4
    -
    -
    -
    .col-md-4
    -
    .col-md-4
    -
    .col-md-4
    -
    -
    -
    .col-md-6
    -
    .col-md-6
    -
    -
    -{% highlight html %} -
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    .col-md-1
    -
    -
    -
    .col-md-8
    -
    .col-md-4
    -
    -
    -
    .col-md-4
    -
    .col-md-4
    -
    .col-md-4
    -
    -
    -
    .col-md-6
    -
    .col-md-6
    -
    -{% endhighlight %} - -

    Example: Fluid container

    -

    Turn any fixed-width grid layout into a full-width layout by changing your outermost .container to .container-fluid.

    -{% highlight html %} -
    -
    - ... -
    -
    -{% endhighlight %} - -

    Example: Mobile and desktop

    -

    Don't want your columns to simply stack in smaller devices? Use the extra small and medium device grid classes by adding .col-xs-* .col-md-* to your columns. See the example below for a better idea of how it all works.

    -
    -
    -
    .col-xs-12 .col-md-8
    -
    .col-xs-6 .col-md-4
    -
    -
    -
    .col-xs-6 .col-md-4
    -
    .col-xs-6 .col-md-4
    -
    .col-xs-6 .col-md-4
    -
    -
    -
    .col-xs-6
    -
    .col-xs-6
    -
    -
    -{% highlight html %} - -
    -
    .col-xs-12 .col-md-8
    -
    .col-xs-6 .col-md-4
    -
    - - -
    -
    .col-xs-6 .col-md-4
    -
    .col-xs-6 .col-md-4
    -
    .col-xs-6 .col-md-4
    -
    - - -
    -
    .col-xs-6
    -
    .col-xs-6
    -
    -{% endhighlight %} - -

    Example: Mobile, tablet, desktops

    -

    Build on the previous example by creating even more dynamic and powerful layouts with tablet .col-sm-* classes.

    -
    -
    -
    .col-xs-12 .col-sm-6 .col-md-8
    -
    .col-xs-6 .col-md-4
    -
    -
    -
    .col-xs-6 .col-sm-4
    -
    .col-xs-6 .col-sm-4
    - -
    -
    .col-xs-6 .col-sm-4
    -
    -
    -{% highlight html %} -
    -
    .col-xs-12 .col-sm-6 .col-md-8
    -
    .col-xs-6 .col-md-4
    -
    -
    -
    .col-xs-6 .col-sm-4
    -
    .col-xs-6 .col-sm-4
    - -
    -
    .col-xs-6 .col-sm-4
    -
    -{% endhighlight %} - -

    Responsive column resets

    -

    With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a .clearfix and our responsive utility classes.

    -
    -
    -
    - .col-xs-6 .col-sm-3 -
    - Resize your viewport or check it out on your phone for an example. -
    -
    .col-xs-6 .col-sm-3
    - - -
    - -
    .col-xs-6 .col-sm-3
    -
    .col-xs-6 .col-sm-3
    -
    -
    -{% highlight html %} -
    -
    .col-xs-6 .col-sm-3
    -
    .col-xs-6 .col-sm-3
    - - -
    - -
    .col-xs-6 .col-sm-3
    -
    .col-xs-6 .col-sm-3
    -
    -{% endhighlight %} -

    In addition to column clearing at responsive breakpoints, you may need to reset offsets, pushes, or pulls. See this in action in the grid example.

    -{% highlight html %} -
    -
    .col-sm-5 .col-md-6
    -
    .col-sm-5 .col-sm-offset-2 .col-md-6 .col-md-offset-0
    -
    - -
    -
    .col-sm-6 .col-md-5 .col-lg-6
    -
    .col-sm-6 .col-md-5 .col-md-offset-2 .col-lg-6 .col-lg-offset-0
    -
    -{% endhighlight %} - - -

    Offsetting columns

    -

    Move columns to the right using .col-md-offset-* classes. These classes increase the left margin of a column by * columns. For example, .col-md-offset-4 moves .col-md-4 over four columns.

    -
    -
    -
    .col-md-4
    -
    .col-md-4 .col-md-offset-4
    -
    -
    -
    .col-md-3 .col-md-offset-3
    -
    .col-md-3 .col-md-offset-3
    -
    -
    -
    .col-md-6 .col-md-offset-3
    -
    -
    -{% highlight html %} -
    -
    .col-md-4
    -
    .col-md-4 .col-md-offset-4
    -
    -
    -
    .col-md-3 .col-md-offset-3
    -
    .col-md-3 .col-md-offset-3
    -
    -
    -
    .col-md-6 .col-md-offset-3
    -
    -{% endhighlight %} - - -

    Nesting columns

    -

    To nest your content with the default grid, add a new .row and set of .col-md-* columns within an existing .col-md-* column. Nested rows should include a set of columns that add up to 12 or less.

    -
    -
    - Level 1: .col-md-9 -
    -
    - Level 2: .col-md-6 -
    -
    - Level 2: .col-md-6 -
    -
    -
    -
    -{% highlight html %} -
    -
    - Level 1: .col-md-9 -
    -
    - Level 2: .col-md-6 -
    -
    - Level 2: .col-md-6 -
    -
    -
    -
    -{% endhighlight %} - -

    Column ordering

    -

    Easily change the order of our built-in grid columns with .col-md-push-* and .col-md-pull-* modifier classes.

    -
    -
    .col-md-9 .col-md-push-3
    -
    .col-md-3 .col-md-pull-9
    -
    - -{% highlight html %} -
    -
    .col-md-9 .col-md-push-3
    -
    .col-md-3 .col-md-pull-9
    -
    -{% endhighlight %} - -

    Less mixins and variables

    -

    In addition to prebuilt grid classes for fast layouts, Bootstrap includes Less variables and mixins for quickly generating your own simple, semantic layouts.

    - -

    Variables

    -

    Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below.

    -{% highlight scss %} -@grid-columns: 12; -@grid-gutter-width: 30px; -@grid-float-breakpoint: 768px; -{% endhighlight %} - -

    Mixins

    -

    Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns.

    -{% highlight scss %} -// Creates a wrapper for a series of columns -.make-row(@gutter: @grid-gutter-width) { - // Then clear the floated columns - .clearfix(); - - @media (min-width: @screen-sm-min) { - margin-left: (@gutter / -2); - margin-right: (@gutter / -2); - } - - // Negative margin nested rows out to align the content of columns - .row { - margin-left: (@gutter / -2); - margin-right: (@gutter / -2); - } -} - -// Generate the extra small columns -.make-xs-column(@columns; @gutter: @grid-gutter-width) { - position: relative; - // Prevent columns from collapsing when empty - min-height: 1px; - // Inner gutter via padding - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); - - // Calculate width based on number of columns available - @media (min-width: @grid-float-breakpoint) { - float: left; - width: percentage((@columns / @grid-columns)); - } -} - -// Generate the small columns -.make-sm-column(@columns; @gutter: @grid-gutter-width) { - position: relative; - // Prevent columns from collapsing when empty - min-height: 1px; - // Inner gutter via padding - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); - - // Calculate width based on number of columns available - @media (min-width: @screen-sm-min) { - float: left; - width: percentage((@columns / @grid-columns)); - } -} - -// Generate the small column offsets -.make-sm-column-offset(@columns) { - @media (min-width: @screen-sm-min) { - margin-left: percentage((@columns / @grid-columns)); - } -} -.make-sm-column-push(@columns) { - @media (min-width: @screen-sm-min) { - left: percentage((@columns / @grid-columns)); - } -} -.make-sm-column-pull(@columns) { - @media (min-width: @screen-sm-min) { - right: percentage((@columns / @grid-columns)); - } -} - -// Generate the medium columns -.make-md-column(@columns; @gutter: @grid-gutter-width) { - position: relative; - // Prevent columns from collapsing when empty - min-height: 1px; - // Inner gutter via padding - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); - - // Calculate width based on number of columns available - @media (min-width: @screen-md-min) { - float: left; - width: percentage((@columns / @grid-columns)); - } -} - -// Generate the medium column offsets -.make-md-column-offset(@columns) { - @media (min-width: @screen-md-min) { - margin-left: percentage((@columns / @grid-columns)); - } -} -.make-md-column-push(@columns) { - @media (min-width: @screen-md-min) { - left: percentage((@columns / @grid-columns)); - } -} -.make-md-column-pull(@columns) { - @media (min-width: @screen-md-min) { - right: percentage((@columns / @grid-columns)); - } -} - -// Generate the large columns -.make-lg-column(@columns; @gutter: @grid-gutter-width) { - position: relative; - // Prevent columns from collapsing when empty - min-height: 1px; - // Inner gutter via padding - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); - - // Calculate width based on number of columns available - @media (min-width: @screen-lg-min) { - float: left; - width: percentage((@columns / @grid-columns)); - } -} - -// Generate the large column offsets -.make-lg-column-offset(@columns) { - @media (min-width: @screen-lg-min) { - margin-left: percentage((@columns / @grid-columns)); - } -} -.make-lg-column-push(@columns) { - @media (min-width: @screen-lg-min) { - left: percentage((@columns / @grid-columns)); - } -} -.make-lg-column-pull(@columns) { - @media (min-width: @screen-lg-min) { - right: percentage((@columns / @grid-columns)); - } -} -{% endhighlight %} - -

    Example usage

    -

    You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between.

    -{% highlight scss %} -.wrapper { - .make-row(); -} -.content-main { - .make-lg-column(8); -} -.content-secondary { - .make-lg-column(3); - .make-lg-column-offset(1); -} -{% endhighlight %} -{% highlight html %} -
    -
    ...
    -
    ...
    -
    -{% endhighlight %} -
    - - - - -
    -

    Typography

    - - -

    Headings

    -

    All HTML headings, <h1> through <h6>, are available. .h1 through .h6 classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    h1. Bootstrap heading

    Semibold 36px

    h2. Bootstrap heading

    Semibold 30px

    h3. Bootstrap heading

    Semibold 24px

    h4. Bootstrap heading

    Semibold 18px
    h5. Bootstrap heading
    Semibold 14px
    h6. Bootstrap heading
    Semibold 12px
    -
    -{% highlight html %} -

    h1. Bootstrap heading

    -

    h2. Bootstrap heading

    -

    h3. Bootstrap heading

    -

    h4. Bootstrap heading

    -
    h5. Bootstrap heading
    -
    h6. Bootstrap heading
    -{% endhighlight %} - -

    Create lighter, secondary text in any heading with a generic <small> tag or the .small class.

    -
    - - - - - - - - - - - - - - - - - - - - - -

    h1. Bootstrap heading Secondary text

    h2. Bootstrap heading Secondary text

    h3. Bootstrap heading Secondary text

    h4. Bootstrap heading Secondary text

    h5. Bootstrap heading Secondary text
    h6. Bootstrap heading Secondary text
    -
    -{% highlight html %} -

    h1. Bootstrap heading Secondary text

    -

    h2. Bootstrap heading Secondary text

    -

    h3. Bootstrap heading Secondary text

    -

    h4. Bootstrap heading Secondary text

    -
    h5. Bootstrap heading Secondary text
    -
    h6. Bootstrap heading Secondary text
    -{% endhighlight %} - - - -

    Body copy

    -

    Bootstrap's global default font-size is 14px, with a line-height of 1.428. This is applied to the <body> and all paragraphs. In addition, <p> (paragraphs) receive a bottom margin of half their computed line-height (10px by default).

    -
    -

    Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

    -

    Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

    -

    Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

    -
    -{% highlight html %} -

    ...

    -{% endhighlight %} - - -

    Lead body copy

    -

    Make a paragraph stand out by adding .lead.

    -
    -

    Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

    -
    -{% highlight html %} -

    ...

    -{% endhighlight %} - - -

    Built with Less

    -

    The typographic scale is based on two Less variables in variables.less: @font-size-base and @line-height-base. The first is the base font-size used throughout and the second is the base line-height. We use those variables and some simple math to create the margins, paddings, and line-heights of all our type and more. Customize them and Bootstrap adapts.

    - - -

    Inline text elements

    -

    Marked text

    -

    For indicating blocks of text that have been deleted use the <mark> tag.

    -
    -

    You can use the mark tag to highlight text.

    -
    -{% highlight html %} -This line of text is meant to be treated as deleted text. -{% endhighlight %} - - -

    Deleted text

    -

    For indicating blocks of text that have been deleted use the <del> tag.

    -
    -

    This line of text is meant to be treated as deleted text.

    -
    -{% highlight html %} -This line of text is meant to be treated as deleted text. -{% endhighlight %} - -

    Strikethrough text

    -

    For indicating blocks of text that are no longer relevant use the <s> tag.

    -
    -

    This line of text is meant to be treated as no longer accurate.

    -
    -{% highlight html %} -This line of text is meant to be treated as no longer accurate. -{% endhighlight %} - -

    Inserted text

    -

    For indicating additions to the document use the <ins> tag.

    -
    -

    This line of text is meant to be treated as an addition to the document.

    -
    -{% highlight html %} -This line of text is meant to be treated as an addition to the document. -{% endhighlight %} - -

    Underlined text

    -

    To underline text use the <u> tag.

    -
    -

    This line of text is will render as underlined

    -
    -{% highlight html %} -This line of text is will render as underlined -{% endhighlight %} - -

    Make use of HTML's default emphasis tags with lightweight styles.

    - -

    Small text

    -

    For de-emphasizing inline or blocks of text, use the <small> tag to set text at 85% the size of the parent. Heading elements receive their own font-size for nested <small> elements.

    -

    You may alternatively use an inline element with .small in place of any <small>.

    -
    -

    This line of text is meant to be treated as fine print.

    -
    -{% highlight html %} -This line of text is meant to be treated as fine print. -{% endhighlight %} - - -

    Bold

    -

    For emphasizing a snippet of text with a heavier font-weight.

    -
    -

    The following snippet of text is rendered as bold text.

    -
    -{% highlight html %} -rendered as bold text -{% endhighlight %} - -

    Italics

    -

    For emphasizing a snippet of text with italics.

    -
    -

    The following snippet of text is rendered as italicized text.

    -
    -{% highlight html %} -rendered as italicized text -{% endhighlight %} - -
    -

    Alternate elements

    -

    Feel free to use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.

    -
    - -

    Alignment classes

    -

    Easily realign text to components with text alignment classes.

    -
    -

    Left aligned text.

    -

    Center aligned text.

    -

    Right aligned text.

    -

    Justified text.

    -
    -{% highlight html %} -

    Left aligned text.

    -

    Center aligned text.

    -

    Right aligned text.

    -

    Justified text.

    -{% endhighlight %} - - - -

    Abbreviations

    -

    Stylized implementation of HTML's <abbr> element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a title attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover.

    - -

    Basic abbreviation

    -

    For expanded text on long hover of an abbreviation, include the title attribute with the <abbr> element.

    -
    -

    An abbreviation of the word attribute is attr.

    -
    -{% highlight html %} -attr -{% endhighlight %} - -

    Initialism

    -

    Add .initialism to an abbreviation for a slightly smaller font-size.

    -
    -

    HTML is the best thing since sliced bread.

    -
    -{% highlight html %} -HTML -{% endhighlight %} - - - -

    Addresses

    -

    Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with <br>.

    -
    -
    - Twitter, Inc.
    - 795 Folsom Ave, Suite 600
    - San Francisco, CA 94107
    - P: (123) 456-7890 -
    -
    - Full Name
    - first.last@example.com -
    -
    -{% highlight html %} -
    - Twitter, Inc.
    - 795 Folsom Ave, Suite 600
    - San Francisco, CA 94107
    - P: (123) 456-7890 -
    - -
    - Full Name
    - first.last@example.com -
    -{% endhighlight %} - - - -

    Blockquotes

    -

    For quoting blocks of content from another source within your document.

    - -

    Default blockquote

    -

    Wrap <blockquote> around any HTML as the quote. For straight quotes, we recommend a <p>.

    -
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    -
    -
    -{% highlight html %} -
    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    -
    -{% endhighlight %} - -

    Blockquote options

    -

    Style and content changes for simple variations on a standard <blockquote>.

    - -

    Naming a source

    -

    Add a <footer> for identifying the source. Wrap the name of the source work in <cite>.

    -
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    -
    Someone famous in Source Title
    -
    -
    -{% highlight html %} -
    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    -
    Someone famous in Source Title
    -
    -{% endhighlight %} - -

    Alternate displays

    -

    Add .blockquote-reverse for a blockquote with right-aligned content.

    -
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

    -
    Someone famous in Source Title
    -
    -
    -{% highlight html %} -
    - ... -
    -{% endhighlight %} - - - -

    Lists

    - -

    Unordered

    -

    A list of items in which the order does not explicitly matter.

    -
    -
      -
    • Lorem ipsum dolor sit amet
    • -
    • Consectetur adipiscing elit
    • -
    • Integer molestie lorem at massa
    • -
    • Facilisis in pretium nisl aliquet
    • -
    • Nulla volutpat aliquam velit -
        -
      • Phasellus iaculis neque
      • -
      • Purus sodales ultricies
      • -
      • Vestibulum laoreet porttitor sem
      • -
      • Ac tristique libero volutpat at
      • -
      -
    • -
    • Faucibus porta lacus fringilla vel
    • -
    • Aenean sit amet erat nunc
    • -
    • Eget porttitor lorem
    • -
    -
    -{% highlight html %} -
      -
    • ...
    • -
    -{% endhighlight %} - -

    Ordered

    -

    A list of items in which the order does explicitly matter.

    -
    -
      -
    1. Lorem ipsum dolor sit amet
    2. -
    3. Consectetur adipiscing elit
    4. -
    5. Integer molestie lorem at massa
    6. -
    7. Facilisis in pretium nisl aliquet
    8. -
    9. Nulla volutpat aliquam velit
    10. -
    11. Faucibus porta lacus fringilla vel
    12. -
    13. Aenean sit amet erat nunc
    14. -
    15. Eget porttitor lorem
    16. -
    -
    -{% highlight html %} -
      -
    1. ...
    2. -
    -{% endhighlight %} - -

    Unstyled

    -

    Remove the default list-style and left margin on list items (immediate children only). This only applies to immediate children list items, meaning you will need to add the class for any nested lists as well.

    -
    -
      -
    • Lorem ipsum dolor sit amet
    • -
    • Consectetur adipiscing elit
    • -
    • Integer molestie lorem at massa
    • -
    • Facilisis in pretium nisl aliquet
    • -
    • Nulla volutpat aliquam velit -
        -
      • Phasellus iaculis neque
      • -
      • Purus sodales ultricies
      • -
      • Vestibulum laoreet porttitor sem
      • -
      • Ac tristique libero volutpat at
      • -
      -
    • -
    • Faucibus porta lacus fringilla vel
    • -
    • Aenean sit amet erat nunc
    • -
    • Eget porttitor lorem
    • -
    -
    -{% highlight html %} -
      -
    • ...
    • -
    -{% endhighlight %} - -

    Inline

    -

    Place all list items on a single line with display: inline-block; and some light padding.

    -
    -
      -
    • Lorem ipsum
    • -
    • Phasellus iaculis
    • -
    • Nulla volutpat
    • -
    -
    -{% highlight html %} -
      -
    • ...
    • -
    -{% endhighlight %} - -

    Description

    -

    A list of terms with their associated descriptions.

    -
    -
    -
    Description lists
    -
    A description list is perfect for defining terms.
    -
    Euismod
    -
    Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
    -
    Donec id elit non mi porta gravida at eget metus.
    -
    Malesuada porta
    -
    Etiam porta sem malesuada magna mollis euismod.
    -
    -
    -{% highlight html %} -
    -
    ...
    -
    ...
    -
    -{% endhighlight %} - -

    Horizontal description

    -

    Make terms and descriptions in <dl> line up side-by-side. Starts off stacked like default <dl>s, but when the navbar expands, so do these.

    -
    -
    -
    Description lists
    -
    A description list is perfect for defining terms.
    -
    Euismod
    -
    Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
    -
    Donec id elit non mi porta gravida at eget metus.
    -
    Malesuada porta
    -
    Etiam porta sem malesuada magna mollis euismod.
    -
    Felis euismod semper eget lacinia
    -
    Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
    -
    -
    -{% highlight html %} -
    -
    ...
    -
    ...
    -
    -{% endhighlight %} - -
    -

    Auto-truncating

    -

    Horizontal description lists will truncate terms that are too long to fit in the left column with text-overflow. In narrower viewports, they will change to the default stacked layout.

    -
    -
    - - - - -
    -

    Code

    - -

    Inline

    -

    Wrap inline snippets of code with <code>.

    -
    - For example, <section> should be wrapped as inline. -
    -{% highlight html %} -For example, <section> should be wrapped as inline. -{% endhighlight %} - -

    User input

    -

    Use the <kbd> to indicate input that is typically entered via keyboard.

    -
    - To switch directories, type cd followed by the name of the directory. -
    -{% highlight html %} - To switch directories, type cd followed by the name of the directory. -{% endhighlight %} - -

    Basic block

    -

    Use <pre> for multiple lines of code. Be sure to escape any angle brackets in the code for proper rendering.

    -
    -
    <p>Sample text here...</p>
    -
    -{% highlight html %} -
    <p>Sample text here...</p>
    -{% endhighlight %} - -

    You may optionally add the .pre-scrollable class, which will set a max-height of 350px and provide a y-axis scrollbar.

    -

    Variables

    -

    For indicating variables use the <var> tag.

    -
    -

    y = mx + b

    - -
    -{% highlight html %} -y = mx + b -{% endhighlight %} - -

    Sample output

    -

    For indicating blocks sample output from a program use the <samp> tag.

    -
    -

    This text is meant to be treated as sample output from a computer program.

    -
    -{% highlight html %} -This text is meant to be treated as sample output from a computer program. -{% endhighlight %} -
    - - - - - -
    -

    Tables

    - -

    Basic example

    -

    For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    -
    -{% highlight html %} - - ... -
    -{% endhighlight %} - - -

    Striped rows

    -

    Use .table-striped to add zebra-striping to any table row within the <tbody>.

    -
    -

    Cross-browser compatibility

    -

    Striped tables are styled via the :nth-child CSS selector, which is not available in Internet Explorer 8.

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larrythe Bird@twitter
    -
    -{% highlight html %} - - ... -
    -{% endhighlight %} - - -

    Bordered table

    -

    Add .table-bordered for borders on all sides of the table and cells.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #First NameLast NameUsername
    1MarkOtto@mdo
    MarkOtto@TwBootstrap
    2JacobThornton@fat
    3Larry the Bird@twitter
    -
    -{% highlight html %} - - ... -
    -{% endhighlight %} - - -

    Hover rows

    -

    Add .table-hover to enable a hover state on table rows within a <tbody>.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larry the Bird@twitter
    -
    -{% highlight html %} - - ... -
    -{% endhighlight %} - - -

    Condensed table

    -

    Add .table-condensed to make tables more compact by cutting cell padding in half.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #First NameLast NameUsername
    1MarkOtto@mdo
    2JacobThornton@fat
    3Larry the Bird@twitter
    -
    -{% highlight html %} - - ... -
    -{% endhighlight %} - - -

    Contextual classes

    -

    Use contextual classes to color table rows or individual cells.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ClassDescription
    - .active - Applies the hover color to a particular row or cell
    - .success - Indicates a successful or positive action
    - .info - Indicates a neutral informative change or action
    - .warning - Indicates a warning that might need attention
    - .danger - Indicates a dangerous or potentially negative action
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #Column headingColumn headingColumn heading
    1Column contentColumn contentColumn content
    2Column contentColumn contentColumn content
    3Column contentColumn contentColumn content
    4Column contentColumn contentColumn content
    5Column contentColumn contentColumn content
    6Column contentColumn contentColumn content
    7Column contentColumn contentColumn content
    8Column contentColumn contentColumn content
    9Column contentColumn contentColumn content
    -
    -{% highlight html %} - -... -... -... -... -... - - - - ... - ... - ... - ... - ... - -{% endhighlight %} - - -

    Responsive tables

    -

    Create responsive tables by wrapping any .table in .table-responsive to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #Table headingTable headingTable headingTable headingTable headingTable heading
    1Table cellTable cellTable cellTable cellTable cellTable cell
    2Table cellTable cellTable cellTable cellTable cellTable cell
    3Table cellTable cellTable cellTable cellTable cellTable cell
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #Table headingTable headingTable headingTable headingTable headingTable heading
    1Table cellTable cellTable cellTable cellTable cellTable cell
    2Table cellTable cellTable cellTable cellTable cellTable cell
    3Table cellTable cellTable cellTable cellTable cellTable cell
    -
    -
    -{% highlight html %} -
    - - ... -
    -
    -{% endhighlight %} -
    - - - - -
    -

    Forms

    - -

    Basic example

    -

    Individual form controls automatically receive some global styling. All textual <input>, <textarea>, and <select> elements with .form-control are set to width: 100%; by default. Wrap labels and controls in .form-group for optimum spacing.

    -
    -
    -
    - - -
    -
    - - -
    -
    - - -

    Example block-level help text here.

    -
    -
    - -
    - -
    -
    -{% highlight html %} -
    -
    - - -
    -
    - - -
    -
    - - -

    Example block-level help text here.

    -
    -
    - -
    - -
    -{% endhighlight %} -
    -

    Don't mix form groups with input groups

    -

    Do not mix form groups directly with input groups. Instead, nest the input group inside of the form group.

    -
    - - -

    Inline form

    -

    Add .form-inline to your <form> for left-aligned and inline-block controls. This only applies to forms within viewports that are at least 768px wide.

    -
    -

    Requires custom widths

    -

    Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.

    -
    -
    -

    Always add labels

    -

    Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the .sr-only class.

    -
    -
    -
    -
    - - -
    -
    -
    -
    @
    - -
    -
    -
    - - -
    -
    - -
    - -
    -
    -{% highlight html %} -
    -
    - - -
    -
    - - -
    -
    - -
    - -
    -{% endhighlight %} - - -

    Horizontal form

    -

    Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding .form-horizontal to the form. Doing so changes .form-groups to behave as grid rows, so no need for .row.

    -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -{% highlight html %} -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -{% endhighlight %} - - -

    Supported controls

    -

    Examples of standard form controls supported in an example form layout.

    - -

    Inputs

    -

    Most common form control, text-based input fields. Includes support for all HTML5 types: text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.

    -
    -

    Type declaration required

    -

    Inputs will only be fully styled if their type is properly declared.

    -
    -
    -
    - -
    -
    -{% highlight html %} - -{% endhighlight %} -
    -

    Input groups

    -

    To add integrated text or buttons before and/or after any text-based <input>, check out the input group component.

    -
    - -

    Textarea

    -

    Form control which supports multiple lines of text. Change rows attribute as necessary.

    -
    -
    - -
    -
    -{% highlight html %} - -{% endhighlight %} - -

    Checkboxes and radios

    -

    Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.

    -

    Default (stacked)

    -
    -
    -
    - -
    -
    -
    - -
    -
    - -
    -
    -
    -{% highlight html %} -
    - -
    - -
    - -
    -
    - -
    -{% endhighlight %} - -

    Inline checkboxes

    -

    Use the .checkbox-inline or .radio-inline classes on a series of checkboxes or radios for controls that appear on the same line.

    -
    -
    - - - -
    -
    -{% highlight html %} - - - -{% endhighlight %} - -

    Selects

    -

    Use the default option, or add multiple to show multiple options at once.

    -
    -
    - -
    - -
    -
    -{% highlight html %} - - - -{% endhighlight %} - - -

    Static control

    -

    When you need to place plain text next to a form label within a horizontal form, use the .form-control-static class on a <p>.

    -
    -
    -
    - -
    -

    email@example.com

    -
    -
    -
    - -
    - -
    -
    -
    -
    -{% highlight html %} -
    -
    - -
    -

    email@example.com

    -
    -
    -
    - -
    - -
    -
    -
    -{% endhighlight %} - -

    Input focus

    -

    We remove the default outline styles on some form controls and apply a box-shadow in its place for :focus.

    -
    -
    - -
    -
    -
    -

    Demo :focus state

    -

    The above example input uses custom styles in our documentation to demonstrate the :focus state on a .form-control.

    -
    - - -

    Disabled inputs

    -

    Add the disabled boolean attribute on an input to prevent user input and trigger a slightly different look.

    -
    -
    - -
    -
    -{% highlight html %} - -{% endhighlight %} - -

    Disabled fieldsets

    -

    Add the disabled attribute to a <fieldset> to disable all the controls within the <fieldset> at once.

    - -
    -

    Caveat about link functionality of <a>

    -

    Our styles use pointer-events: none to try to disable the link functionality of <a class="btn btn-*"> buttons in this case, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. So to be safe, use custom JavaScript to disable such links.

    -
    - -
    -

    Cross-browser compatibility

    -

    While Bootstrap will apply these styles in all browsers, Internet Explorer 9 and below don't actually support the disabled attribute on a <fieldset>. Use custom JavaScript to disable the fieldset in these browsers.

    -
    - -
    -
    -
    -
    - - -
    -
    - - -
    -
    - -
    - -
    -
    -
    -{% highlight html %} -
    -
    -
    - - -
    -
    - - -
    -
    - -
    - -
    -
    -{% endhighlight %} - - -

    Readonly inputs

    -

    Add the readonly boolean attribute on an input to prevent user input and style the input as disabled.

    -
    -
    - -
    -
    -{% highlight html %} - -{% endhighlight %} - - -

    Validation states

    -

    Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add .has-warning, .has-error, or .has-success to the parent element. Any .control-label, .form-control, and .help-block within that element will receive the validation styles.

    - -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -{% highlight html %} -
    - - -
    -
    - - -
    -
    - - -
    -{% endhighlight %} - -

    With optional icons

    -

    You can also add optional feedback icons with the addition of .has-feedback and the right icon.

    -
    -

    Icons, labels, and input groups

    -

    Manual positioning of feedback icons is required for inputs without a label and for input groups with an add-on on the right. For inputs without labels, adjust the topvalue. For input groups, adjust the right value to an appropriate pixel value depending on the width of your addon.

    -
    -
    -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    -
    -{% highlight html %} -
    - - - -
    -
    - - - -
    -
    - - - -
    -{% endhighlight %} - -

    Optional icons also work on horizontal and inline forms.

    -
    -
    -
    - -
    - - -
    -
    -
    -
    -{% highlight html %} -
    -
    - -
    - - -
    -
    -
    -{% endhighlight %} - -
    -
    -
    - - - -
    -
    -
    -{% highlight html %} -
    -
    - - - -
    -
    -{% endhighlight %} - - -

    Control sizing

    -

    Set heights using classes like .input-lg, and set widths using grid column classes like .col-lg-*.

    - -

    Height sizing

    -

    Create taller or shorter form controls that match button sizes.

    -
    -
    -
    - - - - - - - -
    -
    -
    -{% highlight html %} - - - - - - - -{% endhighlight %} - -

    Column sizing

    -

    Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.

    -
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    -{% highlight html %} -
    -
    - -
    -
    - -
    -
    - -
    -
    -{% endhighlight %} - -

    Help text

    -

    Block level help text for form controls.

    -
    -
    - - A block of help text that breaks onto a new line and may extend beyond one line. -
    -
    -{% highlight html %} -A block of help text that breaks onto a new line and may extend beyond one line. -{% endhighlight %} -
    - - - - -
    -

    Buttons

    - -

    Options

    -

    Use any of the available button classes to quickly create a styled button.

    -
    - - - - - - - -
    -{% highlight html %} - - - - - - - - - - - - - - - - - - - - -{% endhighlight %} - -

    Sizes

    -

    Fancy larger or smaller buttons? Add .btn-lg, .btn-sm, or .btn-xs for additional sizes.

    -
    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -
    -{% highlight html %} -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -{% endhighlight %} - -

    Create block level buttons—those that span the full width of a parent— by adding .btn-block.

    -
    -
    - - -
    -
    -{% highlight html %} - - -{% endhighlight %} - - -

    Active state

    -

    Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <button> elements, this is done via :active. For <a> elements, it's done with .active. However, you may use .active on <button>s should you need to replicate the active state progammatically.

    - -

    Button element

    -

    No need to add :active as it's a pseudo-class, but if you need to force the same appearance, go ahead and add .active.

    -

    - - -

    -{% highlight html %} - - -{% endhighlight %} - -

    Anchor element

    -

    Add the .active class to <a> buttons.

    -

    - Primary link - Link -

    -{% highlight html %} -Primary link -Link -{% endhighlight %} - - -

    Disabled state

    -

    Make buttons look unclickable by fading them back 50%.

    - -

    Button element

    -

    Add the disabled attribute to <button> buttons.

    -

    - - -

    -{% highlight html %} - - -{% endhighlight %} - -
    -

    Cross-browser compatibility

    -

    If you add the disabled attribute to a <button>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.

    -
    - -

    Anchor element

    -

    Add the .disabled class to <a> buttons.

    -

    - Primary link - Link -

    -{% highlight html %} -Primary link -Link -{% endhighlight %} -

    - We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. -

    -
    -

    Link functionality caveat

    -

    This class uses pointer-events: none to try to disable the link functionality of <a>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. So to be safe, use custom JavaScript to disable such links.

    -
    -
    -

    Context-specific usage

    -

    While button classes can be used on <a> and <button> elements, only <button> elements are supported within our nav and navbar components.

    -
    - - -

    Button tags

    -

    Use the button classes on an <a>, <button>, or <input> element.

    -
    - Link - - - -
    -{% highlight html %} -Link - - - -{% endhighlight %} - -
    -

    Cross-browser rendering

    -

    As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

    -

    Among other things, there's a Firefox bug that prevents us from setting the line-height of <input>-based buttons, causing them to not exactly match the height of other buttons on Firefox.

    -
    -
    - - - - -
    -

    Images

    - -

    Responsive images

    -

    Images in Bootstrap 3 can be made responsive-friendly via the addition of the .img-responsive class. This applies max-width: 100%; and height: auto; to the image so that it scales nicely to the parent element.

    -{% highlight html %} -Responsive image -{% endhighlight %} - -

    Image shapes

    -

    Add classes to an <img> element to easily style images in any project.

    -
    -

    Cross-browser compatibility

    -

    Keep in mind that Internet Explorer 8 lacks support for rounded corners.

    -
    -
    - A generic square placeholder image with rounded corners - A generic square placeholder image where only the portion within the circle circumscribed about said square is visible - A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera -
    -{% highlight html %} -... -... -... -{% endhighlight %} -
    - - - - -
    -

    Helper classes

    - -

    Contextual colors

    -

    Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles.

    -
    -

    Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

    -

    Nullam id dolor id nibh ultricies vehicula ut id elit.

    -

    Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

    -

    Maecenas sed diam eget risus varius blandit sit amet non magna.

    -

    Etiam porta sem malesuada magna mollis euismod.

    -

    Donec ullamcorper nulla non metus auctor fringilla.

    -
    -{% highlight html %} -

    ...

    -

    ...

    -

    ...

    -

    ...

    -

    ...

    -

    ...

    -{% endhighlight %} -
    -

    Dealing with specificity

    -

    Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <span> with the class.

    -
    - -

    Contextual backgrounds

    -

    Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes.

    -
    -

    Nullam id dolor id nibh ultricies vehicula ut id elit.

    -

    Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

    -

    Maecenas sed diam eget risus varius blandit sit amet non magna.

    -

    Etiam porta sem malesuada magna mollis euismod.

    -

    Donec ullamcorper nulla non metus auctor fringilla.

    -
    -{% highlight html %} -

    ...

    -

    ...

    -

    ...

    -

    ...

    -

    ...

    -{% endhighlight %} - - -

    Close icon

    -

    Use the generic close icon for dismissing content like modals and alerts.

    -
    -

    -
    -{% highlight html %} - -{% endhighlight %} - - -

    Carets

    -

    Use carets to indicate dropdown functionality and direction. Note that the default caret will reverse automatically in dropup menus.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - -

    Quick floats

    -

    Float an element to the left or right with a class. !important is included to avoid specificity issues. Classes can also be used as mixins.

    -{% highlight html %} -
    ...
    -
    ...
    -{% endhighlight %} -{% highlight scss %} -// Classes -.pull-left { - float: left !important; -} -.pull-right { - float: right !important; -} - -// Usage as mixins -.element { - .pull-left(); -} -.another-element { - .pull-right(); -} -{% endhighlight %} - -
    -

    Not for use in navbars

    -

    To align components in navbars with utility classes, use .navbar-left or .navbar-right instead. See the navbar docs for details.

    -
    - - -

    Center content blocks

    -

    Set an element to display: block and center via margin. Available as a mixin and class.

    -{% highlight html %} -
    ...
    -{% endhighlight %} -{% highlight scss %} -// Classes -.center-block { - display: block; - margin-left: auto; - margin-right: auto; -} - -// Usage as mixins -.element { - .center-block(); -} -{% endhighlight %} - - -

    Clearfix

    -

    Clear the float on any element with the .clearfix class. Utilizes the micro clearfix as popularized by Nicolas Gallagher. Can also be used as a mixin.

    -{% highlight html %} - -
    ...
    -{% endhighlight %} -{% highlight scss %} -// Mixin itself -.clearfix() { - &:before, - &:after { - content: " "; - display: table; - } - &:after { - clear: both; - } -} - -// Usage as a Mixin -.element { - .clearfix(); -} -{% endhighlight %} - - -

    Showing and hiding content

    -

    Force an element to be shown or hidden (including for screen readers) with the use of .show and .hidden classes. These classes use !important to avoid specificity conflicts, just like the quick floats. They are only available for block level toggling. They can also be used as mixins.

    -

    .hide is available, but it does not always affect screen readers and is deprecated as of v3.0.1. Use .hidden or .sr-only instead.

    -

    Furthermore, .invisible can be used to toggle only the visibility of an element, meaning its display is not modified and the element can still affect the flow of the document.

    -{% highlight html %} -
    ...
    - -{% endhighlight %} -{% highlight scss %} -// Classes -.show { - display: block !important; -} -.hidden { - display: none !important; - visibility: hidden !important; -} -.invisible { - visibility: hidden; -} - -// Usage as mixins -.element { - .show(); -} -.another-element { - .hidden(); -} -{% endhighlight %} - - -

    Screen reader and keyboard navigation content

    -

    Hide an element to all devices except screen readers with .sr-only. Combine .sr-only with .sr-only-focusable to show the element again when it's focused (e.g. by a keyboard-only user). Necessary for following accessibility best practices. Can also be used as mixins.

    -{% highlight html %} -Skip to main content -{% endhighlight %} -{% highlight scss %} -// Usage as a Mixin -.skip-navigation { - .sr-only(); - .sr-only-focusable(); -} -{% endhighlight %} - - -

    Image replacement

    -

    Utilize the .text-hide class or mixin to help replace an element's text content with a background image.

    -{% highlight html %} -

    Custom heading

    -{% endhighlight %} - {% highlight scss %} -// Usage as a Mixin -.heading { - .text-hide(); -} -{% endhighlight %} -
    - - - - -
    -

    Responsive utilities

    - -

    For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.

    -

    Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.

    - - -

    Available classes

    -

    Use a single or combination of the available classes for toggling content across viewport breakpoints.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Extra small devices - Phones (<768px) - - Small devices - Tablets (≥768px) - - Medium devices - Desktops (≥992px) - - Large devices - Desktops (≥1200px) -
    .visible-xs-*Visible
    .visible-sm-*Visible
    .visible-md-*Visible
    .visible-lg-*Visible
    .hidden-xsVisibleVisibleVisible
    .hidden-smVisibleVisibleVisible
    .hidden-mdVisibleVisibleVisible
    .hidden-lgVisibleVisibleVisible
    -
    - -

    As of v3.2, the .visible-*-* classes for each breakpoint come in three variations, one for each CSS display property value listed below.

    -
    - - - - - - - - - - - - - - - - - - - - - -
    Group of classesCSS display
    .visible-*-blockdisplay: block;
    .visible-*-inlinedisplay: inline;
    .visible-*-inline-blockdisplay: inline-block;
    -
    -

    So, for extra small (xs) screens for example, the available .visible-*-* classes are: .visible-xs-block, .visible-xs-inline, and .visible-xs-inline-block.

    -

    The classes .visible-xs, .visible-sm, .visible-md, and .visible-lg also exist, but are deprecated as of v3.2. They are approximately equivalent to .visible-*-block, except with additional special cases for toggling <table>-related elements.

    - -

    Print classes

    -

    Similar to the regular responsive classes, use these for toggling content for print.

    -
    - - - - - - - - - - - - - - - - - - - - -
    ClassesBrowserPrint
    - .visible-print-block
    - .visible-print-inline
    - .visible-print-inline-block -
    Visible
    .hidden-printVisible
    -
    -

    The class .visible-print also exists but is deprecated as of v3.1.0. It is approximately equivalent to .visible-print-block, except with additional special cases for <table>-related elements.

    - - -

    Test cases

    -

    Resize your browser or load on different devices to test the responsive utility classes.

    - -

    Visible on...

    -

    Green checkmarks indicate the element is visible in your current viewport.

    -
    -
    - - ✔ Visible on x-small -
    -
    - - ✔ Visible on small -
    -
    -
    - Medium - ✔ Visible on medium -
    -
    - - ✔ Visible on large -
    -
    -
    -
    - - ✔ Visible on x-small and small -
    -
    - - ✔ Visible on medium and large -
    -
    -
    - - ✔ Visible on x-small and medium -
    -
    - - ✔ Visible on small and large -
    -
    -
    - - ✔ Visible on x-small and large -
    -
    - - ✔ Visible on small and medium -
    -
    - -

    Hidden on...

    -

    Here, green checkmarks also indicate the element is hidden in your current viewport.

    -
    -
    - - ✔ Hidden on x-small -
    -
    - - ✔ Hidden on small -
    -
    -
    - Medium - ✔ Hidden on medium -
    -
    - - ✔ Hidden on large -
    -
    -
    -
    - - ✔ Hidden on x-small and small -
    -
    - - ✔ Hidden on medium and large -
    -
    -
    - - ✔ Hidden on x-small and medium -
    -
    - - ✔ Hidden on small and large -
    -
    -
    - - ✔ Hidden on x-small and large -
    -
    - - ✔ Hidden on small and medium -
    -
    -
    - - - - -
    -

    Using Less

    - -

    Bootstrap's CSS is built on Less, a preprocessor with additional functionality like variables, mixins, and functions for compiling CSS. Those looking to use the source Less files instead of our compiled CSS files can make use of the numerous variables and mixins we use throughout the framework.

    - -

    Grid variables and mixins are covered within the Grid system section.

    - - -

    Compiling Bootstrap

    -

    Bootstrap can be used in at least two ways: with the compiled CSS or with the source Less files. To compile the Less files, visit the README for how to setup your development environment to run the necessary commands.

    -

    Third party compilation tools may work with Bootstrap, but they are not supported by our core team.

    - -

    Variables

    -

    Variables are used throughout the entire project as a way to centralize and share commonly used values like colors, spacing, or font stacks. For a complete breakdown, please see the Customizer.

    - -

    Colors

    -

    Easily make use of two color schemes: grayscale and semantic. Grayscale colors provide quick access to commonly used shades of black while semantic include various colors assigned to meaningful contextual values.

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -{% highlight scss %} -@gray-darker: lighten(#000, 13.5%); // #222 -@gray-dark: lighten(#000, 20%); // #333 -@gray: lighten(#000, 33.5%); // #555 -@gray-light: lighten(#000, 60%); // #999 -@gray-lighter: lighten(#000, 93.5%); // #eee -{% endhighlight %} - -
    -
    -
    -
    -
    -
    -
    -
    -
    -{% highlight scss %} -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; -{% endhighlight %} - -

    Use any of these color variables as they are or reassign them to more meaningful variables for your project.

    -{% highlight scss %} -// Use as-is -.masthead { - background-color: @brand-primary; -} - -// Reassigned variables in Less -@alert-message-background: @brand-info; -.alert { - background-color: @alert-message-background; -} -{% endhighlight %} - -

    Scaffolding

    -

    A handful of variables for quickly customizing key elements of your site's skeleton.

    -{% highlight scss %} -// Scaffolding -@body-bg: #fff; -@text-color: @black-50; -{% endhighlight %} - - -

    Easily style your links with the right color with only one value.

    -{% highlight scss %} -// Variables -@link-color: @brand-primary; -@link-color-hover: darken(@link-color, 15%); - -// Usage -a { - color: @link-color; - text-decoration: none; - - &:hover { - color: @link-color-hover; - text-decoration: underline; - } -} -{% endhighlight %} -

    Note that the @link-color-hover uses a function, another awesome tool from Less, to automagically create the right hover color. You can use darken, lighten, saturate, and desaturate.

    - -

    Typography

    -

    Easily set your type face, text size, leading, and more with a few quick variables. Bootstrap makes use of these as well to provide easy typographic mixins.

    -{% highlight scss %} -@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; -@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace; -@font-family-base: @font-family-sans-serif; - -@font-size-base: 14px; -@font-size-large: ceil((@font-size-base * 1.25)); // ~18px -@font-size-small: ceil((@font-size-base * 0.85)); // ~12px - -@font-size-h1: floor((@font-size-base * 2.6)); // ~36px -@font-size-h2: floor((@font-size-base * 2.15)); // ~30px -@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px -@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px -@font-size-h5: @font-size-base; -@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px - -@line-height-base: 1.428571429; // 20/14 -@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px - -@headings-font-family: inherit; -@headings-font-weight: 500; -@headings-line-height: 1.1; -@headings-color: inherit; -{% endhighlight %} - -

    Icons

    -

    Two quick variables for customizing the location and filename of your icons.

    -{% highlight scss %} -@icon-font-path: "../fonts/"; -@icon-font-name: "glyphicons-halflings-regular"; -{% endhighlight %} - -

    Components

    -

    Components throughout Bootstrap make use of some default variables for setting common values. Here are the most commonly used.

    -{% highlight scss %} -@padding-base-vertical: 6px; -@padding-base-horizontal: 12px; - -@padding-large-vertical: 10px; -@padding-large-horizontal: 16px; - -@padding-small-vertical: 5px; -@padding-small-horizontal: 10px; - -@padding-xs-vertical: 1px; -@padding-xs-horizontal: 5px; - -@line-height-large: 1.33; -@line-height-small: 1.5; - -@border-radius-base: 4px; -@border-radius-large: 6px; -@border-radius-small: 3px; - -@component-active-color: #fff; -@component-active-bg: @brand-primary; - -@caret-width-base: 4px; -@caret-width-large: 5px; -{% endhighlight %} - - -

    Vendor mixins

    -

    Vendor mixins are mixins to help support multiple browsers by including all relevant vendor prefixes in your compiled CSS.

    - - -

    Box-sizing

    -

    Reset your components' box model with a single mixin. For context, see this helpful article from Mozilla.

    -

    The mixin is deprecated as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixin internally until Bootstrap v4.

    -{% highlight scss %} -.box-sizing(@box-model) { - -webkit-box-sizing: @box-model; // Safari <= 5 - -moz-box-sizing: @box-model; // Firefox <= 19 - box-sizing: @box-model; -} -{% endhighlight %} - -

    Rounded corners

    -

    Today all modern browsers support the non-prefixed border-radius property. As such, there is no .border-radius() mixin, but Bootstrap does include shortcuts for quickly rounding two corners on a particular side of an object.

    -{% highlight scss %} -.border-top-radius(@radius) { - border-top-right-radius: @radius; - border-top-left-radius: @radius; -} -.border-right-radius(@radius) { - border-bottom-right-radius: @radius; - border-top-right-radius: @radius; -} -.border-bottom-radius(@radius) { - border-bottom-right-radius: @radius; - border-bottom-left-radius: @radius; -} -.border-left-radius(@radius) { - border-bottom-left-radius: @radius; - border-top-left-radius: @radius; -} -{% endhighlight %} - -

    Box (Drop) shadows

    -

    If your target audience is using the latest and greatest browsers and devices, be sure to just use the box-shadow property on its own. If you need support for older Android (pre-v4) and iOS devices (pre-iOS 5), use the deprecated mixin to pick up the required -webkit prefix.

    -

    The mixin is deprecated as of v3.1.0, since Bootstrap doesn't officially support the outdated platforms that don't support the standard property. To preserve backwards-compatibility, Bootstrap will continue to use the mixin internally until Bootstrap v4.

    -

    Be sure to use rgba() colors in your box shadows so they blend as seamlessly as possible with backgrounds.

    -{% highlight scss %} -.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) { - -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1 - box-shadow: @shadow; -} -{% endhighlight %} - -

    Transitions

    -

    Multiple mixins for flexibility. Set all transition information with one, or specify a separate delay and duration as needed.

    -

    The mixins are deprecated as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.

    -{% highlight scss %} -.transition(@transition) { - -webkit-transition: @transition; - transition: @transition; -} -.transition-property(@transition-property) { - -webkit-transition-property: @transition-property; - transition-property: @transition-property; -} -.transition-delay(@transition-delay) { - -webkit-transition-delay: @transition-delay; - transition-delay: @transition-delay; -} -.transition-duration(@transition-duration) { - -webkit-transition-duration: @transition-duration; - transition-duration: @transition-duration; -} -.transition-timing-function(@timing-function) { - -webkit-transition-timing-function: @timing-function; - transition-timing-function: @timing-function; -} -.transition-transform(@transition) { - -webkit-transition: -webkit-transform @transition; - -moz-transition: -moz-transform @transition; - -o-transition: -o-transform @transition; - transition: transform @transition; -} -{% endhighlight %} - -

    Transformations

    -

    Rotate, scale, translate (move), or skew any object.

    -

    The mixins are deprecated as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.

    -{% highlight scss %} -.rotate(@degrees) { - -webkit-transform: rotate(@degrees); - -ms-transform: rotate(@degrees); // IE9 only - transform: rotate(@degrees); -} -.scale(@ratio; @ratio-y...) { - -webkit-transform: scale(@ratio, @ratio-y); - -ms-transform: scale(@ratio, @ratio-y); // IE9 only - transform: scale(@ratio, @ratio-y); -} -.translate(@x; @y) { - -webkit-transform: translate(@x, @y); - -ms-transform: translate(@x, @y); // IE9 only - transform: translate(@x, @y); -} -.skew(@x; @y) { - -webkit-transform: skew(@x, @y); - -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+ - transform: skew(@x, @y); -} -.translate3d(@x; @y; @z) { - -webkit-transform: translate3d(@x, @y, @z); - transform: translate3d(@x, @y, @z); -} - -.rotateX(@degrees) { - -webkit-transform: rotateX(@degrees); - -ms-transform: rotateX(@degrees); // IE9 only - transform: rotateX(@degrees); -} -.rotateY(@degrees) { - -webkit-transform: rotateY(@degrees); - -ms-transform: rotateY(@degrees); // IE9 only - transform: rotateY(@degrees); -} -.perspective(@perspective) { - -webkit-perspective: @perspective; - -moz-perspective: @perspective; - perspective: @perspective; -} -.perspective-origin(@perspective) { - -webkit-perspective-origin: @perspective; - -moz-perspective-origin: @perspective; - perspective-origin: @perspective; -} -.transform-origin(@origin) { - -webkit-transform-origin: @origin; - -moz-transform-origin: @origin; - -ms-transform-origin: @origin; // IE9 only - transform-origin: @origin; -} -{% endhighlight %} - -

    Animations

    -

    A single mixin for using all of CSS3's animation properties in one declaration and other mixins for individual properties.

    -

    The mixins are deprecated as of v3.2.0, with the introduction of autoprefixer. To preserve backwards-compatibility, Bootstrap will continue to use the mixins internally until Bootstrap v4.

    -{% highlight scss %} -.animation(@animation) { - -webkit-animation: @animation; - animation: @animation; -} -.animation-name(@name) { - -webkit-animation-name: @name; - animation-name: @name; -} -.animation-duration(@duration) { - -webkit-animation-duration: @duration; - animation-duration: @duration; -} -.animation-timing-function(@timing-function) { - -webkit-animation-timing-function: @timing-function; - animation-timing-function: @timing-function; -} -.animation-delay(@delay) { - -webkit-animation-delay: @delay; - animation-delay: @delay; -} -.animation-iteration-count(@iteration-count) { - -webkit-animation-iteration-count: @iteration-count; - animation-iteration-count: @iteration-count; -} -.animation-direction(@direction) { - -webkit-animation-direction: @direction; - animation-direction: @direction; -} -{% endhighlight %} - -

    Opacity

    -

    Set the opacity for all browsers and provide a filter fallback for IE8.

    -{% highlight scss %} -.opacity(@opacity) { - opacity: @opacity; - // IE8 filter - @opacity-ie: (@opacity * 100); - filter: ~"alpha(opacity=@{opacity-ie})"; -} -{% endhighlight %} - -

    Placeholder text

    -

    Provide context for form controls within each field.

    -{% highlight scss %} -.placeholder(@color: @input-color-placeholder) { - &::-moz-placeholder { color: @color; } // Firefox - &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ - &::-webkit-input-placeholder { color: @color; } // Safari and Chrome -} -{% endhighlight %} - -

    Columns

    -

    Generate columns via CSS within a single element.

    -{% highlight scss %} -.content-columns(@width; @count; @gap) { - -webkit-column-width: @width; - -moz-column-width: @width; - column-width: @width; - -webkit-column-count: @count; - -moz-column-count: @count; - column-count: @count; - -webkit-column-gap: @gap; - -moz-column-gap: @gap; - column-gap: @gap; -} -{% endhighlight %} - -

    Gradients

    -

    Easily turn any two colors into a background gradient. Get more advanced and set a direction, use three colors, or use a radial gradient. With a single mixin you get all the prefixed syntaxes you'll need.

    -{% highlight scss %} -#gradient > .vertical(#333; #000); -#gradient > .horizontal(#333; #000); -#gradient > .radial(#333; #000); -{% endhighlight %} -

    You can also specify the angle of a standard two-color, linear gradient:

    -{% highlight scss %} -#gradient > .directional(#333; #000; 45deg); -{% endhighlight %} -

    If you need a barber-stripe style gradient, that's easy, too. Just specify a single color and we'll overlay a translucent white stripe.

    -{% highlight scss %} -#gradient > .striped(#333; 45deg); -{% endhighlight %} -

    Up the ante and use three colors instead. Set the first color, the second color, the second color's color stop (a decimal value like 0.25), and the third color with these mixins:

    -{% highlight scss %} -#gradient > .vertical-three-colors(#777; #333; .25; #000); -#gradient > .horizontal-three-colors(#777; #333; .25; #000); -{% endhighlight %} -

    Heads up! Should you ever need to remove a gradient, be sure to remove any IE-specific filter you may have added. You can do that by using the .reset-filter() mixin alongside background-image: none;.

    - - -

    Utility mixins

    -

    Utility mixins are mixins that combine otherwise unrelated CSS properties to achieve a specific goal or task.

    - -

    Clearfix

    -

    Forget adding class="clearfix" to any element and instead add the .clearfix() mixin where appropriate. Uses the micro clearfix from Nicolas Gallager.

    -{% highlight scss %} -// Mixin -.clearfix() { - &:before, - &:after { - content: " "; - display: table; - } - &:after { - clear: both; - } -} - -// Usage -.container { - .clearfix(); -} -{% endhighlight %} - -

    Horizontal centering

    -

    Quickly center any element within its parent. Requires width or max-width to be set.

    -{% highlight scss %} -// Mixin -.center-block() { - display: block; - margin-left: auto; - margin-right: auto; -} - -// Usage -.container { - width: 940px; - .center-block(); -} -{% endhighlight %} - -

    Sizing helpers

    -

    Specify the dimensions of an object more easily.

    -{% highlight scss %} -// Mixins -.size(@width; @height) { - width: @width; - height: @height; -} -.square(@size) { - .size(@size; @size); -} - -// Usage -.image { .size(400px; 300px); } -.avatar { .square(48px); } -{% endhighlight %} - -

    Resizable textareas

    -

    Easily configure the resize options for any textarea, or any other element. Defaults to normal browser behavior (both).

    -{% highlight scss %} -.resizable(@direction: both) { - // Options: horizontal, vertical, both - resize: @direction; - // Safari fix - overflow: auto; -} -{% endhighlight %} - -

    Truncating text

    -

    Easily truncate text with an ellipsis with a single mixin. Requires element to be block or inline-block level.

    -{% highlight scss %} -// Mixin -.text-overflow() { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -// Usage -.branch-name { - display: inline-block; - max-width: 200px; - .text-overflow(); -} -{% endhighlight %} - -

    Retina images

    -

    Specify two image paths and the @1x image dimensions, and Bootstrap will provide an @2x media query. If you have many images to serve, consider writing your retina image CSS manually in a single media query.

    -{% highlight scss %} -.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { - background-image: url("@{file-1x}"); - - @media - only screen and (-webkit-min-device-pixel-ratio: 2), - only screen and ( min--moz-device-pixel-ratio: 2), - only screen and ( -o-min-device-pixel-ratio: 2/1), - only screen and ( min-device-pixel-ratio: 2), - only screen and ( min-resolution: 192dpi), - only screen and ( min-resolution: 2dppx) { - background-image: url("@{file-2x}"); - background-size: @width-1x @height-1x; - } -} - -// Usage -.jumbotron { - .img-retina("/img/bg-1x.png", "/img/bg-2x.png", 100px, 100px); -} -{% endhighlight %} -
    - - - - -
    -

    Using Sass

    -

    While Bootstrap is built on Less, it also has an official Sass port. We maintain it in a separate GitHub repository and handle updates with a conversion script.

    - -

    What's included

    -

    Since the Sass port has a separate repo and serves a slightly different audience, the contents of the project differ greatly from the main Bootstrap project. This ensures the Sass port is as compatible with as many Sass-based systems as possible.

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PathDescription
    lib/Ruby gem code (Sass configuration, Rails and Compass integrations)
    tasks/Converter scripts (turning upstream Less to Sass)
    test/Compilation tests
    templates/Compass package manifest
    vendor/assets/Sass, JavaScript, and font files
    RakefileInternal tasks, such as rake and convert
    -
    -

    Visit the Sass port's GitHub repository to see these files in action.

    - - -

    Installation

    -

    For information on how to install and use Bootstrap for Sass, consult the GitHub repository readme. It's the most up to date source and includes information for use with Rails, Compass, and standard Sass projects.

    -

    - Bootstrap for Sass -

    -
    - - - - -
    -

    RTL

    -

    As of Bootstrap 3.2, a right-to-left version of Bootstrap ships as part of the repository. It's powered by Twitter's CSS Flip project and is generated via our Gruntfile.

    - -

    How to use

    -

    Bootstrap is by default a left-to-right project. For right-to-left projects, you'll need to set your language and replace the default Bootstrap CSS with an RTL version. First, set your language and text direction:

    -{% highlight html %} - - -{% endhighlight %} -

    Then, include the right-to-left CSS file in place of the default Bootstrap CSS:

    -{% highlight html %} - - -{% endhighlight %} -

    Alternatively, you may use the minified RTL file, bootstrap-rtl.min.css.

    - -

    CSS Flip

    -

    CSS Flip is a project for converting left-to-right CSS files into right-to-left CSS files. We use it in our Gruntfile to automate the generation of Bootstrap's RTL CSS files.

    -
    +{% include css/overview.html %} +{% include css/grid.html %} +{% include css/type.html %} +{% include css/code.html %} +{% include css/tables.html %} +{% include css/forms.html %} +{% include css/buttons.html %} +{% include css/images.html %} +{% include css/helpers.html %} +{% include css/responsive-utilities.html %} +{% include css/less.html %} +{% include css/sass.html %} +{% include css/rtl.html %} diff --git a/docs/dist/js/bootstrap.min.js b/docs/dist/js/bootstrap.min.js index b94dd03cfb..11cb5363e4 100644 --- a/docs/dist/js/bootstrap.min.js +++ b/docs/dist/js/bootstrap.min.js @@ -3,4 +3,4 @@ * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(a){a&&a.target!=this.$element[0]||(this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse"))};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(a){a&&a.target!=this.$element[0]||(this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse"))};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle="collapse"][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e='[data-toggle="dropdown"]',f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(a){a&&a.target!=this.$element[0]||(this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse"))};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(a){a&&a.target!=this.$element[0]||(this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse"))};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle="collapse"][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e='[data-toggle="dropdown"]',f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight),d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/docs/getting-started.html b/docs/getting-started.html index d7e150dd9c..bee6f905a4 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -5,355 +5,12 @@ slug: getting-started lead: "An overview of Bootstrap, how to download and use, basic templates and examples, and more." --- - - -
    -

    Download

    - -

    Bootstrap has a few easy ways to quickly get started, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.

    - -
    -
    -

    Bootstrap

    -

    Compiled and minified CSS, JavaScript, and fonts. No docs or original source files are included.

    - Download Bootstrap -
    -
    -

    Source code

    -

    Source Less, JavaScript, and font files, along with our docs. Requires a Less compiler and some setup.

    - Download source -
    -
    -

    Sass

    -

    Bootstrap ported from Less to Sass for easy inclusion in Rails, Compass, or Sass-only projects.

    - Download Sass -
    -
    -

    Currently v{{ site.current_version }}.

    - -

    Bootstrap CDN

    -

    The folks over at MaxCDN graciously provide CDN support for Bootstrap's CSS and JavaScript. Just use these Bootstrap CDN links.

    -{% highlight html %} - - - - - - - - -{% endhighlight %} - -

    Install with Bower

    -

    Install and manage Bootstrap's Less, CSS, JavaScript, and fonts using Bower.

    - {% highlight bash %}$ bower install bootstrap{% endhighlight %} -
    - - - - -
    -

    What's included

    - -

    Bootstrap is downloadable in two forms, within which you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.

    - -
    -

    jQuery required

    -

    Please note that all JavaScript plugins require jQuery to be included, as shown in the starter template. Consult our bower.json to see which versions of jQuery are supported.

    -
    - -

    Precompiled Bootstrap

    -

    Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:

    - -{% highlight bash %} -bootstrap/ -├── css/ -│ ├── bootstrap.css -│ ├── bootstrap.min.css -│ ├── bootstrap-theme.css -│ └── bootstrap-theme.min.css -├── js/ -│ ├── bootstrap.js -│ └── bootstrap.min.js -└── fonts/ - ├── glyphicons-halflings-regular.eot - ├── glyphicons-halflings-regular.svg - ├── glyphicons-halflings-regular.ttf - └── glyphicons-halflings-regular.woff -{% endhighlight %} - -

    This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (bootstrap.*), as well as compiled and minified CSS and JS (bootstrap.min.*). Fonts from Glyphicons are included, as is the optional Bootstrap theme.

    - -

    Bootstrap source code

    -

    The Bootstrap source code download includes the precompiled CSS, JavaScript, and font assets, along with source Less, JavaScript, and documentation. More specifically, it includes the following and more:

    -{% highlight bash %} -bootstrap/ -├── less/ -├── js/ -├── fonts/ -├── dist/ -│ ├── css/ -│ ├── js/ -│ └── fonts/ -└── docs/ - └── examples/ -{% endhighlight %} -

    The less/, js/, and fonts/ are the source code for our CSS, JS, and icon fonts (respectively). The dist/ folder includes everything listed in the precompiled download section above. The docs/ folder includes the source code for our documentation, and examples/ of Bootstrap usage. Beyond that, any other included file provides support for packages, license information, and development.

    -
    - - - - -
    -

    Basic template

    - -

    Start with this basic HTML template, or modify these examples. We hope you'll customize our templates and examples, adapting them to suit your needs.

    - -

    Copy the HTML below to begin working with a minimal Bootstrap document.

    -{% highlight html %} - - - - - - - Bootstrap 101 Template - - - - - - - - - -

    Hello, world!

    - - - - - - - -{% endhighlight %} -
    - - - - -
    -

    Examples

    - -

    Build on the basic template above with Bootstrap's many components. See also Customizing Bootstrap for tips on maintaining your own Bootstrap variants.

    - -

    Using the framework

    -
    -
    - - - -

    Starter template

    -

    Nothing but the basics: compiled CSS and JavaScript along with a container.

    -
    -
    - - - -

    Bootstrap theme

    -

    Load the optional Bootstrap theme for a visually enhanced experience.

    -
    -
    - -
    - - - -

    Grids

    -

    Multiple examples of grid layouts with all four tiers, nesting, and more.

    -
    -
    - - - -

    Jumbotron

    -

    Build around the jumbotron with a navbar and some basic grid columns.

    -
    -
    - -
    - - - -

    Narrow jumbotron

    -

    Build a more custom page by narrowing the default container and jumbotron.

    -
    -
    - -

    Navbars in action

    -
    -
    - - - -

    Navbar

    -

    Super basic template that includes the navbar along with some additional content.

    -
    -
    - - - -

    Static top navbar

    -

    Super basic template with a static top navbar along with some additional content.

    -
    -
    - -
    - - - -

    Fixed navbar

    -

    Super basic template with a fixed top navbar along with some additional content.

    -
    -
    - -

    Custom components

    -
    -
    - - - -

    Cover

    -

    A one-page template for building simple and beautiful home pages.

    -
    -
    - - - -

    Carousel

    -

    Customize the navbar and carousel, then add some new components.

    -
    -
    - -
    - - - -

    Blog

    -

    Simple two-column blog layout with custom navigation, header, and type.

    -
    -
    - - - -

    Dashboard

    -

    Basic structure for a admin dashboard with fixed sidebar and navbar.

    -
    -
    - -
    - - - -

    Sign-in page

    -

    Custom form layout and design for a simple sign in form.

    -
    -
    - - - -

    Justified nav

    -

    Create a custom navbar with justified links. Heads up! Not too WebKit friendly.

    -
    -
    - -
    - - - -

    Sticky footer

    -

    Attach a footer to the bottom of the viewport when the content is shorter than it.

    -
    -
    - - - -

    Sticky footer with navbar

    -

    Attach a footer to the bottom of the viewport with a fixed navbar at the top.

    -
    -
    - -

    Experiments

    -
    -
    - - - -

    Non-responsive Bootstrap

    -

    Easily disable the responsiveness of Bootstrap per our docs.

    -
    -
    - - - -

    Offcanvas

    -

    Build a toggleable off-canvas navigation menu for use with Bootstrap.

    -
    -
    -
    - - - - -
    -

    Community

    - -

    Stay up to date on the development of Bootstrap and reach out to the community with these helpful resources.

    - -

    You can also follow @twbootstrap on Twitter for the latest gossip and awesome music videos.

    -
    - - - - -
    -

    Disabling responsiveness

    - -

    Bootstrap automatically adapts your pages for various screen sizes. - Here's how to disable this feature so your page works like in this non-responsive example.

    - -

    Steps to disable page responsiveness

    -
      -
    1. Omit the viewport <meta> mentioned in the CSS docs
    2. -
    3. Override the width on the .container for each grid tier with a single width, for example width: 970px !important; Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the !important with media queries or some selector-fu.
    4. -
    5. If using navbars, remove all navbar collapsing and expanding behavior.
    6. -
    7. For grid layouts, use .col-xs-* classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.
    8. -
    -

    You'll still need Respond.js for IE8 (since our media queries are still there and need to be processed). - This disables the "mobile site" aspects of Bootstrap.

    - -

    Bootstrap template with responsiveness disabled

    -

    We've applied these steps to an example. Read its source code to see the specific changes implemented.

    -

    - View non-responsive example -

    -
    - - +{% include getting-started/download.html %} +{% include getting-started/whats-included.html %} +{% include getting-started/template.html %} +{% include getting-started/examples.html %} +{% include getting-started/community.html %} +{% include getting-started/disabling-responsiveness.html %}
    @@ -361,416 +18,8 @@ bootstrap/

    Looking to migrate from an older version of Bootstrap to v3.x? Check out our migration guide.

    - - - -
    -

    Browser and device support

    -

    Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.

    - -

    Supported browsers

    -

    Specifically, we support the latest versions of the following browsers and platforms. On Windows, we support Internet Explorer 8-11. More specific support information is provided below.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ChromeFirefoxInternet ExplorerOperaSafari
    Android Supported Not SupportedN/A Not SupportedN/A
    iOS SupportedN/A Not Supported Supported
    Mac OS X Supported Supported Supported Supported
    Windows Supported Supported Supported Supported Not Supported
    -
    -

    Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 7, though they are not officially supported.

    -

    For a list of some of the browser bugs that Bootstrap has to grapple with, see our Wall of browser bugs.

    - -

    Internet Explorer 8 and 9

    -

    Internet Explorer 8 and 9 are also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported by these browsers. In addition, Internet Explorer 8 requires the use of Respond.js to enable media query support.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FeatureInternet Explorer 8Internet Explorer 9
    border-radius Not supported Supported
    box-shadow Not supported Supported
    transform Not supported Supported, with -ms prefix
    transition Not supported
    placeholder Not supported
    -
    - -

    Visit Can I use... for details on browser support of CSS3 and HTML5 features.

    - -

    Internet Explorer 8 and Respond.js

    -

    Beware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.

    -

    Respond.js and cross-domain CSS

    -

    Using Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. See the Respond.js docs for details.

    -

    Respond.js and file://

    -

    Due to browser security rules, Respond.js doesn't work with pages viewed via the file:// protocol (like when opening a local HTML file). To test responsive features in IE8, view your pages over HTTP(S). See the Respond.js docs for details.

    -

    Respond.js and @import

    -

    Respond.js doesn't work with CSS that's referenced via @import. In particular, some Drupal configurations are known to use @import. See the Respond.js docs for details.

    - -

    Internet Explorer 8 and box-sizing

    -

    IE8 does not fully support box-sizing: border-box; when combined with min-width, max-width, min-height, or max-height. For that reason, as of v3.0.1, we no longer use max-width on .containers.

    - -

    IE Compatibility modes

    -

    Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <meta> tag in your pages:

    -{% highlight html %} - -{% endhighlight %} -

    Confirm the document mode by opening the debugging tools: press F12 and check the "Document Mode".

    -

    This tag is included in all Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer.

    -

    See this StackOverflow question for more information.

    - -

    Internet Explorer 10 in Windows 8 and Windows Phone 8

    -

    Internet Explorer 10 doesn't differentiate device width from viewport width, and thus doesn't properly apply the media queries in Bootstrap's CSS. Normally you'd just add a quick snippet of CSS to fix this:

    -{% highlight scss %} -@-ms-viewport { width: device-width; } -{% endhighlight %} -

    However, this doesn't work for devices running Windows Phone 8 versions older than Update 3 (a.k.a. GDR3), as it causes such devices to show a mostly desktop view instead of narrow "phone" view. To address this, you'll need to include the following CSS and JavaScript to work around the bug.

    -{% highlight scss %} -@-webkit-viewport { width: device-width; } -@-moz-viewport { width: device-width; } -@-ms-viewport { width: device-width; } -@-o-viewport { width: device-width; } -@viewport { width: device-width; } -{% endhighlight %} - -{% highlight js %} -if (navigator.userAgent.match(/IEMobile\/10\.0/)) { - var msViewportStyle = document.createElement('style') - msViewportStyle.appendChild( - document.createTextNode( - '@-ms-viewport{width:auto!important}' - ) - ) - document.querySelector('head').appendChild(msViewportStyle) -} -{% endhighlight %} -

    For more information and usage guidelines, read Windows Phone 8 and Device-Width.

    -

    As a heads up, we include this in the Bootstrap docs as an example.

    - -

    Safari percent rounding

    -

    As of Safari v7.0.1 for OS X and Safari for iOS v7.0.1, Safari's rendering engine has some trouble with the number of decimal places used in our .col-*-1 grid classes. So if you have 12 individual grid columns, you'll notice that they come up short compared to other rows of columns. We can't do much here (see #9282) but you do have some options:

    -
      -
    • Add .pull-right to your last grid column to get the hard-right alignment
    • -
    • Tweak your percentages manually to get the perfect rounding for Safari (more difficult than the first option)
    • -
    -

    We'll keep an eye on this though and update our code if we have an easy solution.

    - -

    Modals, navbars, and virtual keyboards

    -

    Overflow and scrolling

    -

    Support for overflow: hidden on the <body> element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <body> content will begin to scroll.

    -

    Virtual keyboards

    -

    Also, note that if you're using inputs in your modal or navbar, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to position: absolute or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.

    -

    Navbar Dropdowns

    -

    The .dropdown-backdrop element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or any other element which will fire a click event in iOS).

    - -

    Browser zooming

    -

    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

    -

    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. See #12078 for some details. Suggested workarounds:

    -
      -
    • 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.
    • -
    - -

    Android stock browser

    -

    Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.

    -

    Select menus

    -

    On <select> elements, the Android stock browser will not display the side controls if there is a border-radius and/or border applied. Use the snippet of code below to remove the offending CSS and render the <select> as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.

    -{% highlight html %} - -{% endhighlight %} -

    Want to see an example? Check out this JS Bin demo.

    -
    - - - - -
    -

    Third party support

    -

    While we don't officially support any third party plugins or add-ons, we do offer some useful advice to help avoid potential issues in your projects.

    - -

    Box-sizing

    -

    Some third party software, including Google Maps and Google Custom Search Engine, conflict with Bootstrap due to * { box-sizing: border-box; }, a rule which makes it so padding does not affect the final computed width of an element. Learn more about box model and sizing at CSS Tricks.

    -

    Depending on the context, you may override as-needed (Option 1) or reset the box-sizing for entire regions (Option 2).

    -{% highlight scss %} -/* Box-sizing resets - * - * Reset individual elements or override regions to avoid conflicts due to - * global box model settings of Bootstrap. Two options, individual overrides and - * region resets, are available as plain CSS and uncompiled Less formats. - */ - -/* Option 1A: Override a single element's box model via CSS */ -.element { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -/* Option 1B: Override a single element's box model by using a Bootstrap Less mixin */ -.element { - .box-sizing(content-box); -} - -/* Option 2A: Reset an entire region via CSS */ -.reset-box-sizing, -.reset-box-sizing *, -.reset-box-sizing *:before, -.reset-box-sizing *:after { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -/* Option 2B: Reset an entire region with a custom Less mixin */ -.reset-box-sizing { - &, - *, - *:before, - *:after { - .box-sizing(content-box); - } -} -.element { - .reset-box-sizing(); -} -{% endhighlight %} -
    - - - - -
    -

    Accessibility

    -

    Bootstrap follows common web standards and—with minimal extra effort—can be used to create sites that are accessible to those using AT.

    - -

    Skip navigation

    -

    If your navigation contains many links and comes before the main content in the DOM, add a Skip to main content link immediately after your opening <body> tag. (read why)

    -{% highlight html %} - - Skip to main content -
    - The main page content. -
    - -{% endhighlight %} - -

    Nested headings

    -

    When nesting headings (<h1> - <h6>), your primary document header should be an <h1>. Subsequent headings should make logical use of <h2> - <h6> such that screen readers can construct a table of contents for your pages.

    -

    Learn more at HTML CodeSniffer and Penn State's AccessAbility.

    - -

    Additional resources

    - -
    - - - - -
    -

    License FAQs

    -

    Bootstrap is released under the MIT license and is copyright {{ site.time | date: "%Y" }} Twitter. Boiled down to smaller chunks, it can be described with the following conditions.

    - -

    It requires you to:

    -
      -
    • Include the license and copyright notice in your works
    • -
    - -

    It permits you to:

    -
      -
    • Freely download and use Bootstrap, in whole or in part, for personal, private, company internal, or commercial purposes
    • -
    • Use Bootstrap in packages or distributions that you create
    • -
    • Modify the source code
    • -
    • Grant a sublicense to modify and distribute Bootstrap to third parties not included in the license
    • -
    - -

    It forbids you to:

    -
      -
    • Hold the authors and license owners liable for damages as Bootstrap is provided without warranty
    • -
    • Hold the creators or copyright holders of Bootstrap liable
    • -
    • Redistribute any piece of Bootstrap without proper attribution
    • -
    • Use any marks owned by Twitter in any way that might state or imply that Twitter endorses your distribution
    • -
    • Use any marks owned by Twitter in any way that might state or imply that you created the Twitter software in question
    • -
    - -

    It does not require you to:

    -
      -
    • Include the source of Bootstrap itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it
    • -
    • Submit changes that you make to Bootstrap back to the Bootstrap project (though such feedback is encouraged)
    • -
    - -

    The full Bootstrap license is located in the project repository for more information.

    -
    - - -
    -

    Customizing Bootstrap

    -

    Bootstrap is best maintained when you treat it as a separate and independently-versioned dependency in your development environment. Doing this makes upgrading Bootstrap easier in the future.

    - -

    Once you've downloaded and included Bootstrap's styles and scripts, you can customize its components. Just create a new stylesheet (Less, if you like, or just plain CSS) to house your customizations.

    - -
    -

    Compiled or minified?

    -

    Unless you plan on reading the CSS, go with minified stylesheets. It's the same code, just compacted. Minified styles use less bandwidth, which is good, especially in production environments.

    -
    - -

    From there, include whatever Bootstrap components and HTML content you need to create templates for your site's pages.

    - -

    Customizing components

    -

    You can customize components to varying degrees, but most fall into two camps: light customizations and overhauls. Plenty examples of both are available from third parties.

    -

    We define light customizations as superficial changes, for example, color and font changes to existing Bootstrap components. A light customization example is the Twitter Translation Center (coded by @mdo). Let's look at how to implement the custom button we wrote for this site, .btn-ttc.

    -

    The stock Bootstrap buttons require just one class, .btn, to start. Here we extend the .btn style with a new modifier class, .btn-ttc, that we will create. This gives us a distinct custom look with minimal effort.

    -

    Our customized button will be coded like this:

    -{% highlight html %} - -{% endhighlight %} -

    Note how .btn-ttc is added to the standard .btn class.

    - -

    To implement this, in the custom stylesheet, add the following CSS:

    - -{% highlight scss %} -/* Custom button --------------------------------------------------- */ - -/* Override base .btn styles */ -/* Apply text and background changes to three key states: default, hover, and active (click). */ -.btn-ttc, -.btn-ttc:hover, -.btn-ttc:active { - color: white; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #007da7; -} - -/* Apply the custom-colored gradients */ -/* Note: you'll need to include all the appropriate gradients for various browsers and standards. */ -.btn-ttc { - background-repeat: repeat-x; - background-image: linear-gradient(top, #009ED2 0%, #007DA7 100%); - ... -} - -/* Set the hover state */ -/* An easy hover state is just to move the gradient up a small amount. Add other embellishments as you see fit. */ -.btn-ttc:hover { - background-position: 0 -15px; -} -{% endhighlight %} - -

    In short: Look to the style source and duplicate the selectors you need for your modifications.

    -

    In summary, here's the basic workflow:

    -
      -
    • For each element you want to customize, find its code in the compiled Bootstrap CSS.
    • -
    • Copy the component's selector and styles and paste them in your custom stylesheet. For instance, to customize the navbar background, just copy the .navbar style specification.
    • -
    • In your custom stylesheet, edit the CSS you just copied from the Bootstrap source. No need for prepending additional classes, or appending !important here. Keep it simple.
    • -
    • Rinse and repeat until you're happy with your customizations.
    • -
    -

    Once you are comfortable performing light customizations, visual overhauls are just as straightforward. For a site like Karma, which uses Bootstrap as a CSS reset with heavy modifications, more extensive work is involved. But the same principle applies: include Bootstrap's default stylesheet first, then apply your custom stylesheet.

    - -
    -

    Alternate customization methods

    -

    While not recommended for folks new to Bootstrap, you may use one of two alternate methods for customization. The first is modifying the source .less files (making upgrades super difficult), and the second is mapping source Less code to your own classes via mixins. For the time being, neither of those options are documented here.

    -
    - -

    Removing potential bloat

    -

    Not all sites and applications need to make use of everything Bootstrap has to offer, especially in production environments where optimizing bandwidth is an issue. We encourage you to remove whatever is unused with our Customizer.

    -

    Using the Customizer, simply uncheck any component, feature, or asset you don't need. Hit download and swap out the default Bootstrap files with these newly customized ones. You'll get vanilla Bootstrap, but without the features *you* deem unnecessary. All custom builds include compiled and minified versions, so use whichever works for you.

    -
    - - - - -
    -

    Translations

    - -

    Community members have translated Bootstrap's documentation into various languages. None are officially supported and they may not always be up to date.

    - -

    We don't help organize or host translations, we just link to them.

    -

    Finished a new or better translation? Open a pull request to add it to our list.

    -
    +{% include getting-started/browser-device-support.html %} +{% include getting-started/third-party-support.html %} +{% include getting-started/accessibility.html %} +{% include getting-started/license.html %} +{% include getting-started/translations.html %} diff --git a/docs/javascript.html b/docs/javascript.html index 8c172b809a..c7671c7eac 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -5,2185 +5,15 @@ slug: js lead: "Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one." --- - - -
    -

    Overview

    - -

    Individual or compiled

    -

    Plugins can be included individually (using Bootstrap's individual *.js files), or all at once (using bootstrap.js or the minified bootstrap.min.js).

    - -
    -

    Using the compiled JavaScript

    -

    Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. Include only one.

    -
    - -
    -

    Component data attributes

    -

    Don't use data attributes from multiple plugins on the same element. For example, a button cannot both have a tooltip and toggle a modal. To accomplish this, use a wrapping element.

    -
    - -
    -

    Plugin dependencies

    -

    Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs. Also note that all plugins depend on jQuery (this means jQuery must be included before the plugin files). Consult our bower.json to see which versions of jQuery are supported.

    -
    - -

    Data attributes

    -

    You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first-class API and should be your first consideration when using a plugin.

    - -

    That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the document namespaced with data-api. This looks like this:

    -{% highlight js %} -$(document).off('.data-api') -{% endhighlight %} - -

    Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:

    -{% highlight js %} -$(document).off('.alert.data-api') -{% endhighlight %} - -

    Programmatic API

    -

    We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.

    -{% highlight js %} -$('.btn.danger').button('toggle').addClass('fat') -{% endhighlight %} - -

    All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):

    -{% highlight js %} -$('#myModal').modal() // initialized with defaults -$('#myModal').modal({ keyboard: false }) // initialized with no keyboard -$('#myModal').modal('show') // initializes and invokes show immediately -{% endhighlight %} - -

    Each plugin also exposes its raw constructor on a Constructor property: $.fn.popover.Constructor. If you'd like to get a particular plugin instance, retrieve it directly from an element: $('[rel=popover]').data('popover').

    - -

    No conflict

    -

    Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call .noConflict on the plugin you wish to revert the value of.

    -{% highlight js %} -var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value -$.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the Bootstrap functionality -{% endhighlight %} - -

    Events

    -

    Bootstrap provides custom events for most plugins' unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. show) is triggered at the start of an event, and its past participle form (ex. shown) is triggered on the completion of an action.

    -

    As of 3.0.0, all Bootstrap events are namespaced.

    -

    All infinitive events provide preventDefault functionality. This provides the ability to stop the execution of an action before it starts.

    -{% highlight js %} -$('#myModal').on('show.bs.modal', function (e) { - if (!data) return e.preventDefault() // stops modal from being shown -}) -{% endhighlight %} - -
    -

    Third-party libraries

    -

    Bootstrap does not officially support third-party JavaScript libraries like Prototype or jQuery UI. Despite .noConflict and namespaced events, there may be compatibility problems that you need to fix on your own.

    -
    -
    - - - - -
    -

    Transitions transition.js

    - -

    About transitions

    -

    For simple transition effects, include transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.

    -

    What's inside

    -

    Transition.js is a basic helper for transitionEnd events as well as a CSS transition emulator. It's used by the other plugins to check for CSS transition support and to catch hanging transitions.

    -
    - - - - -
    -

    Modals modal.js

    - -

    Examples

    -

    Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.

    - -
    -

    Overlapping modals not supported

    -

    Be sure not to open a modal while another is still visible. Showing more than one modal at a time requires custom code.

    -
    -
    -

    Modal markup placement

    -

    Always try to place a modal's HTML code in a top-level position in your document to avoid other components affecting the modal's appearance and/or functionality.

    -
    -
    -

    Mobile device caveats

    -

    There are some caveats regarding using modals on mobile devices. See our browser support docs for details.

    -
    - -

    Static example

    -

    A rendered modal with header, body, and set of actions in the footer.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -

    Live demo

    -

    Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.

    - - - -
    - -
    -{% highlight html %} - - - - - -{% endhighlight %} - -
    -

    Make modals accessible

    -

    Be sure to add role="dialog" to .modal, aria-labelledby="myModalLabel" attribute to reference the modal title, and aria-hidden="true" to tell assistive technologies to skip the modal's DOM elements.

    -

    Additionally, you may give a description of your modal dialog with aria-describedby on .modal.

    -
    - -
    -

    Embedding YouTube videos

    -

    Embedding YouTube videos in modals requires additional JavaScript not in Bootstrap to automatically stop playback and more. See this helpful Stack Overflow post for more information.

    -
    - -

    Optional sizes

    -

    Modals have two optional sizes, available via modifier classes to be placed on a .modal-dialog.

    -
    - - -
    -{% highlight html %} - - - - - - - - - -{% endhighlight %} - - - - - -

    Remove animation

    -

    For modals that simply appear rather than fade in to view, remove the .fade class from your modal markup.

    -{% highlight html %} - -{% 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.

    - -

    Via data attributes

    -

    Activate a modal without writing JavaScript. Set data-toggle="modal" on a controller element, like a button, along with a data-target="#foo" or href="#foo" to target a specific modal to toggle.

    -{% highlight html %} - -{% endhighlight %} - -

    Via JavaScript

    -

    Call a modal with id myModal with a single line of JavaScript:

    - {% highlight js %}$('#myModal').modal(options){% endhighlight %} - -

    Options

    -

    Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-backdrop="".

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    backdropboolean or the string 'static'trueIncludes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.
    keyboardbooleantrueCloses the modal when escape key is pressed
    showbooleantrueShows the modal when initialized.
    remotepathfalse

    If a remote URL is provided, content will be loaded one time via jQuery's load method and injected into the .modal-content div. If you're using the data-api, you may alternatively use the href attribute to specify the remote source. An example of this is shown below:

    -{% highlight html %} -Click me -{% endhighlight %} -
    -
    - -

    Methods

    - -

    .modal(options)

    -

    Activates your content as a modal. Accepts an optional options object.

    -{% highlight js %} -$('#myModal').modal({ - keyboard: false -}) -{% endhighlight %} - -

    .modal('toggle')

    -

    Manually toggles a modal. Returns to the caller before the modal has actually been shown or hidden (i.e. before the shown.bs.modal or hidden.bs.modal event occurs).

    - {% highlight js %}$('#myModal').modal('toggle'){% endhighlight %} - -

    .modal('show')

    -

    Manually opens a modal. Returns to the caller before the modal has actually been shown (i.e. before the shown.bs.modal event occurs).

    - {% highlight js %}$('#myModal').modal('show'){% endhighlight %} - -

    .modal('hide')

    -

    Manually hides a modal. Returns to the caller before the modal has actually been hidden (i.e. before the hidden.bs.modal event occurs).

    - {% highlight js %}$('#myModal').modal('hide'){% endhighlight %} - -

    Events

    -

    Bootstrap's modal class exposes a few events for hooking into modal functionality.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    show.bs.modalThis event fires immediately when the show instance method is called. If caused by a click, the clicked element is available as the relatedTarget property of the event.
    shown.bs.modalThis event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the relatedTarget property of the event.
    hide.bs.modalThis event is fired immediately when the hide instance method has been called.
    hidden.bs.modalThis event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).
    loaded.bs.modalThis event is fired when the modal has loaded content using the remote option.
    -
    -{% highlight js %} -$('#myModal').on('hidden.bs.modal', function (e) { - // do something... -}) -{% endhighlight %} -
    - - - - -
    -

    Dropdowns dropdown.js

    - - -

    Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.

    - -

    Within a navbar

    - - -

    Within pills

    - - - - -

    Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the .open class on the parent list item. When opened, the plugin also adds .dropdown-backdrop as a click area for closing dropdown menus when clicking outside the menu. Note: The data-toggle=dropdown attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.

    - -

    Via data attributes

    -

    Add data-toggle="dropdown" to a link or button to toggle a dropdown.

    -{% highlight html %} - -{% endhighlight %} -

    To keep URLs intact, use the data-target attribute instead of href="#".

    -{% highlight html %} - -{% endhighlight %} - -

    Via JavaScript

    -

    Call the dropdowns via JavaScript:

    -{% highlight js %} -$('.dropdown-toggle').dropdown() -{% endhighlight %} -
    -

    data-toggle="dropdown" still required

    -

    Regardless of whether you call your dropdown via JavaScript or instead use the data-api, data-toggle="dropdown" is always required to be present on the dropdown's trigger element.

    -
    - -

    Options

    -

    None

    - -

    Methods

    -

    $().dropdown('toggle')

    -

    Toggles the dropdown menu of a given navbar or tabbed navigation.

    - -

    Events

    -

    All dropdown events are fired at the .dropdown-menu's parent element.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    show.bs.dropdownThis event fires immediately when the show instance method is called. The toggling anchor element is available as the relatedTarget property of the event.
    shown.bs.dropdownThis event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the relatedTarget property of the event.
    hide.bs.dropdownThis event is fired immediately when the hide instance method has been called. The toggling anchor element is available as the relatedTarget property of the event.
    hidden.bs.dropdownThis event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the relatedTarget property of the event.
    -
    -{% highlight js %} -$('#myDropdown').on('show.bs.dropdown', function () { - // do something… -}) -{% endhighlight %} -
    - - - -
    -

    ScrollSpy scrollspy.js

    - -

    Example in navbar

    -

    The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.

    -
    - -
    -

    @fat

    -

    Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

    -

    @mdo

    -

    Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.

    -

    one

    -

    Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.

    -

    two

    -

    In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.

    -

    three

    -

    Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.

    -

    Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats. -

    -
    -
    - - -

    Usage

    - -

    Requires relative positioning

    -

    No matter the implementation method, scrollspy requires the use of position: relative; on the element you're spying on. In most cases this is the <body>.

    - -

    Via data attributes

    -

    To easily add scrollspy behavior to your topbar navigation, add data-spy="scroll" to the element you want to spy on (most typically this would be the <body>). Then add the data-target attribute with the ID or class of the parent element of any Bootstrap .nav component.

    -{% highlight css %} -body { - position: relative; -} -{% endhighlight %} -{% highlight html %} - - ... - - ... - -{% endhighlight %} - -

    Via JavaScript

    -

    After adding position: relative; in your CSS, call the scrollspy via JavaScript:

    -{% highlight js %} -$('body').scrollspy({ target: '.navbar-example' }) -{% endhighlight %} - -
    -

    Resolvable ID targets required

    -

    Navbar links must have resolvable id targets. For example, a <a href="#home">home</a> must correspond to something in the DOM like <div id="home"></div>.

    -
    - -

    Methods

    -

    .scrollspy('refresh')

    -

    When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:

    -{% highlight js %} -$('[data-spy="scroll"]').each(function () { - var $spy = $(this).scrollspy('refresh') -}) -{% endhighlight %} - - -

    Options

    -

    Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset="".

    -
    - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    offsetnumber10Pixels to offset from top when calculating position of scroll.
    -
    - -

    Events

    -
    - - - - - - - - - - - - - -
    Event TypeDescription
    activate.bs.scrollspyThis event fires whenever a new item becomes activated by the scrollspy.
    -
    -{% highlight js %} -$('#myScrollspy').on('activate.bs.scrollspy', function () { - // do something… -}) -{% endhighlight %} -
    - - - - -
    -

    Togglable tabs tab.js

    - -

    Example tabs

    -

    Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.

    -
    - -
    -
    -

    Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.

    -
    -
    -

    Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.

    -
    - - -
    -
    - -
    -

    Extends tabbed navigation

    -

    This plugin extends the tabbed navigation component to add tabbable areas.

    -
    - - -

    Usage

    -

    Enable tabbable tabs via JavaScript (each tab needs to be activated individually):

    - -{% highlight js %} -$('#myTab a').click(function (e) { - e.preventDefault() - $(this).tab('show') -}) -{% endhighlight %} - -

    You can activate individual tabs in several ways:

    - -{% highlight js %} -$('#myTab a[href="#profile"]').tab('show') // Select tab by name -$('#myTab a:first').tab('show') // Select first tab -$('#myTab a:last').tab('show') // Select last tab -$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed) -{% endhighlight %} - -

    Markup

    -

    You can activate a tab or pill navigation without writing any JavaScript by simply specifying data-toggle="tab" or data-toggle="pill" on an element. Adding the nav and nav-tabs classes to the tab ul will apply the Bootstrap tab styling, while adding the nav and nav-pills classes will apply pill styling.

    -{% highlight html %} - - - - -
    -
    ...
    -
    ...
    -
    ...
    -
    ...
    -
    -{% endhighlight %} - -

    Fade effect

    -

    To make tabs fade in, add .fade to each .tab-pane. The first tab pane must also have .in to properly fade in initial content.

    -{% highlight html %} -
    -
    ...
    -
    ...
    -
    ...
    -
    ...
    -
    -{% endhighlight %} - -

    Methods

    -

    $().tab

    -

    - Activates a tab element and content container. Tab should have either a data-target or an href targeting a container node in the DOM. -

    -{% highlight html %} - - -
    -
    ...
    -
    ...
    -
    ...
    -
    ...
    -
    - - -{% endhighlight %} - -

    Events

    -
    - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    show.bs.tabThis event fires on tab show, but before the new tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
    shown.bs.tabThis event fires on tab show after a tab has been shown. Use event.target and event.relatedTarget to target the active tab and the previous active tab (if available) respectively.
    -
    -{% highlight js %} -$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { - e.target // activated tab - e.relatedTarget // previous tab -}) -{% endhighlight %} -
    - - - - -
    -

    Tooltips tooltip.js

    - -

    Examples

    -

    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.

    -

    Hover over the links below to see tooltips:

    -
    -

    Tight pants next level keffiyeh you probably 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 have 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 whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral. -

    -
    - -

    Four directions

    -
    -
    - - - - -
    -
    -{% highlight html %} - - - - - - - -{% endhighlight %} - -
    -

    Opt-in functionality

    -

    For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

    -
    -
    -

    Tooltips in button groups and input groups require special setting

    -

    When using tooltips on elements within a .btn-group or an .input-group, you'll have to specify the option container: 'body' (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).

    -
    -
    -

    Tooltips on disabled elements require wrapper elements

    -

    To add a tooltip to a disabled or .disabled element, put the element inside of a <div> and apply the tooltip to that <div> instead.

    -
    - -

    Usage

    -

    The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element.

    -

    Trigger the tooltip via JavaScript:

    -{% highlight js %} -$('#example').tooltip(options) -{% endhighlight %} - -

    Markup

    -

    The required markup for a tooltip is only a data attribute and title 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 top by the plugin).

    -
    -

    Multiple-line links

    -

    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 white-space: nowrap; to your anchors to avoid this.

    -
    -{% highlight html linenos %} - -Hover over me - - -
    -
    - Some tooltip text! -
    -
    -
    -{% endhighlight %} - -

    Options

    -

    Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    animationbooleantrueapply a CSS fade transition to the tooltip
    htmlbooleanfalseInsert HTML into the tooltip. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.
    placementstring | function'top'how to position the tooltip - top | bottom | left | right | auto.
    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.
    selectorstringfalseIf a selector is provided, tooltip objects will be delegated to the specified targets.
    titlestring | function''default title value if title attribute isn't present
    triggerstring'hover focus'how tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.
    delaynumber | object0 -

    delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

    -

    If a number is supplied, delay is applied to both hide/show

    -

    Object structure is: delay: { show: 500, hide: 100 }

    -
    containerstring | falsefalse -

    Appends the tooltip to a specific element. Example: container: 'body'

    -
    -
    -
    -

    Data attributes for individual tooltips

    -

    Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.

    -
    - -

    Methods

    - -

    $().tooltip(options)

    -

    Attaches a tooltip handler to an element collection.

    - -

    .tooltip('show')

    -

    Reveals an element's tooltip.

    - {% highlight js %}$('#element').tooltip('show'){% endhighlight %} - -

    .tooltip('hide')

    -

    Hides an element's tooltip.

    - {% highlight js %}$('#element').tooltip('hide'){% endhighlight %} - -

    .tooltip('toggle')

    -

    Toggles an element's tooltip.

    - {% highlight js %}$('#element').tooltip('toggle'){% endhighlight %} - -

    .tooltip('destroy')

    -

    Hides and destroys an element's tooltip.

    - {% highlight js %}$('#element').tooltip('destroy'){% endhighlight %} - -

    Events

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    show.bs.tooltipThis event fires immediately when the show instance method is called.
    shown.bs.tooltipThis event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).
    hide.bs.tooltipThis event is fired immediately when the hide instance method has been called.
    hidden.bs.tooltipThis event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).
    -
    -{% highlight js %} -$('#myTooltip').on('hidden.bs.tooltip', function () { - // do something… -}) -{% endhighlight %} -
    - - - - -
    -

    Popovers popover.js

    - -

    Examples

    -

    Add small overlays of content, like those on the iPad, to any element for housing secondary information.

    - -
    -

    Plugin dependency

    -

    Popovers require the tooltip plugin to be included in your version of Bootstrap.

    -
    -
    -

    Opt-in functionality

    -

    For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

    -
    -
    -

    Popovers in button groups and input groups require special setting

    -

    When using popovers on elements within a .btn-group or an .input-group, you'll have to specify the option container: 'body' (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).

    -
    -
    -

    Popovers on disabled elements require wrapper elements

    -

    To add a popover to a disabled or .disabled element, put the element inside of a <div> and apply the popover to that <div> instead.

    -
    - -

    Static popover

    -

    Four options are available: top, right, bottom, and left aligned.

    -
    -
    -
    -

    Popover top

    -
    -

    Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

    -
    -
    - -
    -
    -

    Popover right

    -
    -

    Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

    -
    -
    - -
    -
    -

    Popover bottom

    - -
    -

    Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

    -
    -
    - -
    -
    -

    Popover left

    -
    -

    Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

    -
    -
    - -
    -
    - -

    Live demo

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -

    Four directions

    -
    -
    - - - - -
    -
    -{% highlight html %} - - - - - - - -{% endhighlight %} - -

    Dismiss on next click

    -

    Use the focus trigger to dismiss popovers on their next click.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} -{% highlight js %} -$('.popover-dismiss').popover({ - trigger: 'focus' -}) -{% endhighlight %} - -
    -

    Multiple-line links

    -

    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 white-space: nowrap; to your anchors to avoid this.

    -
    - - -

    Usage

    -

    Enable popovers via JavaScript:

    - {% highlight js %}$('#example').popover(options){% endhighlight %} - -

    Options

    -

    Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animation="".

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    animationbooleantrueapply a CSS fade transition to the popover
    htmlbooleanfalseInsert HTML into the popover. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.
    placementstring | function'right'how to position the popover - top | bottom | left | right | auto.
    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.
    selectorstringfalseif 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 this and an informative example.
    triggerstring'click'how popover is triggered - click | hover | focus | manual
    titlestring | function''default title value if title attribute isn't present
    contentstring | function''default content value if data-content attribute isn't present
    delaynumber | object0 -

    delay showing and hiding the popover (ms) - does not apply to manual trigger type

    -

    If a number is supplied, delay is applied to both hide/show

    -

    Object structure is: delay: { show: 500, hide: 100 }

    -
    containerstring | falsefalse -

    Appends the popover to a specific element. Example: container: 'body'. 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.

    -
    -
    -
    -

    Data attributes for individual popovers

    -

    Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.

    -
    - -

    Methods

    -

    $().popover(options)

    -

    Initializes popovers for an element collection.

    - -

    .popover('show')

    -

    Reveals an elements popover.

    - {% highlight js %}$('#element').popover('show'){% endhighlight %} - -

    .popover('hide')

    -

    Hides an elements popover.

    - {% highlight js %}$('#element').popover('hide'){% endhighlight %} - -

    .popover('toggle')

    -

    Toggles an elements popover.

    - {% highlight js %}$('#element').popover('toggle'){% endhighlight %} - -

    .popover('destroy')

    -

    Hides and destroys an element's popover.

    - {% highlight js %}$('#element').popover('destroy'){% endhighlight %} -

    Events

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    show.bs.popoverThis event fires immediately when the show instance method is called.
    shown.bs.popoverThis event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).
    hide.bs.popoverThis event is fired immediately when the hide instance method has been called.
    hidden.bs.popoverThis event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).
    -
    -{% highlight js %} -$('#myPopover').on('hidden.bs.popover', function () { - // do something… -}) -{% endhighlight %} -
    - - - - -
    -

    Alert messages alert.js

    - -

    Example alerts

    -

    Add dismiss functionality to all alert messages with this plugin.

    -
    - -
    - -
    - -
    - - -

    Usage

    -

    Enable dismissal of an alert via JavaScript:

    - {% highlight js %}$(".alert").alert(){% endhighlight %} - -

    Markup

    -

    Just add data-dismiss="alert" to your close button to automatically give an alert close functionality.

    - {% highlight html %}{% endhighlight %} - -

    Methods

    - -

    $().alert()

    -

    Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the .fade and .in class already applied to them.

    - -

    .alert('close')

    -

    Closes an alert.

    - {% highlight js %}$(".alert").alert('close'){% endhighlight %} - - -

    Events

    -

    Bootstrap's alert class exposes a few events for hooking into alert functionality.

    -
    - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    close.bs.alertThis event fires immediately when the close instance method is called.
    closed.bs.alertThis event is fired when the alert has been closed (will wait for CSS transitions to complete).
    -
    -{% highlight js %} -$('#my-alert').bind('closed.bs.alert', function () { - // do something… -}) -{% endhighlight %} -
    - - - - -
    -

    Buttons button.js

    - -

    Example uses

    -

    Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

    - -

    Stateful

    -

    Add data-loading-text="Loading..." to use a loading state on a button.

    -
    - -
    -{% highlight html %} - - -{% endhighlight %} - -

    Single toggle

    -

    Add data-toggle="button" to activate toggling on a single button.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - -

    Checkbox

    -

    Add data-toggle="buttons" to a group of checkboxes for checkbox style toggling on btn-group.

    -
    -
    - - - -
    -
    -{% highlight html %} -
    - - - -
    -{% endhighlight %} - -

    Radio

    -

    Add data-toggle="buttons" to a group of radio inputs for radio style toggling on btn-group.

    -
    -
    - - - -
    -
    -{% highlight html %} -
    - - - -
    -{% endhighlight %} - - -

    Usage

    -

    Enable buttons via JavaScript:

    -{% highlight js %} -$('.btn').button() -{% endhighlight %} - -

    Markup

    -

    Data attributes are integral to the button plugin. Check out the example code below for the various markup types.

    - -

    Options

    -

    None

    - -

    Methods

    - -

    $().button('toggle')

    -

    Toggles push state. Gives the button the appearance that it has been activated.

    -
    -

    Auto toggling

    -

    You can enable auto toggling of a button by using the data-toggle attribute.

    -
    -{% highlight html %} - -{% endhighlight %} - -

    $().button('loading')

    -

    Sets button state to loading - disables button and swaps text to loading text. Loading text should be defined on the button element using the data attribute data-loading-text. -

    -{% highlight html %} - - -{% endhighlight %} - -
    -

    Cross-browser compatibility

    -

    Firefox persists the disabled state across page loads. A workaround for this is to use autocomplete="off".

    -
    - -

    $().button('reset')

    -

    Resets button state - swaps text to original text.

    - -

    $().button(string)

    -

    Resets button state - swaps text to any data defined text state.

    -{% highlight html %} - - -{% endhighlight %} -
    - - - - -
    -

    Collapse collapse.js

    - -

    About

    -

    Get base styles and flexible support for collapsible components like accordions and navigation.

    - -
    -

    Plugin dependency

    -

    Collapse requires the transitions plugin to be included in your version of Bootstrap.

    -
    - -

    Example accordion

    -

    Using the collapse plugin, we built a simple accordion by extending the panel component.

    - -
    -
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    -
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    -
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    -
    -
    -
    -{% highlight html %} -
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    -
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    -
    -
    - -
    -
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. -
    -
    -
    -
    -{% endhighlight %} - -

    You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.

    -{% highlight html %} - - -
    ...
    -{% endhighlight %} - - -

    Usage

    -

    The collapse plugin utilizes a few classes to handle the heavy lifting:

    -
      -
    • .collapse hides the content
    • -
    • .collapse.in shows the content
    • -
    • .collapsing is added when the transition starts, and removed when it finishes
    • -
    -

    These classes can be found in component-animations.less.

    - -

    Via data attributes

    -

    Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.

    -

    To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.

    - -

    Via JavaScript

    -

    Enable manually with:

    -{% highlight js %} -$('.collapse').collapse() -{% endhighlight %} - -

    Options

    -

    Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-parent="".

    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    parentselectorfalseIf selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this dependent on the panel class)
    togglebooleantrueToggles the collapsible element on invocation
    -
    - -

    Methods

    - -

    .collapse(options)

    -

    Activates your content as a collapsible element. Accepts an optional options object. -{% highlight js %} -$('#myCollapsible').collapse({ - toggle: false -}) -{% endhighlight %} - -

    .collapse('toggle')

    -

    Toggles a collapsible element to shown or hidden.

    - -

    .collapse('show')

    -

    Shows a collapsible element.

    - -

    .collapse('hide')

    -

    Hides a collapsible element.

    - -

    Events

    -

    Bootstrap's collapse class exposes a few events for hooking into collapse functionality.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    show.bs.collapseThis event fires immediately when the show instance method is called.
    shown.bs.collapseThis event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).
    hide.bs.collapse - This event is fired immediately when the hide method has been called. -
    hidden.bs.collapseThis event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).
    -
    -{% highlight js %} -$('#myCollapsible').on('hidden.bs.collapse', function () { - // do something… -}) -{% endhighlight %} -
    - - - - -
    -

    Carousel carousel.js

    - - -

    The slideshow below shows a generic plugin and component for cycling through elements like a carousel.

    -
    - -
    -{% highlight html %} - -{% endhighlight %} - - - -

    Optional captions

    -

    Add captions to your slides easily with the .carousel-caption element within any .item. Place just about any optional HTML within there and it will be automatically aligned and formatted.

    -
    - -
    -{% highlight html %} -
    - ... - -
    -{% endhighlight %} - -
    -

    Accessibility issue

    -

    The carousel component is generally not compliant with accessibility standards. If you need to be compliant, please consider other options for presenting your content.

    -
    - - - -

    Multiple carousels

    -

    Carousels require the use of an id on the outermost container, .carousel, for carousel controls to function properly. When adding multiple carousels, or when changing a carousel's id, be sure to update the relevant controls.

    - -

    Via data attributes

    -

    Use data attributes to easily control the position of the carousel. data-slide accepts the keywords prev or next, which alters the slide position relative to its current position. Alternatively, use data-slide-to to pass a raw slide index to the carousel data-slide-to="2", which shifts the slide position to a particular index beginning with 0.

    -

    The data-ride="carousel" attribute is used to mark a carousel as animating starting at page load.

    - -

    Via JavaScript

    -

    Call carousel manually with:

    -{% highlight js %} -$('.carousel').carousel() -{% endhighlight %} - -

    Options

    -

    Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-interval="".

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    intervalnumber5000The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
    pausestring"hover"Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.
    wrapbooleantrueWhether the carousel should cycle continuously or have hard stops.
    -
    - -

    Methods

    - -

    .carousel(options)

    -

    Initializes the carousel with an optional options object and starts cycling through items.

    -{% highlight js %} -$('.carousel').carousel({ - interval: 2000 -}) -{% endhighlight %} - -

    .carousel('cycle')

    -

    Cycles through the carousel items from left to right.

    - -

    .carousel('pause')

    -

    Stops the carousel from cycling through items.

    - - -

    .carousel(number)

    -

    Cycles the carousel to a particular frame (0 based, similar to an array).

    - -

    .carousel('prev')

    -

    Cycles to the previous item.

    - -

    .carousel('next')

    -

    Cycles to the next item.

    - -

    Events

    -

    Bootstrap's carousel class exposes two events for hooking into carousel functionality.

    -
    - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    slide.bs.carouselThis event fires immediately when the slide instance method is invoked.
    slid.bs.carouselThis event is fired when the carousel has completed its slide transition.
    -
    -{% highlight js %} -$('#myCarousel').on('slide.bs.carousel', function () { - // do something… -}) -{% endhighlight %} -
    - - - - -
    -

    Affix affix.js

    - -

    Example

    -

    The subnavigation on the right is a live demo of the affix plugin.

    - -
    - -

    Usage

    -

    Use the affix plugin via data attributes or manually with your own JavaScript. In both situations, you must provide CSS for the positioning of your content.

    - -

    Positioning via CSS

    -

    The affix plugin toggles between three classes, each representing a particular state: .affix, .affix-top, and .affix-bottom. You must provide the styles for these classes yourself (independent of this plugin) to handle the actual positions.

    -

    Here's how the affix plugin works:

    -
      -
    1. To start, the plugin adds .affix-top to indicate the element is in its top-most position. At this point no CSS positioning is required.
    2. -
    3. Scrolling past the element you want affixed should trigger the actual affixing. This is where .affix replaces .affix-top and sets position: fixed; (provided by Bootstrap's code CSS).
    4. -
    5. If a bottom offset is defined, scrolling past that should replace .affix with .affix-bottom. Since offsets are optional, setting one requires you to set the appropriate CSS. In this case, add position: absolute; when necessary. The plugin uses the data attribute or JavaScript option to determine where to position the element from there.
    6. -
    -

    Follow the above steps to set your CSS for either of the usage options below.

    - -

    Via data attributes

    -

    To easily add affix behavior to any element, just add data-spy="affix" to the element you want to spy on. Use offsets to define when to toggle the pinning of an element.

    - -{% highlight html %} -
    - ... -
    -{% endhighlight %} - -

    Via JavaScript

    -

    Call the affix plugin via JavaScript:

    -{% highlight js %} - $('#my-affix').affix({ - offset: { - top: 100 - , bottom: function () { - return (this.bottom = $('.footer').outerHeight(true)) - } - } - }) -{% endhighlight %} - - -

    Options

    -

    Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset-top="200".

    - -
    - - - - - - - - - - - - - - - - - -
    Nametypedefaultdescription
    offsetnumber | function | object10Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and bottom directions. To provide a unique, bottom and top offset just provide an object offset: { top: 10 } or offset: { top: 10, bottom: 5 }. Use a function when you need to dynamically calculate an offset.
    -
    - - -

    Events

    -

    Bootstrap's affix class exposes a few events for hooking into affix functionality.

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Event TypeDescription
    affix.bs.affixThis event fires immediately before the element has been affixed.
    affixed.bs.affixThis event is fired after the element has been affixed.
    affix-top.bs.affixThis event fires immediately before the element has been affixed-top.
    affixed-top.bs.affixThis event is fired after the element has been affixed-top.
    affix-bottom.bs.affixThis event fires immediately before the element has been affixed-bottom.
    affixed-bottom.bs.affixThis event is fired after the element has been affixed-bottom.
    -
    - -
    +{% include js/overview.html %} +{% include js/transitions.html %} +{% include js/modal.html %} +{% include js/dropdowns.html %} +{% include js/scrollspy.html %} +{% include js/tabs.html %} +{% include js/tooltips.html %} +{% include js/popovers.html %} +{% include js/buttons.html %} +{% include js/collapse.html %} +{% include js/carousel.html %} +{% include js/affix.html %} -- 2.47.2