├── CNAME ├── test-infra ├── requirements.txt ├── sauce_browsers.yml └── s3_cache.py ├── docs ├── assets │ ├── ico │ │ ├── favicon.ico │ │ └── apple-touch-icon-144-precomposed.png │ ├── js │ │ ├── ie8-responsive-file-warning.js │ │ └── application.js │ └── css │ │ └── pygments-manni.css ├── examples │ ├── navbar-fixed-top │ │ ├── navbar-fixed-top.css │ │ └── index.html │ ├── screenshots │ │ ├── blog.jpg │ │ ├── grid.jpg │ │ ├── cover.jpg │ │ ├── navbar.jpg │ │ ├── sign-in.jpg │ │ ├── theme.jpg │ │ ├── carousel.jpg │ │ ├── dashboard.jpg │ │ ├── jumbotron.jpg │ │ ├── offcanvas.jpg │ │ ├── navbar-fixed.jpg │ │ ├── justified-nav.jpg │ │ ├── navbar-static.jpg │ │ ├── non-responsive.jpg │ │ ├── sticky-footer.jpg │ │ ├── jumbotron-narrow.jpg │ │ ├── starter-template.jpg │ │ └── sticky-footer-navbar.jpg │ ├── navbar │ │ ├── navbar.css │ │ └── index.html │ ├── navbar-static-top │ │ ├── navbar-static-top.css │ │ └── index.html │ ├── starter-template │ │ ├── starter-template.css │ │ └── index.html │ ├── jumbotron │ │ ├── jumbotron.css │ │ └── index.html │ ├── offcanvas │ │ ├── offcanvas.js │ │ └── offcanvas.css │ ├── theme │ │ └── theme.css │ ├── grid │ │ └── grid.css │ ├── sticky-footer │ │ ├── sticky-footer.css │ │ └── index.html │ ├── signin │ │ ├── signin.css │ │ └── index.html │ ├── sticky-footer-navbar │ │ ├── sticky-footer-navbar.css │ │ └── index.html │ ├── dashboard │ │ └── dashboard.css │ ├── jumbotron-narrow │ │ ├── jumbotron-narrow.css │ │ └── index.html │ ├── justified-nav │ │ ├── justified-nav.css │ │ └── index.html │ ├── cover │ │ ├── index.html │ │ └── cover.css │ ├── blog │ │ └── blog.css │ ├── non-responsive │ │ ├── non-responsive.css │ │ └── index.html │ └── carousel │ │ └── carousel.css ├── dist │ └── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff ├── _includes │ ├── nav-about.html │ ├── ads.html │ ├── old-bs-docs.html │ ├── social-buttons.html │ ├── nav-main.html │ ├── nav-customize.html │ ├── footer.html │ ├── header.html │ ├── nav-getting-started.html │ └── nav-javascript.html ├── index.html └── _layouts │ ├── home.html │ └── default.html ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.ttf └── glyphicons-halflings-regular.woff ├── dist └── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── .gitattributes ├── .editorconfig ├── js ├── .jshintrc ├── tests │ ├── unit │ │ ├── transition.js │ │ ├── scrollspy.js │ │ ├── affix.js │ │ ├── alert.js │ │ ├── phantom.js │ │ ├── tab.js │ │ └── button.js │ └── index.html ├── .jscs.json ├── transition.js ├── alert.js ├── button.js ├── tab.js ├── popover.js ├── affix.js ├── dropdown.js └── scrollspy.js ├── less ├── .csslintrc ├── component-animations.less ├── wells.less ├── breadcrumbs.less ├── close.less ├── thumbnails.less ├── utilities.less ├── jumbotron.less ├── media.less ├── pager.less ├── badges.less ├── bootstrap.less ├── labels.less ├── code.less ├── alerts.less ├── progress-bars.less ├── print.less ├── pagination.less ├── responsive-utilities.less ├── scaffolding.less ├── grid.less ├── tooltip.less ├── list-group.less ├── popovers.less ├── modals.less ├── buttons.less └── input-groups.less ├── .gitignore ├── bower.json ├── composer.json ├── _config.yml ├── LICENSE ├── package.json └── .travis.yml /CNAME: -------------------------------------------------------------------------------- 1 | getbootstrap.com 2 | -------------------------------------------------------------------------------- /test-infra/requirements.txt: -------------------------------------------------------------------------------- 1 | boto==2.20.0 2 | -------------------------------------------------------------------------------- /docs/assets/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/assets/ico/favicon.ico -------------------------------------------------------------------------------- /docs/examples/navbar-fixed-top/navbar-fixed-top.css: -------------------------------------------------------------------------------- 1 | body { 2 | min-height: 2000px; 3 | padding-top: 70px; 4 | } 5 | -------------------------------------------------------------------------------- /docs/examples/screenshots/blog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/blog.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/grid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/grid.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/cover.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/navbar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/navbar.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/sign-in.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/sign-in.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/theme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/theme.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/carousel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/carousel.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/dashboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/dashboard.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/jumbotron.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/jumbotron.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/offcanvas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/offcanvas.jpg -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/examples/screenshots/navbar-fixed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/navbar-fixed.jpg -------------------------------------------------------------------------------- /dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/examples/screenshots/justified-nav.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/justified-nav.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/navbar-static.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/navbar-static.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/non-responsive.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/non-responsive.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/sticky-footer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/sticky-footer.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/jumbotron-narrow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/jumbotron-narrow.jpg -------------------------------------------------------------------------------- /docs/examples/screenshots/starter-template.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/starter-template.jpg -------------------------------------------------------------------------------- /docs/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /docs/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/examples/navbar/navbar.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 20px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | .navbar { 7 | margin-bottom: 20px; 8 | } 9 | -------------------------------------------------------------------------------- /docs/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /docs/examples/navbar-static-top/navbar-static-top.css: -------------------------------------------------------------------------------- 1 | body { 2 | min-height: 2000px; 3 | } 4 | 5 | .navbar-static-top { 6 | margin-bottom: 19px; 7 | } -------------------------------------------------------------------------------- /docs/examples/screenshots/sticky-footer-navbar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/error2/bootstrap/master/docs/examples/screenshots/sticky-footer-navbar.jpg -------------------------------------------------------------------------------- /docs/examples/starter-template/starter-template.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | } 4 | .starter-template { 5 | padding: 40px 15px; 6 | text-align: center; 7 | } 8 | -------------------------------------------------------------------------------- /docs/examples/jumbotron/jumbotron.css: -------------------------------------------------------------------------------- 1 | /* Move down content because we have a fixed navbar that is 50px tall */ 2 | body { 3 | padding-top: 50px; 4 | padding-bottom: 20px; 5 | } 6 | -------------------------------------------------------------------------------- /docs/examples/offcanvas/offcanvas.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('[data-toggle=offcanvas]').click(function() { 3 | $('.row-offcanvas').toggleClass('active'); 4 | }); 5 | }); -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Enforce Unix newlines 2 | *.css text eol=lf 3 | *.html text eol=lf 4 | *.js text eol=lf 5 | *.json text eol=lf 6 | *.less text eol=lf 7 | *.md text eol=lf 8 | *.yml text eol=lf 9 | -------------------------------------------------------------------------------- /docs/_includes/nav-about.html: -------------------------------------------------------------------------------- 1 |
  • 2 | History 3 |
  • 4 |
  • 5 | Team 6 |
  • 7 |
  • 8 | Community 9 |
  • 10 |
  • 11 | Translations 12 |
  • 13 | -------------------------------------------------------------------------------- /docs/examples/theme/theme.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 70px; 3 | padding-bottom: 30px; 4 | } 5 | 6 | .theme-dropdown .dropdown-menu { 7 | display: block; 8 | position: static; 9 | margin-bottom: 20px; 10 | } 11 | 12 | .theme-showcase > p > .btn { 13 | margin: 5px 0; 14 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | 13 | [*.py] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "asi" : true, 3 | "boss" : true, 4 | "browser" : true, 5 | "curly" : false, 6 | "debug" : true, 7 | "devel" : true, 8 | "eqeqeq" : false, 9 | "eqnull" : true, 10 | "expr" : true, 11 | "laxbreak" : true, 12 | "quotmark" : "single", 13 | "validthis": true 14 | } -------------------------------------------------------------------------------- /docs/_includes/ads.html: -------------------------------------------------------------------------------- 1 |
    2 | -------------------------------------------------------------------------------- /docs/_includes/old-bs-docs.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 | Looking for Bootstrap 2.3.2 docs? 5 | 6 | We've moved it to a new home while we push forward with Bootstrap 3. Read the blog for details. 7 |
    8 |
    9 | -------------------------------------------------------------------------------- /js/tests/unit/transition.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module('transition') 4 | 5 | test('should be defined on jquery support object', function () { 6 | ok($.support.transition !== undefined, 'transition object is defined') 7 | }) 8 | 9 | test('should provide an end object', function () { 10 | ok($.support.transition ? $.support.transition.end : true, 'end string is defined') 11 | }) 12 | 13 | }) 14 | -------------------------------------------------------------------------------- /less/.csslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-sizing": false, 4 | "box-model": false, 5 | "compatible-vendor-prefixes": false, 6 | "floats": false, 7 | "font-sizes": false, 8 | "gradients": false, 9 | "important": false, 10 | "known-properties": false, 11 | "outline-none": false, 12 | "qualified-headings": false, 13 | "regex-selectors": false, 14 | "text-indent": false, 15 | "unique-headings": false, 16 | "universal-selector": false, 17 | "unqualified-attributes": false 18 | } 19 | -------------------------------------------------------------------------------- /docs/examples/grid/grid.css: -------------------------------------------------------------------------------- 1 | .container { 2 | padding-left: 15px; 3 | padding-right: 15px; 4 | } 5 | 6 | h4 { 7 | margin-top: 25px; 8 | } 9 | .row { 10 | margin-bottom: 20px; 11 | } 12 | .row .row { 13 | margin-top: 10px; 14 | margin-bottom: 0; 15 | } 16 | [class*="col-"] { 17 | padding-top: 15px; 18 | padding-bottom: 15px; 19 | background-color: #eee; 20 | border: 1px solid #ddd; 21 | background-color: rgba(86,61,124,.15); 22 | border: 1px solid rgba(86,61,124,.2); 23 | } 24 | 25 | hr { 26 | margin-top: 40px; 27 | margin-bottom: 40px; 28 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore docs files 2 | _gh_pages 3 | _site 4 | .ruby-version 5 | 6 | # Numerous always-ignore extensions 7 | *.diff 8 | *.err 9 | *.orig 10 | *.log 11 | *.rej 12 | *.swo 13 | *.swp 14 | *.zip 15 | *.vi 16 | *~ 17 | 18 | # OS or Editor folders 19 | .DS_Store 20 | ._* 21 | Thumbs.db 22 | .cache 23 | .project 24 | .settings 25 | .tmproj 26 | *.esproj 27 | nbproject 28 | *.sublime-project 29 | *.sublime-workspace 30 | .idea 31 | 32 | # Komodo 33 | *.komodoproject 34 | .komodotools 35 | 36 | # grunt-html-validation 37 | validation-status.json 38 | validation-report.json 39 | 40 | # Folders to ignore 41 | node_modules 42 | bower_components 43 | -------------------------------------------------------------------------------- /docs/assets/js/ie8-responsive-file-warning.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | /*! 5 | * Copyright 2013 Twitter, Inc. 6 | * 7 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 8 | * details, see http://creativecommons.org/licenses/by/3.0/. 9 | */ 10 | // Intended to prevent false-positive bug reports about responsive styling supposedly not working in IE8. 11 | if (window.location.protocol == 'file:') 12 | alert("ERROR: Bootstrap's responsive CSS is disabled!\nSee getbootstrap.com/getting-started/#respond-file-proto for details.") 13 | -------------------------------------------------------------------------------- /less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | &.in { 21 | display: block; 22 | } 23 | } 24 | .collapsing { 25 | position: relative; 26 | height: 0; 27 | overflow: hidden; 28 | .transition(height .35s ease); 29 | } 30 | -------------------------------------------------------------------------------- /less/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "version": "3.0.3", 4 | "main": [ 5 | "./dist/css/bootstrap.css", 6 | "./dist/js/bootstrap.js", 7 | "./dist/fonts/glyphicons-halflings-regular.eot", 8 | "./dist/fonts/glyphicons-halflings-regular.svg", 9 | "./dist/fonts/glyphicons-halflings-regular.ttf", 10 | "./dist/fonts/glyphicons-halflings-regular.woff" 11 | ], 12 | "ignore": [ 13 | "**/.*", 14 | "*.html", 15 | "_*", 16 | "CNAME", 17 | "composer.json", 18 | "CONTRIBUTING.md", 19 | "docs-assets", 20 | "examples", 21 | "js/tests" 22 | ], 23 | "dependencies": { 24 | "jquery": ">= 1.9.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twbs/bootstrap", 3 | "description": "Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.", 4 | "keywords": ["bootstrap", "css"], 5 | "homepage": "http://getbootstrap.com", 6 | "authors": [ 7 | { 8 | "name": "Mark Otto", 9 | "email": "markdotto@gmail.com" 10 | }, 11 | { 12 | "name": "Jacob Thornton", 13 | "email": "jacobthornton@gmail.com" 14 | } 15 | ], 16 | "support": { 17 | "issues": "https://github.com/twbs/bootstrap/issues" 18 | }, 19 | "license": "MIT", 20 | "extra": { 21 | "branch-alias": { 22 | "dev-master": "3.0.x-dev" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | title: Bootstrap 4 | --- 5 | 6 |
    7 |
    8 |

    Bootstrap

    9 |

    Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.

    10 |

    11 | Download Bootstrap 12 | Download source 13 |

    14 |
    15 |
    16 | -------------------------------------------------------------------------------- /less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /less/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(all .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | .img-responsive(); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docs/examples/sticky-footer/sticky-footer.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer styles 2 | -------------------------------------------------- */ 3 | 4 | html, 5 | body { 6 | height: 100%; 7 | /* The html and body elements cannot have any padding or margin. */ 8 | } 9 | 10 | /* Wrapper for page content to push down footer */ 11 | #wrap { 12 | min-height: 100%; 13 | height: auto; 14 | /* Negative indent footer by its height */ 15 | margin: 0 auto -60px; 16 | /* Pad bottom by footer height */ 17 | padding: 0 0 60px; 18 | } 19 | 20 | /* Set the fixed height of the footer here */ 21 | #footer { 22 | height: 60px; 23 | background-color: #f5f5f5; 24 | } 25 | 26 | 27 | /* Custom page CSS 28 | -------------------------------------------------- */ 29 | /* Not required for template or sticky footer method. */ 30 | 31 | .container { 32 | width: auto; 33 | max-width: 680px; 34 | padding: 0 15px; 35 | } 36 | .container .text-muted { 37 | margin: 20px 0; 38 | } 39 | -------------------------------------------------------------------------------- /js/.jscs.json: -------------------------------------------------------------------------------- 1 | { 2 | "disallowKeywords": ["with"], 3 | "requireLeftStickedOperators": [","], 4 | "disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], 5 | "disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], 6 | "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], 7 | "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], 8 | "requireLineFeedAtFileEnd": true, 9 | "requireRightStickedOperators": ["!"], 10 | "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], 11 | "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], 12 | "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], 13 | "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, 14 | "validateLineBreaks": "LF" 15 | } 16 | -------------------------------------------------------------------------------- /docs/examples/signin/signin.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 40px; 3 | padding-bottom: 40px; 4 | background-color: #eee; 5 | } 6 | 7 | .form-signin { 8 | max-width: 330px; 9 | padding: 15px; 10 | margin: 0 auto; 11 | } 12 | .form-signin .form-signin-heading, 13 | .form-signin .checkbox { 14 | margin-bottom: 10px; 15 | } 16 | .form-signin .checkbox { 17 | font-weight: normal; 18 | } 19 | .form-signin .form-control { 20 | position: relative; 21 | font-size: 16px; 22 | height: auto; 23 | padding: 10px; 24 | -webkit-box-sizing: border-box; 25 | -moz-box-sizing: border-box; 26 | box-sizing: border-box; 27 | } 28 | .form-signin .form-control:focus { 29 | z-index: 2; 30 | } 31 | .form-signin input[type="text"] { 32 | margin-bottom: -1px; 33 | border-bottom-left-radius: 0; 34 | border-bottom-right-radius: 0; 35 | } 36 | .form-signin input[type="password"] { 37 | margin-bottom: 10px; 38 | border-top-left-radius: 0; 39 | border-top-right-radius: 0; 40 | } -------------------------------------------------------------------------------- /docs/_includes/social-buttons.html: -------------------------------------------------------------------------------- 1 |
    2 | 16 |
    17 | -------------------------------------------------------------------------------- /less/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | } 57 | -------------------------------------------------------------------------------- /docs/examples/sticky-footer-navbar/sticky-footer-navbar.css: -------------------------------------------------------------------------------- 1 | /* Sticky footer styles 2 | -------------------------------------------------- */ 3 | 4 | html, 5 | body { 6 | height: 100%; 7 | /* The html and body elements cannot have any padding or margin. */ 8 | } 9 | 10 | /* Wrapper for page content to push down footer */ 11 | #wrap { 12 | min-height: 100%; 13 | height: auto; 14 | /* Negative indent footer by its height */ 15 | margin: 0 auto -60px; 16 | /* Pad bottom by footer height */ 17 | padding: 0 0 60px; 18 | } 19 | 20 | /* Set the fixed height of the footer here */ 21 | #footer { 22 | height: 60px; 23 | background-color: #f5f5f5; 24 | } 25 | 26 | 27 | /* Custom page CSS 28 | -------------------------------------------------- */ 29 | /* Not required for template or sticky footer method. */ 30 | 31 | #wrap > .container { 32 | padding: 60px 15px 0; 33 | } 34 | .container .text-muted { 35 | margin: 20px 0; 36 | } 37 | 38 | #footer > .container { 39 | padding-left: 15px; 40 | padding-right: 15px; 41 | } 42 | 43 | code { 44 | font-size: 80%; 45 | } 46 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | markdown: rdiscount 3 | pygments: true 4 | 5 | # Permalinks 6 | permalink: pretty 7 | 8 | # Server 9 | source: ./docs 10 | destination: ./_gh_pages 11 | host: 0.0.0.0 12 | port: 9001 13 | baseurl: / 14 | url: http://localhost:9001 15 | 16 | # Custom vars 17 | current_version: 3.0.3 18 | repo: https://github.com/twbs/bootstrap 19 | 20 | download: 21 | source: https://github.com/twbs/bootstrap/archive/v3.0.3.zip 22 | dist: https://github.com/twbs/bootstrap/releases/download/v3.0.3/bootstrap-3.0.3-dist.zip 23 | 24 | blog: http://blog.getbootstrap.com 25 | expo: http://expo.getbootstrap.com 26 | sass_repo: https://github.com/twbs/bootstrap-sass 27 | 28 | cdn: 29 | css: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css 30 | css_theme: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css 31 | js: //netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js 32 | -------------------------------------------------------------------------------- /less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding; 8 | margin-bottom: @jumbotron-padding; 9 | color: @jumbotron-color; 10 | background-color: @jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: @jumbotron-heading-color; 15 | } 16 | p { 17 | margin-bottom: (@jumbotron-padding / 2); 18 | font-size: @jumbotron-font-size; 19 | font-weight: 200; 20 | } 21 | 22 | .container & { 23 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 24 | } 25 | 26 | .container { 27 | max-width: 100%; 28 | } 29 | 30 | @media screen and (min-width: @screen-sm-min) { 31 | padding-top: (@jumbotron-padding * 1.6); 32 | padding-bottom: (@jumbotron-padding * 1.6); 33 | 34 | .container & { 35 | padding-left: (@jumbotron-padding * 2); 36 | padding-right: (@jumbotron-padding * 2); 37 | } 38 | 39 | h1, 40 | .h1 { 41 | font-size: (@font-size-base * 4.5); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /less/media.less: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /less/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Twitter, Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/examples/offcanvas/offcanvas.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Style tweaks 3 | * -------------------------------------------------- 4 | */ 5 | html, 6 | body { 7 | overflow-x: hidden; /* Prevent scroll on narrow devices */ 8 | } 9 | body { 10 | padding-top: 70px; 11 | } 12 | footer { 13 | padding: 30px 0; 14 | } 15 | 16 | /* 17 | * Off Canvas 18 | * -------------------------------------------------- 19 | */ 20 | @media screen and (max-width: 767px) { 21 | .row-offcanvas { 22 | position: relative; 23 | -webkit-transition: all 0.25s ease-out; 24 | -moz-transition: all 0.25s ease-out; 25 | transition: all 0.25s ease-out; 26 | } 27 | 28 | .row-offcanvas-right 29 | .sidebar-offcanvas { 30 | right: -50%; /* 6 columns */ 31 | } 32 | 33 | .row-offcanvas-left 34 | .sidebar-offcanvas { 35 | left: -50%; /* 6 columns */ 36 | } 37 | 38 | .row-offcanvas-right.active { 39 | right: 50%; /* 6 columns */ 40 | } 41 | 42 | .row-offcanvas-left.active { 43 | left: 50%; /* 6 columns */ 44 | } 45 | 46 | .sidebar-offcanvas { 47 | position: absolute; 48 | top: 0; 49 | width: 50%; /* 6 columns */ 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /less/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | } 32 | 33 | // Hover state, but only for links 34 | a.badge { 35 | &:hover, 36 | &:focus { 37 | color: @badge-link-hover-color; 38 | text-decoration: none; 39 | cursor: pointer; 40 | } 41 | } 42 | 43 | // Account for counters in navs 44 | a.list-group-item.active > .badge, 45 | .nav-pills > .active > a > .badge { 46 | color: @badge-active-color; 47 | background-color: @badge-active-bg; 48 | } 49 | .nav-pills > li > a > .badge { 50 | margin-left: 3px; 51 | } 52 | -------------------------------------------------------------------------------- /less/bootstrap.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "variables.less"; 3 | @import "mixins.less"; 4 | 5 | // Reset 6 | @import "normalize.less"; 7 | @import "print.less"; 8 | 9 | // Core CSS 10 | @import "scaffolding.less"; 11 | @import "type.less"; 12 | @import "code.less"; 13 | @import "grid.less"; 14 | @import "tables.less"; 15 | @import "forms.less"; 16 | @import "buttons.less"; 17 | 18 | // Components 19 | @import "component-animations.less"; 20 | @import "glyphicons.less"; 21 | @import "dropdowns.less"; 22 | @import "button-groups.less"; 23 | @import "input-groups.less"; 24 | @import "navs.less"; 25 | @import "navbar.less"; 26 | @import "breadcrumbs.less"; 27 | @import "pagination.less"; 28 | @import "pager.less"; 29 | @import "labels.less"; 30 | @import "badges.less"; 31 | @import "jumbotron.less"; 32 | @import "thumbnails.less"; 33 | @import "alerts.less"; 34 | @import "progress-bars.less"; 35 | @import "media.less"; 36 | @import "list-group.less"; 37 | @import "panels.less"; 38 | @import "wells.less"; 39 | @import "close.less"; 40 | 41 | // Components w/ JavaScript 42 | @import "modals.less"; 43 | @import "tooltip.less"; 44 | @import "popovers.less"; 45 | @import "carousel.less"; 46 | 47 | // Utility classes 48 | @import "utilities.less"; 49 | @import "responsive-utilities.less"; 50 | -------------------------------------------------------------------------------- /js/tests/unit/scrollspy.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module('scrollspy') 4 | 5 | test('should provide no conflict', function () { 6 | var scrollspy = $.fn.scrollspy.noConflict() 7 | ok(!$.fn.scrollspy, 'scrollspy was set back to undefined (org value)') 8 | $.fn.scrollspy = scrollspy 9 | }) 10 | 11 | test('should be defined on jquery object', function () { 12 | ok($(document.body).scrollspy, 'scrollspy method is defined') 13 | }) 14 | 15 | test('should return element', function () { 16 | ok($(document.body).scrollspy()[0] == document.body, 'document.body returned') 17 | }) 18 | 19 | test('should switch active class on scroll', function () { 20 | var sectionHTML = '
    ' 21 | $section = $(sectionHTML).append('#qunit-fixture'), 22 | topbarHTML = '
    ' + 23 | '
    ' + 24 | '
    ' + 25 | '

    Bootstrap

    ' + 26 | '
  • Overview
  • ' + 27 | '' + 28 | '
    ' + 29 | '
    ' + 30 | '
    ', 31 | $topbar = $(topbarHTML).scrollspy() 32 | 33 | ok($topbar.find('.active', true)) 34 | }) 35 | 36 | }) 37 | -------------------------------------------------------------------------------- /less/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | &[href] { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | white-space: nowrap; 21 | border-radius: @border-radius-base; 22 | } 23 | 24 | // User input typically entered via keyboard 25 | kbd { 26 | padding: 2px 4px; 27 | font-size: 90%; 28 | color: @kbd-color; 29 | background-color: @kbd-bg; 30 | border-radius: @border-radius-small; 31 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 32 | } 33 | 34 | // Blocks of code 35 | pre { 36 | display: block; 37 | padding: ((@line-height-computed - 1) / 2); 38 | margin: 0 0 (@line-height-computed / 2); 39 | font-size: (@font-size-base - 1); // 14px to 13px 40 | line-height: @line-height-base; 41 | word-break: break-all; 42 | word-wrap: break-word; 43 | color: @pre-color; 44 | background-color: @pre-bg; 45 | border: 1px solid @pre-border-color; 46 | border-radius: @border-radius-base; 47 | 48 | // Account for some code outputs that place code tags in pre tags 49 | code { 50 | padding: 0; 51 | font-size: inherit; 52 | color: inherit; 53 | white-space: pre-wrap; 54 | background-color: transparent; 55 | border-radius: 0; 56 | } 57 | } 58 | 59 | // Enable scrollable blocks of code 60 | .pre-scrollable { 61 | max-height: @pre-scrollable-max-height; 62 | overflow-y: scroll; 63 | } 64 | -------------------------------------------------------------------------------- /docs/_layouts/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% include header.html %} 6 | 7 | 8 | Skip to main content 9 | 10 | 11 | {% include nav-main.html %} 12 | 13 | 14 | {{ content }} 15 | 16 | 42 | 43 | 44 | {% include footer.html %} 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /docs/examples/dashboard/dashboard.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Base structure 3 | */ 4 | 5 | /* Move down content because we have a fixed navbar that is 50px tall */ 6 | body { 7 | padding-top: 50px; 8 | } 9 | 10 | 11 | /* 12 | * Global add-ons 13 | */ 14 | 15 | .sub-header { 16 | padding-bottom: 10px; 17 | border-bottom: 1px solid #eee; 18 | } 19 | 20 | 21 | /* 22 | * Sidebar 23 | */ 24 | 25 | /* Hide for mobile, show later */ 26 | .sidebar { 27 | display: none; 28 | } 29 | @media (min-width: 768px) { 30 | .sidebar { 31 | position: fixed; 32 | top: 0; 33 | left: 0; 34 | bottom: 0; 35 | z-index: 1000; 36 | display: block; 37 | padding: 70px 20px 20px; 38 | background-color: #f5f5f5; 39 | border-right: 1px solid #eee; 40 | } 41 | } 42 | 43 | /* Sidebar navigation */ 44 | .nav-sidebar { 45 | margin-left: -20px; 46 | margin-right: -21px; /* 20px padding + 1px border */ 47 | margin-bottom: 20px; 48 | } 49 | .nav-sidebar > li > a { 50 | padding-left: 20px; 51 | padding-right: 20px; 52 | } 53 | .nav-sidebar > .active > a { 54 | color: #fff; 55 | background-color: #428bca; 56 | } 57 | 58 | 59 | /* 60 | * Main content 61 | */ 62 | 63 | .main { 64 | padding: 20px; 65 | } 66 | @media (min-width: 768px) { 67 | .main { 68 | padding-left: 40px; 69 | pading-right: 40px; 70 | } 71 | } 72 | .main .page-header { 73 | margin-top: 0; 74 | } 75 | 76 | 77 | /* 78 | * Placeholder dashboard ideas 79 | */ 80 | 81 | .placeholders { 82 | margin-bottom: 30px; 83 | text-align: center; 84 | } 85 | .placeholders h4 { 86 | margin-bottom: 0; 87 | } 88 | .placeholder { 89 | margin-bottom: 20px; 90 | } 91 | .placeholder img { 92 | border-radius: 50%; 93 | } 94 | -------------------------------------------------------------------------------- /less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: @alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissable alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable { 41 | padding-right: (@alert-padding + 20); 42 | 43 | // Adjust close link position 44 | .close { 45 | position: relative; 46 | top: -2px; 47 | right: -21px; 48 | color: inherit; 49 | } 50 | } 51 | 52 | // Alternate styles 53 | // 54 | // Generate contextual modifier classes for colorizing the alert. 55 | 56 | .alert-success { 57 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 58 | } 59 | .alert-info { 60 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 61 | } 62 | .alert-warning { 63 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 64 | } 65 | .alert-danger { 66 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 67 | } 68 | -------------------------------------------------------------------------------- /js/transition.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: transition.js v3.0.3 3 | * http://getbootstrap.com/javascript/#transitions 4 | * ======================================================================== 5 | * Copyright 2014 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 'use strict'; 11 | 12 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 13 | // ============================================================ 14 | 15 | function transitionEnd() { 16 | var el = document.createElement('bootstrap') 17 | 18 | var transEndEventNames = { 19 | 'WebkitTransition' : 'webkitTransitionEnd', 20 | 'MozTransition' : 'transitionend', 21 | 'OTransition' : 'oTransitionEnd otransitionend', 22 | 'transition' : 'transitionend' 23 | } 24 | 25 | for (var name in transEndEventNames) { 26 | if (el.style[name] !== undefined) { 27 | return { end: transEndEventNames[name] } 28 | } 29 | } 30 | 31 | return false // explicit for ie8 ( ._.) 32 | } 33 | 34 | // http://blog.alexmaccaw.com/css-transitions 35 | $.fn.emulateTransitionEnd = function (duration) { 36 | var called = false, $el = this 37 | $(this).one($.support.transition.end, function () { called = true }) 38 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 39 | setTimeout(callback, duration) 40 | return this 41 | } 42 | 43 | $(function () { 44 | $.support.transition = transitionEnd() 45 | }) 46 | 47 | }(jQuery); 48 | -------------------------------------------------------------------------------- /docs/_includes/nav-main.html: -------------------------------------------------------------------------------- 1 | 38 | -------------------------------------------------------------------------------- /docs/examples/jumbotron-narrow/jumbotron-narrow.css: -------------------------------------------------------------------------------- 1 | /* Space out content a bit */ 2 | body { 3 | padding-top: 20px; 4 | padding-bottom: 20px; 5 | } 6 | 7 | /* Everything but the jumbotron gets side spacing for mobile first views */ 8 | .header, 9 | .marketing, 10 | .footer { 11 | padding-left: 15px; 12 | padding-right: 15px; 13 | } 14 | 15 | /* Custom page header */ 16 | .header { 17 | border-bottom: 1px solid #e5e5e5; 18 | } 19 | /* Make the masthead heading the same height as the navigation */ 20 | .header h3 { 21 | margin-top: 0; 22 | margin-bottom: 0; 23 | line-height: 40px; 24 | padding-bottom: 19px; 25 | } 26 | 27 | /* Custom page footer */ 28 | .footer { 29 | padding-top: 19px; 30 | color: #777; 31 | border-top: 1px solid #e5e5e5; 32 | } 33 | 34 | /* Customize container */ 35 | @media (min-width: 768px) { 36 | .container { 37 | max-width: 730px; 38 | } 39 | } 40 | .container-narrow > hr { 41 | margin: 30px 0; 42 | } 43 | 44 | /* Main marketing message and sign up button */ 45 | .jumbotron { 46 | text-align: center; 47 | border-bottom: 1px solid #e5e5e5; 48 | } 49 | .jumbotron .btn { 50 | font-size: 21px; 51 | padding: 14px 24px; 52 | } 53 | 54 | /* Supporting marketing content */ 55 | .marketing { 56 | margin: 40px 0; 57 | } 58 | .marketing p + h4 { 59 | margin-top: 28px; 60 | } 61 | 62 | /* Responsive: Portrait tablets and up */ 63 | @media screen and (min-width: 768px) { 64 | /* Remove the padding we set earlier */ 65 | .header, 66 | .marketing, 67 | .footer { 68 | padding-left: 0; 69 | padding-right: 0; 70 | } 71 | /* Space out the masthead */ 72 | .header { 73 | margin-bottom: 30px; 74 | } 75 | /* Remove the bottom border on the jumbotron for visual effect */ 76 | .jumbotron { 77 | border-bottom: 0; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /docs/_includes/nav-customize.html: -------------------------------------------------------------------------------- 1 |
  • 2 | LESS components 3 |
  • 4 |
  • 5 | jQuery plugins 6 |
  • 7 |
  • 8 | LESS variables 9 | 37 |
  • 38 |
  • 39 | Download 40 |
  • 41 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development.", 4 | "version": "3.0.3", 5 | "keywords": [ 6 | "bootstrap", 7 | "css" 8 | ], 9 | "homepage": "http://getbootstrap.com", 10 | "author": "Twitter, Inc.", 11 | "scripts": { 12 | "test": "grunt test" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/twbs/bootstrap.git" 17 | }, 18 | "bugs": { 19 | "url": "https://github.com/twbs/bootstrap/issues" 20 | }, 21 | "licenses": [ 22 | { 23 | "type": "MIT", 24 | "url": "https://github.com/twbs/bootstrap/blob/master/LICENSE" 25 | } 26 | ], 27 | "devDependencies": { 28 | "btoa": "~1.1.1", 29 | "grunt": "~0.4.2", 30 | "grunt-banner": "~0.2.0", 31 | "grunt-contrib-clean": "~0.5.0", 32 | "grunt-contrib-concat": "~0.3.0", 33 | "grunt-contrib-connect": "~0.6.0", 34 | "grunt-contrib-copy": "~0.5.0", 35 | "grunt-contrib-csslint": "~0.2.0", 36 | "grunt-contrib-jshint": "~0.8.0", 37 | "grunt-contrib-less": "~0.8.3", 38 | "grunt-contrib-qunit": "~0.3.0", 39 | "grunt-contrib-uglify": "~0.2.7", 40 | "grunt-contrib-watch": "~0.5.3", 41 | "grunt-csscomb": "~2.0.1", 42 | "grunt-html-validation": "~0.1.13", 43 | "grunt-jekyll": "~0.4.1", 44 | "grunt-jscs-checker": "~0.3.0", 45 | "grunt-saucelabs": "~4.1.2", 46 | "grunt-sed": "~0.1.1", 47 | "load-grunt-tasks": "~0.2.1" 48 | }, 49 | "jspm": { 50 | "main": "js/bootstrap", 51 | "directories": { 52 | "example": "examples", 53 | "lib": "dist" 54 | }, 55 | "shim": { 56 | "js/bootstrap": { 57 | "imports": "jquery", 58 | "exports": "$" 59 | } 60 | }, 61 | "buildConfig": { 62 | "uglify": true 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /docs/_includes/footer.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% if page.slug == "customize" %} 11 | 12 | 13 | {% endif %} 14 | 15 | {% comment %} 16 | Inject Twitter widgets asynchronously. Snippet snipped from Twitter's 17 | JS interface site: https://dev.twitter.com/docs/tfw-javascript 18 | 19 | * "js.async=1;" added to add async attribute to the generated script tag. 20 | {% endcomment %} 21 | 29 | 30 | 32 | 44 | -------------------------------------------------------------------------------- /js/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bootstrap Plugin Test Suite 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
    45 |

    Bootstrap Plugin Test Suite

    46 |

    47 |

    48 |
      49 |
      50 |
      51 | 52 | 53 | -------------------------------------------------------------------------------- /js/tests/unit/affix.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module('affix') 4 | 5 | test('should provide no conflict', function () { 6 | var affix = $.fn.affix.noConflict() 7 | ok(!$.fn.affix, 'affix was set back to undefined (org value)') 8 | $.fn.affix = affix 9 | }) 10 | 11 | test('should be defined on jquery object', function () { 12 | ok($(document.body).affix, 'affix method is defined') 13 | }) 14 | 15 | test('should return element', function () { 16 | ok($(document.body).affix()[0] == document.body, 'document.body returned') 17 | }) 18 | 19 | test('should exit early if element is not visible', function () { 20 | var $affix = $('
      ').affix() 21 | $affix.data('bs.affix').checkPosition() 22 | ok(!$affix.hasClass('affix'), 'affix class was not added') 23 | }) 24 | 25 | test('should trigger affixed event after affix', function () { 26 | stop() 27 | 28 | var template = $('
      ') 29 | template.appendTo('body') 30 | 31 | var affixer = $('#affixTarget').affix({ 32 | offset: $('#affixTarget ul').position() 33 | }) 34 | 35 | $('#affixTarget') 36 | .on('affix.bs.affix', function (e) { 37 | ok(true, 'affix event triggered') 38 | }).on('affixed.bs.affix', function (e) { 39 | ok(true,'affixed event triggered') 40 | $('#affixTarget').remove() 41 | $('#affixAfter').remove() 42 | start() 43 | }) 44 | 45 | setTimeout(function () { 46 | window.scrollTo(0, document.body.scrollHeight) 47 | setTimeout(function () { window.scroll(0,0) }, 0) 48 | },0) 49 | }) 50 | }) 51 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.10 4 | before_install: 5 | - time sudo pip install --use-mirrors -r test-infra/requirements.txt 6 | - rvm use 1.9.3 --fuzzy 7 | - if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $(rvm gemdir)) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi 8 | install: 9 | - time npm install -g grunt-cli 10 | - time ./test-infra/s3_cache.py download 'node.js packages' package.json ./node_modules || time npm install 11 | - if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py download rubygems pseudo_Gemfile.lock $(rvm gemdir) || gem install -N jekyll -v $JEKYLL_VERSION; fi 12 | after_script: 13 | - if [ "$TWBS_TEST" = core ]; then time ./test-infra/s3_cache.py upload 'node.js packages' package.json ./node_modules; fi 14 | - if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py upload rubygems pseudo_Gemfile.lock $(rvm gemdir); fi 15 | env: 16 | global: 17 | - JEKYLL_VERSION: 1.4.1 18 | - SAUCE_USERNAME: bootstrap 19 | - secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ=" 20 | - secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY=" 21 | - secure: "Gghh/e3Gsbj1+4RR9Lh2aR/xJl35HWiHqlPIeSUqE9D7uDCVTAwNce/dGL3Ew7uJPfJ6Pgr70wD3zgu3stw0Zmzayax0hiDtGwcQCxVIER08wqGANK9C2Q7PYJkNTNtiTo6ehKWbdV4Z+/U+TEYyQfpQTDbAFYk/vVpsdjp0Lmc=" 22 | - secure: "RTbRdx4G/2OTLfrZtP1VbRljxEmd6A1F3GqXboeQTldsnAlwpsES65es5CE3ub/rmixLApOY9ot7OPmNixFgC2Y8xOsV7lNCC62QVpmqQEDyGFFQKb3yO6/dmwQxdsCqGfzf9Np6Wh5V22QFvr50ZLKLd7Uhd9oXMDIk/z1MJ3o=" 23 | matrix: 24 | - TWBS_TEST=core 25 | - TWBS_TEST=validate-html 26 | - TWBS_TEST=sauce-js-unit 27 | matrix: 28 | fast_finish: true 29 | -------------------------------------------------------------------------------- /less/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // Bar animations 7 | // ------------------------- 8 | 9 | // WebKit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Spec and IE10+ 16 | @keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | 22 | 23 | // Bar itself 24 | // ------------------------- 25 | 26 | // Outer container 27 | .progress { 28 | overflow: hidden; 29 | height: @line-height-computed; 30 | margin-bottom: @line-height-computed; 31 | background-color: @progress-bg; 32 | border-radius: @border-radius-base; 33 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 34 | } 35 | 36 | // Bar of progress 37 | .progress-bar { 38 | float: left; 39 | width: 0%; 40 | height: 100%; 41 | font-size: @font-size-small; 42 | line-height: @line-height-computed; 43 | color: @progress-bar-color; 44 | text-align: center; 45 | background-color: @progress-bar-bg; 46 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 47 | .transition(width .6s ease); 48 | } 49 | 50 | // Striped bars 51 | .progress-striped .progress-bar { 52 | #gradient > .striped(); 53 | background-size: 40px 40px; 54 | } 55 | 56 | // Call animation for the active one 57 | .progress.active .progress-bar { 58 | .animation(progress-bar-stripes 2s linear infinite); 59 | } 60 | 61 | 62 | 63 | // Variations 64 | // ------------------------- 65 | 66 | .progress-bar-success { 67 | .progress-bar-variant(@progress-bar-success-bg); 68 | } 69 | 70 | .progress-bar-info { 71 | .progress-bar-variant(@progress-bar-info-bg); 72 | } 73 | 74 | .progress-bar-warning { 75 | .progress-bar-variant(@progress-bar-warning-bg); 76 | } 77 | 78 | .progress-bar-danger { 79 | .progress-bar-variant(@progress-bar-danger-bg); 80 | } 81 | -------------------------------------------------------------------------------- /docs/examples/signin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Signin Template for Bootstrap 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 |
      32 | 33 |
      34 | 35 | 36 | 37 | 40 | 41 |
      42 | 43 |
      44 | 45 | 46 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /test-infra/sauce_browsers.yml: -------------------------------------------------------------------------------- 1 | [ 2 | # Docs: https://saucelabs.com/docs/platforms/webdriver 3 | 4 | { 5 | browserName: "safari", 6 | platform: "OS X 10.8" 7 | }, 8 | # { # Safari 7 (which requires Mavericks) is not currently supported by Sauce Labs 9 | # browserName: "safari", 10 | # platform: "OS X 10.9" 11 | # }, 12 | { 13 | browserName: "chrome", 14 | platform: "OS X 10.9" 15 | }, 16 | 17 | # { # FIXME: currently fails 1 tooltip test 18 | # browserName: "firefox", 19 | # platform: "OS X 10.9" 20 | # }, 21 | 22 | # Mac Opera not currently supported by Sauce Labs 23 | 24 | # { # FIXME: currently fails 1 tooltip test 25 | # browserName: "internet explorer", 26 | # version: "11", 27 | # platform: "Windows 8.1" 28 | # }, 29 | 30 | # { 31 | # browserName: "internet explorer", 32 | # version: "10", 33 | # platform: "Windows 8" 34 | # }, 35 | # { 36 | # browserName: "internet explorer", 37 | # version: "9", 38 | # platform: "Windows 7" 39 | # }, 40 | # { 41 | # browserName: "internet explorer", 42 | # version: "8", 43 | # platform: "Windows 7" 44 | # }, 45 | 46 | # { # Unofficial 47 | # browserName: "internet explorer", 48 | # version: "7", 49 | # platform: "Windows XP" 50 | # }, 51 | 52 | { 53 | browserName: "chrome", 54 | platform: "Windows 8.1" 55 | }, 56 | { 57 | browserName: "firefox", 58 | platform: "Windows 8.1" 59 | }, 60 | 61 | # Win Opera 15+ not currently supported by Sauce Labs 62 | 63 | { 64 | browserName: "iphone", 65 | platform: "OS X 10.8" 66 | }, 67 | 68 | # iOS Chrome not currently supported by Sauce Labs 69 | 70 | # Linux (unofficial): 71 | { 72 | browserName: "chrome", 73 | platform: "Linux" 74 | }, 75 | { 76 | browserName: "firefox", 77 | platform: "Linux" 78 | } 79 | 80 | # Android Chrome not currently supported by Sauce Labs 81 | 82 | # { # Android Browser (super-unofficial) 83 | # browserName: "android", 84 | # version: "4.0", 85 | # platform: "Linux" 86 | # } 87 | ] 88 | -------------------------------------------------------------------------------- /docs/examples/sticky-footer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Sticky Footer Template for Bootstrap 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 32 |
      33 | 34 | 35 |
      36 | 39 |

      Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.

      40 |

      Use the sticky footer with a fixed navbar if need be, too.

      41 |
      42 |
      43 | 44 | 49 | 50 | 51 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /docs/_includes/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {% if page.title == "Bootstrap" %} 10 | {{ page.title }} 11 | {% else %} 12 | {{ page.title }} · Bootstrap 13 | {% endif %} 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 44 | -------------------------------------------------------------------------------- /less/print.less: -------------------------------------------------------------------------------- 1 | // 2 | // Basic print styles 3 | // -------------------------------------------------- 4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css 5 | 6 | @media print { 7 | 8 | * { 9 | text-shadow: none !important; 10 | color: #000 !important; // Black prints faster: h5bp.com/s 11 | background: transparent !important; 12 | box-shadow: none !important; 13 | } 14 | 15 | a, 16 | a:visited { 17 | text-decoration: underline; 18 | } 19 | 20 | a[href]:after { 21 | content: " (" attr(href) ")"; 22 | } 23 | 24 | abbr[title]:after { 25 | content: " (" attr(title) ")"; 26 | } 27 | 28 | // Don't show links for images, or javascript/internal links 29 | a[href^="javascript:"]:after, 30 | a[href^="#"]:after { 31 | content: ""; 32 | } 33 | 34 | pre, 35 | blockquote { 36 | border: 1px solid #999; 37 | page-break-inside: avoid; 38 | } 39 | 40 | thead { 41 | display: table-header-group; // h5bp.com/t 42 | } 43 | 44 | tr, 45 | img { 46 | page-break-inside: avoid; 47 | } 48 | 49 | img { 50 | max-width: 100% !important; 51 | } 52 | 53 | @page { 54 | margin: 2cm .5cm; 55 | } 56 | 57 | p, 58 | h2, 59 | h3 { 60 | orphans: 3; 61 | widows: 3; 62 | } 63 | 64 | h2, 65 | h3 { 66 | page-break-after: avoid; 67 | } 68 | 69 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 70 | // Once fixed, we can just straight up remove this. 71 | select { 72 | background: #fff !important; 73 | } 74 | 75 | // Bootstrap components 76 | .navbar { 77 | display: none; 78 | } 79 | .table { 80 | td, 81 | th { 82 | background-color: #fff !important; 83 | } 84 | } 85 | .btn, 86 | .dropup > .btn { 87 | > .caret { 88 | border-top-color: #000 !important; 89 | } 90 | } 91 | .label { 92 | border: 1px solid #000; 93 | } 94 | 95 | .table { 96 | border-collapse: collapse !important; 97 | } 98 | .table-bordered { 99 | th, 100 | td { 101 | border: 1px solid #ddd !important; 102 | } 103 | } 104 | 105 | } 106 | -------------------------------------------------------------------------------- /docs/_includes/nav-getting-started.html: -------------------------------------------------------------------------------- 1 |
    1. 2 | Download Bootstrap 3 | 8 |
    2. 9 |
    3. 10 | What's included 11 | 15 |
    4. 16 |
    5. 17 | Basic template 18 |
    6. 19 |
    7. 20 | Examples 21 |
    8. 22 |
    9. 23 | Disabling responsiveness 24 |
    10. 25 |
    11. 26 | Migrating from 2.x to 3.0 27 | 33 |
    12. 34 |
    13. 35 | Browser and device support 36 | 48 |
    14. 49 |
    15. 50 | Third party support 51 |
    16. 52 |
    17. 53 | Accessibility 54 |
    18. 55 |
    19. 56 | License FAQs 57 |
    20. 58 |
    21. 59 | Customizing Bootstrap 60 |
    22. 61 | -------------------------------------------------------------------------------- /js/tests/unit/alert.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module('alert') 4 | 5 | test('should provide no conflict', function () { 6 | var alert = $.fn.alert.noConflict() 7 | ok(!$.fn.alert, 'alert was set back to undefined (org value)') 8 | $.fn.alert = alert 9 | }) 10 | 11 | test('should be defined on jquery object', function () { 12 | ok($(document.body).alert, 'alert method is defined') 13 | }) 14 | 15 | test('should return element', function () { 16 | ok($(document.body).alert()[0] == document.body, 'document.body returned') 17 | }) 18 | 19 | test('should fade element out on clicking .close', function () { 20 | var alertHTML = '
      ' + 21 | '×' + 22 | '

      Holy guacamole! Best check yo self, you\'re not looking too good.

      ' + 23 | '
      ', 24 | alert = $(alertHTML).alert() 25 | 26 | alert.find('.close').click() 27 | 28 | ok(!alert.hasClass('in'), 'remove .in class on .close click') 29 | }) 30 | 31 | test('should remove element when clicking .close', function () { 32 | $.support.transition = false 33 | 34 | var alertHTML = '
      ' + 35 | '×' + 36 | '

      Holy guacamole! Best check yo self, you\'re not looking too good.

      ' + 37 | '
      ', 38 | alert = $(alertHTML).appendTo('#qunit-fixture').alert() 39 | 40 | ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom') 41 | 42 | alert.find('.close').click() 43 | 44 | ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom') 45 | }) 46 | 47 | test('should not fire closed when close is prevented', function () { 48 | $.support.transition = false 49 | stop(); 50 | $('
      ') 51 | .on('close.bs.alert', function (e) { 52 | e.preventDefault(); 53 | ok(true); 54 | start(); 55 | }) 56 | .on('closed.bs.alert', function () { 57 | ok(false); 58 | }) 59 | .alert('close') 60 | }) 61 | 62 | }) 63 | -------------------------------------------------------------------------------- /less/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: @line-height-computed 0; 8 | border-radius: @border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: @padding-base-vertical @padding-base-horizontal; 17 | line-height: @line-height-base; 18 | text-decoration: none; 19 | color: @pagination-color; 20 | background-color: @pagination-bg; 21 | border: 1px solid @pagination-border; 22 | margin-left: -1px; 23 | } 24 | &:first-child { 25 | > a, 26 | > span { 27 | margin-left: 0; 28 | .border-left-radius(@border-radius-base); 29 | } 30 | } 31 | &:last-child { 32 | > a, 33 | > span { 34 | .border-right-radius(@border-radius-base); 35 | } 36 | } 37 | } 38 | 39 | > li > a, 40 | > li > span { 41 | &:hover, 42 | &:focus { 43 | color: @pagination-hover-color; 44 | background-color: @pagination-hover-bg; 45 | border-color: @pagination-hover-border; 46 | } 47 | } 48 | 49 | > .active > a, 50 | > .active > span { 51 | &, 52 | &:hover, 53 | &:focus { 54 | z-index: 2; 55 | color: @pagination-active-color; 56 | background-color: @pagination-active-bg; 57 | border-color: @pagination-active-border; 58 | cursor: default; 59 | } 60 | } 61 | 62 | > .disabled { 63 | > span, 64 | > span:hover, 65 | > span:focus, 66 | > a, 67 | > a:hover, 68 | > a:focus { 69 | color: @pagination-disabled-color; 70 | background-color: @pagination-disabled-bg; 71 | border-color: @pagination-disabled-border; 72 | cursor: not-allowed; 73 | } 74 | } 75 | } 76 | 77 | // Sizing 78 | // -------------------------------------------------- 79 | 80 | // Large 81 | .pagination-lg { 82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); 83 | } 84 | 85 | // Small 86 | .pagination-sm { 87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); 88 | } 89 | -------------------------------------------------------------------------------- /js/tests/unit/phantom.js: -------------------------------------------------------------------------------- 1 | /* 2 | * grunt-contrib-qunit 3 | * http://gruntjs.com/ 4 | * 5 | * Copyright (c) 2013 'Cowboy' Ben Alman, contributors 6 | * Licensed under the MIT license. 7 | */ 8 | 9 | /*global QUnit:true, alert:true*/ 10 | (function () { 11 | 'use strict'; 12 | 13 | // Don't re-order tests. 14 | QUnit.config.reorder = false 15 | // Run tests serially, not in parallel. 16 | QUnit.config.autorun = false 17 | 18 | // Send messages to the parent PhantomJS process via alert! Good times!! 19 | function sendMessage() { 20 | var args = [].slice.call(arguments) 21 | alert(JSON.stringify(args)) 22 | } 23 | 24 | // These methods connect QUnit to PhantomJS. 25 | QUnit.log = function (obj) { 26 | // What is this I don’t even 27 | if (obj.message === '[object Object], undefined:undefined') { return } 28 | // Parse some stuff before sending it. 29 | var actual = QUnit.jsDump.parse(obj.actual) 30 | var expected = QUnit.jsDump.parse(obj.expected) 31 | // Send it. 32 | sendMessage('qunit.log', obj.result, actual, expected, obj.message, obj.source) 33 | } 34 | 35 | QUnit.testStart = function (obj) { 36 | sendMessage('qunit.testStart', obj.name) 37 | } 38 | 39 | QUnit.testDone = function (obj) { 40 | sendMessage('qunit.testDone', obj.name, obj.failed, obj.passed, obj.total) 41 | } 42 | 43 | QUnit.moduleStart = function (obj) { 44 | sendMessage('qunit.moduleStart', obj.name) 45 | } 46 | 47 | QUnit.begin = function () { 48 | sendMessage('qunit.begin') 49 | console.log('Starting test suite') 50 | console.log('================================================\n') 51 | } 52 | 53 | QUnit.moduleDone = function (opts) { 54 | if (opts.failed === 0) { 55 | console.log('\r\u2714 All tests passed in "' + opts.name + '" module') 56 | } else { 57 | console.log('\u2716 ' + opts.failed + ' tests failed in "' + opts.name + '" module') 58 | } 59 | sendMessage('qunit.moduleDone', opts.name, opts.failed, opts.passed, opts.total) 60 | } 61 | 62 | QUnit.done = function (opts) { 63 | console.log('\n================================================') 64 | console.log('Tests completed in ' + opts.runtime + ' milliseconds') 65 | console.log(opts.passed + ' tests of ' + opts.total + ' passed, ' + opts.failed + ' failed.') 66 | sendMessage('qunit.done', opts.failed, opts.passed, opts.total, opts.runtime) 67 | } 68 | 69 | }()) 70 | -------------------------------------------------------------------------------- /less/responsive-utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Responsive: Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // IE10 in Windows (Phone) 8 7 | // 8 | // Support for responsive views via media queries is kind of borked in IE10, for 9 | // Surface/desktop in split view and for Windows Phone 8. This particular fix 10 | // must be accompanied by a snippet of JavaScript to sniff the user agent and 11 | // apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at 12 | // our Getting Started page for more information on this bug. 13 | // 14 | // For more information, see the following: 15 | // 16 | // Issue: https://github.com/twbs/bootstrap/issues/10497 17 | // Docs: http://getbootstrap.com/getting-started/#browsers 18 | // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ 19 | 20 | @-ms-viewport { 21 | width: device-width; 22 | } 23 | 24 | 25 | // Visibility utilities 26 | .visible-xs { 27 | .responsive-invisibility(); 28 | 29 | @media (max-width: @screen-xs-max) { 30 | .responsive-visibility(); 31 | } 32 | } 33 | .visible-sm { 34 | .responsive-invisibility(); 35 | 36 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { 37 | .responsive-visibility(); 38 | } 39 | } 40 | .visible-md { 41 | .responsive-invisibility(); 42 | 43 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { 44 | .responsive-visibility(); 45 | } 46 | } 47 | .visible-lg { 48 | .responsive-invisibility(); 49 | 50 | @media (min-width: @screen-lg-min) { 51 | .responsive-visibility(); 52 | } 53 | } 54 | 55 | .hidden-xs { 56 | @media (max-width: @screen-xs-max) { 57 | .responsive-invisibility(); 58 | } 59 | } 60 | .hidden-sm { 61 | @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { 62 | .responsive-invisibility(); 63 | } 64 | } 65 | .hidden-md { 66 | @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { 67 | .responsive-invisibility(); 68 | } 69 | } 70 | .hidden-lg { 71 | @media (min-width: @screen-lg-min) { 72 | .responsive-invisibility(); 73 | } 74 | } 75 | 76 | 77 | // Print utilities 78 | // 79 | // Media queries are placed on the inside to be mixin-friendly. 80 | 81 | .visible-print { 82 | .responsive-invisibility(); 83 | 84 | @media print { 85 | .responsive-visibility(); 86 | } 87 | } 88 | 89 | .hidden-print { 90 | @media print { 91 | .responsive-invisibility(); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /js/alert.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: alert.js v3.0.3 3 | * http://getbootstrap.com/javascript/#alerts 4 | * ======================================================================== 5 | * Copyright 2014 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 'use strict'; 11 | 12 | // ALERT CLASS DEFINITION 13 | // ====================== 14 | 15 | var dismiss = '[data-dismiss="alert"]' 16 | var Alert = function (el) { 17 | $(el).on('click', dismiss, this.close) 18 | } 19 | 20 | Alert.prototype.close = function (e) { 21 | var $this = $(this) 22 | var selector = $this.attr('data-target') 23 | 24 | if (!selector) { 25 | selector = $this.attr('href') 26 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 27 | } 28 | 29 | var $parent = $(selector) 30 | 31 | if (e) e.preventDefault() 32 | 33 | if (!$parent.length) { 34 | $parent = $this.hasClass('alert') ? $this : $this.parent() 35 | } 36 | 37 | $parent.trigger(e = $.Event('close.bs.alert')) 38 | 39 | if (e.isDefaultPrevented()) return 40 | 41 | $parent.removeClass('in') 42 | 43 | function removeElement() { 44 | $parent.trigger('closed.bs.alert').remove() 45 | } 46 | 47 | $.support.transition && $parent.hasClass('fade') ? 48 | $parent 49 | .one($.support.transition.end, removeElement) 50 | .emulateTransitionEnd(150) : 51 | removeElement() 52 | } 53 | 54 | 55 | // ALERT PLUGIN DEFINITION 56 | // ======================= 57 | 58 | var old = $.fn.alert 59 | 60 | $.fn.alert = function (option) { 61 | return this.each(function () { 62 | var $this = $(this) 63 | var data = $this.data('bs.alert') 64 | 65 | if (!data) $this.data('bs.alert', (data = new Alert(this))) 66 | if (typeof option == 'string') data[option].call($this) 67 | }) 68 | } 69 | 70 | $.fn.alert.Constructor = Alert 71 | 72 | 73 | // ALERT NO CONFLICT 74 | // ================= 75 | 76 | $.fn.alert.noConflict = function () { 77 | $.fn.alert = old 78 | return this 79 | } 80 | 81 | 82 | // ALERT DATA-API 83 | // ============== 84 | 85 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 86 | 87 | }(jQuery); 88 | -------------------------------------------------------------------------------- /less/scaffolding.less: -------------------------------------------------------------------------------- 1 | // 2 | // Scaffolding 3 | // -------------------------------------------------- 4 | 5 | 6 | // Reset the box-sizing 7 | 8 | *, 9 | *:before, 10 | *:after { 11 | .box-sizing(border-box); 12 | } 13 | 14 | 15 | // Body reset 16 | 17 | html { 18 | font-size: 62.5%; 19 | -webkit-tap-highlight-color: rgba(0,0,0,0); 20 | } 21 | 22 | body { 23 | font-family: @font-family-base; 24 | font-size: @font-size-base; 25 | line-height: @line-height-base; 26 | color: @text-color; 27 | background-color: @body-bg; 28 | } 29 | 30 | // Reset fonts for relevant elements 31 | input, 32 | button, 33 | select, 34 | textarea { 35 | font-family: inherit; 36 | font-size: inherit; 37 | line-height: inherit; 38 | } 39 | 40 | 41 | // Links 42 | 43 | a { 44 | color: @link-color; 45 | text-decoration: none; 46 | 47 | &:hover, 48 | &:focus { 49 | color: @link-hover-color; 50 | text-decoration: underline; 51 | } 52 | 53 | &:focus { 54 | .tab-focus(); 55 | } 56 | } 57 | 58 | 59 | // Images 60 | 61 | img { 62 | vertical-align: middle; 63 | } 64 | 65 | // Responsive images (ensure images don't scale beyond their parents) 66 | .img-responsive { 67 | .img-responsive(); 68 | } 69 | 70 | // Rounded corners 71 | .img-rounded { 72 | border-radius: @border-radius-large; 73 | } 74 | 75 | // Image thumbnails 76 | // 77 | // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`. 78 | .img-thumbnail { 79 | padding: @thumbnail-padding; 80 | line-height: @line-height-base; 81 | background-color: @thumbnail-bg; 82 | border: 1px solid @thumbnail-border; 83 | border-radius: @thumbnail-border-radius; 84 | .transition(all .2s ease-in-out); 85 | 86 | // Keep them at most 100% wide 87 | .img-responsive(inline-block); 88 | } 89 | 90 | // Perfect circle 91 | .img-circle { 92 | border-radius: 50%; // set radius in percents 93 | } 94 | 95 | 96 | // Horizontal rules 97 | 98 | hr { 99 | margin-top: @line-height-computed; 100 | margin-bottom: @line-height-computed; 101 | border: 0; 102 | border-top: 1px solid @hr-border; 103 | } 104 | 105 | 106 | // Only display content to screen readers 107 | // 108 | // See: http://a11yproject.com/posts/how-to-hide-content/ 109 | 110 | .sr-only { 111 | position: absolute; 112 | width: 1px; 113 | height: 1px; 114 | margin: -1px; 115 | padding: 0; 116 | overflow: hidden; 117 | clip: rect(0,0,0,0); 118 | border: 0; 119 | } 120 | -------------------------------------------------------------------------------- /less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid-columns-float(xs); 57 | .make-grid(@grid-columns, xs, width); 58 | .make-grid(@grid-columns, xs, pull); 59 | .make-grid(@grid-columns, xs, push); 60 | .make-grid(@grid-columns, xs, offset); 61 | 62 | 63 | // Small grid 64 | // 65 | // Columns, offsets, pushes, and pulls for the small device range, from phones 66 | // to tablets. 67 | 68 | @media (min-width: @screen-sm-min) { 69 | .make-grid-columns-float(sm); 70 | .make-grid(@grid-columns, sm, width); 71 | .make-grid(@grid-columns, sm, pull); 72 | .make-grid(@grid-columns, sm, push); 73 | .make-grid(@grid-columns, sm, offset); 74 | } 75 | 76 | 77 | // Medium grid 78 | // 79 | // Columns, offsets, pushes, and pulls for the desktop device range. 80 | 81 | @media (min-width: @screen-md-min) { 82 | .make-grid-columns-float(md); 83 | .make-grid(@grid-columns, md, width); 84 | .make-grid(@grid-columns, md, pull); 85 | .make-grid(@grid-columns, md, push); 86 | .make-grid(@grid-columns, md, offset); 87 | } 88 | 89 | 90 | // Large grid 91 | // 92 | // Columns, offsets, pushes, and pulls for the large desktop device range. 93 | 94 | @media (min-width: @screen-lg-min) { 95 | .make-grid-columns-float(lg); 96 | .make-grid(@grid-columns, lg, width); 97 | .make-grid(@grid-columns, lg, pull); 98 | .make-grid(@grid-columns, lg, push); 99 | .make-grid(@grid-columns, lg, offset); 100 | } 101 | -------------------------------------------------------------------------------- /docs/_includes/nav-javascript.html: -------------------------------------------------------------------------------- 1 |
    23. 2 | Overview 3 | 10 |
    24. 11 |
    25. Transitions
    26. 12 |
    27. 13 | Modal 14 | 19 |
    28. 20 |
    29. 21 | Dropdown 22 | 26 |
    30. 27 |
    31. 28 | Scrollspy 29 | 33 |
    32. 34 |
    33. 35 | Tab 36 | 40 |
    34. 41 |
    35. 42 | Tooltip 43 | 47 |
    36. 48 |
    37. 49 | Popover 50 | 54 |
    38. 55 |
    39. 56 | Alert 57 | 61 |
    40. 62 |
    41. 63 | Button 64 | 68 |
    42. 69 |
    43. 70 | Collapse 71 | 75 |
    44. 76 |
    45. 77 | Carousel 78 | 82 |
    46. 83 |
    47. 84 | Affix 85 | 89 |
    48. 90 | -------------------------------------------------------------------------------- /docs/examples/justified-nav/justified-nav.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 20px; 3 | } 4 | 5 | .footer { 6 | border-top: 1px solid #eee; 7 | margin-top: 40px; 8 | padding-top: 40px; 9 | padding-bottom: 40px; 10 | } 11 | 12 | /* Main marketing message and sign up button */ 13 | .jumbotron { 14 | text-align: center; 15 | background-color: transparent; 16 | } 17 | .jumbotron .btn { 18 | font-size: 21px; 19 | padding: 14px 24px; 20 | } 21 | 22 | /* Customize the nav-justified links to be fill the entire space of the .navbar */ 23 | 24 | .nav-justified { 25 | background-color: #eee; 26 | border-radius: 5px; 27 | border: 1px solid #ccc; 28 | } 29 | .nav-justified > li > a { 30 | margin-bottom: 0; 31 | padding-top: 15px; 32 | padding-bottom: 15px; 33 | color: #777; 34 | font-weight: bold; 35 | text-align: center; 36 | border-bottom: 1px solid #d5d5d5; 37 | background-color: #e5e5e5; /* Old browsers */ 38 | background-repeat: repeat-x; /* Repeat the gradient */ 39 | background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%); /* FF3.6+ */ 40 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */ 41 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Chrome 10+,Safari 5.1+ */ 42 | background-image: -o-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Opera 11.10+ */ 43 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */ 44 | background-image: linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* W3C */ 45 | } 46 | .nav-justified > .active > a, 47 | .nav-justified > .active > a:hover, 48 | .nav-justified > .active > a:focus { 49 | background-color: #ddd; 50 | background-image: none; 51 | box-shadow: inset 0 3px 7px rgba(0,0,0,.15); 52 | } 53 | .nav-justified > li:first-child > a { 54 | border-radius: 5px 5px 0 0; 55 | } 56 | .nav-justified > li:last-child > a { 57 | border-bottom: 0; 58 | border-radius: 0 0 5px 5px; 59 | } 60 | 61 | @media (min-width: 768px) { 62 | .nav-justified { 63 | max-height: 52px; 64 | } 65 | .nav-justified > li > a { 66 | border-left: 1px solid #fff; 67 | border-right: 1px solid #d5d5d5; 68 | } 69 | .nav-justified > li:first-child > a { 70 | border-left: 0; 71 | border-radius: 5px 0 0 5px; 72 | } 73 | .nav-justified > li:last-child > a { 74 | border-radius: 0 5px 5px 0; 75 | border-right: 0; 76 | } 77 | } 78 | 79 | /* Responsive: Portrait tablets and up */ 80 | @media screen and (min-width: 768px) { 81 | /* Remove the padding we set earlier */ 82 | .masthead, 83 | .marketing, 84 | .footer { 85 | padding-left: 0; 86 | padding-right: 0; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /docs/examples/starter-template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Starter Template for Bootstrap 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 51 | 52 |
      53 | 54 |
      55 |

      Bootstrap starter template

      56 |

      Use this document as a way to quickly start any new project.
      All you get is this text and a mostly barebones HTML document.

      57 |
      58 | 59 |
      60 | 61 | 62 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /docs/examples/cover/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Cover Template for Bootstrap 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 |
      32 | 33 |
      34 | 35 |
      36 | 37 |
      38 |
      39 |

      Cover

      40 | 45 |
      46 |
      47 | 48 |
      49 |

      Cover your page.

      50 |

      Cover is a one-page template for building simple and beautiful home pages. Download, edit the text, and add your own fullscreen background photo to make it your own.

      51 |

      52 | Learn more 53 |

      54 |
      55 | 56 |
      57 |
      58 |

      Cover template for Bootstrap, by @mdo.

      59 |
      60 |
      61 | 62 |
      63 | 64 |
      65 | 66 |
      67 | 68 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /less/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tooltips 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .tooltip { 8 | position: absolute; 9 | z-index: @zindex-tooltip; 10 | display: block; 11 | visibility: visible; 12 | font-size: @font-size-small; 13 | line-height: 1.4; 14 | .opacity(0); 15 | 16 | &.in { .opacity(@tooltip-opacity); } 17 | &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; } 18 | &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; } 19 | &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; } 20 | &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; } 21 | } 22 | 23 | // Wrapper for the tooltip content 24 | .tooltip-inner { 25 | max-width: @tooltip-max-width; 26 | padding: 3px 8px; 27 | color: @tooltip-color; 28 | text-align: center; 29 | text-decoration: none; 30 | background-color: @tooltip-bg; 31 | border-radius: @border-radius-base; 32 | } 33 | 34 | // Arrows 35 | .tooltip-arrow { 36 | position: absolute; 37 | width: 0; 38 | height: 0; 39 | border-color: transparent; 40 | border-style: solid; 41 | } 42 | .tooltip { 43 | &.top .tooltip-arrow { 44 | bottom: 0; 45 | left: 50%; 46 | margin-left: -@tooltip-arrow-width; 47 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 48 | border-top-color: @tooltip-arrow-color; 49 | } 50 | &.top-left .tooltip-arrow { 51 | bottom: 0; 52 | left: @tooltip-arrow-width; 53 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 54 | border-top-color: @tooltip-arrow-color; 55 | } 56 | &.top-right .tooltip-arrow { 57 | bottom: 0; 58 | right: @tooltip-arrow-width; 59 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 60 | border-top-color: @tooltip-arrow-color; 61 | } 62 | &.right .tooltip-arrow { 63 | top: 50%; 64 | left: 0; 65 | margin-top: -@tooltip-arrow-width; 66 | border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0; 67 | border-right-color: @tooltip-arrow-color; 68 | } 69 | &.left .tooltip-arrow { 70 | top: 50%; 71 | right: 0; 72 | margin-top: -@tooltip-arrow-width; 73 | border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width; 74 | border-left-color: @tooltip-arrow-color; 75 | } 76 | &.bottom .tooltip-arrow { 77 | top: 0; 78 | left: 50%; 79 | margin-left: -@tooltip-arrow-width; 80 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 81 | border-bottom-color: @tooltip-arrow-color; 82 | } 83 | &.bottom-left .tooltip-arrow { 84 | top: 0; 85 | left: @tooltip-arrow-width; 86 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 87 | border-bottom-color: @tooltip-arrow-color; 88 | } 89 | &.bottom-right .tooltip-arrow { 90 | top: 0; 91 | right: @tooltip-arrow-width; 92 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 93 | border-bottom-color: @tooltip-arrow-color; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /docs/assets/js/application.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | /*! 6 | * Copyright 2013 Twitter, Inc. 7 | * 8 | * Licensed under the Creative Commons Attribution 3.0 Unported License. For 9 | * details, see http://creativecommons.org/licenses/by/3.0/. 10 | */ 11 | 12 | 13 | !function ($) { 14 | 15 | $(function () { 16 | 17 | // IE10 viewport hack for Surface/desktop Windows 8 bug 18 | // 19 | // See Getting Started docs for more information 20 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 21 | var msViewportStyle = document.createElement('style'); 22 | msViewportStyle.appendChild( 23 | document.createTextNode( 24 | '@-ms-viewport{width:auto!important}' 25 | ) 26 | ); 27 | document.getElementsByTagName('head')[0]. 28 | appendChild(msViewportStyle); 29 | } 30 | 31 | 32 | var $window = $(window) 33 | var $body = $(document.body) 34 | 35 | var navHeight = $('.navbar').outerHeight(true) + 10 36 | 37 | $body.scrollspy({ 38 | target: '.bs-sidebar', 39 | offset: navHeight 40 | }) 41 | 42 | $window.on('load', function () { 43 | $body.scrollspy('refresh') 44 | }) 45 | 46 | $('.bs-docs-container [href=#]').click(function (e) { 47 | e.preventDefault() 48 | }) 49 | 50 | // back to top 51 | setTimeout(function () { 52 | var $sideBar = $('.bs-sidebar') 53 | 54 | $sideBar.affix({ 55 | offset: { 56 | top: function () { 57 | var offsetTop = $sideBar.offset().top 58 | var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) 59 | var navOuterHeight = $('.bs-docs-nav').height() 60 | 61 | return (this.top = offsetTop - navOuterHeight - sideBarMargin) 62 | }, 63 | bottom: function () { 64 | return (this.bottom = $('.bs-footer').outerHeight(true)) 65 | } 66 | } 67 | }) 68 | }, 100) 69 | 70 | setTimeout(function () { 71 | $('.bs-top').affix() 72 | }, 100) 73 | 74 | // tooltip demo 75 | $('.tooltip-demo').tooltip({ 76 | selector: '[data-toggle=tooltip]', 77 | container: 'body' 78 | }) 79 | 80 | $('.tooltip-test').tooltip() 81 | $('.popover-test').popover() 82 | 83 | $('.bs-docs-navbar').tooltip({ 84 | selector: 'a[data-toggle=tooltip]', 85 | container: '.bs-docs-navbar .nav' 86 | }) 87 | 88 | // popover demo 89 | $('[data-toggle=popover]') 90 | .popover() 91 | 92 | // button state demo 93 | $('#loading-example-btn') 94 | .click(function () { 95 | var btn = $(this) 96 | btn.button('loading') 97 | setTimeout(function () { 98 | btn.button('reset') 99 | }, 3000) 100 | }) 101 | }) 102 | 103 | }(jQuery) 104 | -------------------------------------------------------------------------------- /js/tests/unit/tab.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | 3 | module('tabs') 4 | 5 | test('should provide no conflict', function () { 6 | var tab = $.fn.tab.noConflict() 7 | ok(!$.fn.tab, 'tab was set back to undefined (org value)') 8 | $.fn.tab = tab 9 | }) 10 | 11 | test('should be defined on jquery object', function () { 12 | ok($(document.body).tab, 'tabs method is defined') 13 | }) 14 | 15 | test('should return element', function () { 16 | ok($(document.body).tab()[0] == document.body, 'document.body returned') 17 | }) 18 | 19 | test('should activate element by tab id', function () { 20 | var tabsHTML = '' 24 | 25 | $('').appendTo('#qunit-fixture') 26 | 27 | $(tabsHTML).find('li:last a').tab('show') 28 | equal($('#qunit-fixture').find('.active').attr('id'), 'profile') 29 | 30 | $(tabsHTML).find('li:first a').tab('show') 31 | equal($('#qunit-fixture').find('.active').attr('id'), 'home') 32 | }) 33 | 34 | test('should activate element by tab id', function () { 35 | var pillsHTML = '' 39 | 40 | $('').appendTo('#qunit-fixture') 41 | 42 | $(pillsHTML).find('li:last a').tab('show') 43 | equal($('#qunit-fixture').find('.active').attr('id'), 'profile') 44 | 45 | $(pillsHTML).find('li:first a').tab('show') 46 | equal($('#qunit-fixture').find('.active').attr('id'), 'home') 47 | }) 48 | 49 | 50 | test('should not fire closed when close is prevented', function () { 51 | $.support.transition = false 52 | stop(); 53 | $('
      ') 54 | .on('show.bs.tab', function (e) { 55 | e.preventDefault(); 56 | ok(true); 57 | start(); 58 | }) 59 | .on('shown.bs.tab', function () { 60 | ok(false); 61 | }) 62 | .tab('show') 63 | }) 64 | 65 | test('show and shown events should reference correct relatedTarget', function () { 66 | var dropHTML = '' 74 | 75 | $(dropHTML).find('ul>li:first a').tab('show').end() 76 | .find('ul>li:last a').on('show', function (event) { 77 | equal(event.relatedTarget.hash, '#1-1') 78 | }).on('shown', function (event) { 79 | equal(event.relatedTarget.hash, '#1-1') 80 | }).tab('show') 81 | }) 82 | 83 | }) 84 | -------------------------------------------------------------------------------- /less/list-group.less: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // 8 | // Easily usable on