diff --git a/.gitattributes b/.gitattributes index f5eaf93b5a..f140503687 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,3 +7,9 @@ *.md text eol=lf *.svg text eol=lf *.yml text eol=lf +# Don't diff or textually merge source maps +*.map binary + +bootstrap-theme.css linguist-vendored=false +bootstrap.css linguist-vendored=false +bootstrap.js linguist-vendored=false diff --git a/.travis.yml b/.travis.yml index bb85115f61..c4fea95135 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,12 @@ language: node_js git: depth: 10 node_js: - - "0.10" + - "0.12" before_install: - travis_retry sudo pip install -r test-infra/requirements.txt - rvm use 1.9.3 --fuzzy - export GEMDIR=$(rvm gemdir) - - if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION rouge=$ROUGE_VERSION scss-lint=$SCSS_LINT_VERSION" > pseudo_Gemfile.lock; fi + - if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $GEMDIR) jekyll=$JEKYLL_VERSION rouge=$ROUGE_VERSION" > pseudo_Gemfile.lock; fi - "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\"" - echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export TWBS_DO_VALIDATOR=$?; true - echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true @@ -15,12 +15,14 @@ before_install: install: - npm install -g grunt-cli - ./test-infra/s3_cache.py download npm-modules - - if [ -n "$BUNDLE_GEMFILE" ]; then ./test-infra/s3_cache.py download rubygems; fi + - if [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py download rubygems; fi after_script: - if [ "$TRAVIS_REPO_SLUG" != twbs-savage/bootstrap ] && [ "$TWBS_TEST" = core ]; then ./test-infra/s3_cache.py upload npm-modules; fi - - if [ "$TRAVIS_REPO_SLUG" != twbs-savage/bootstrap ] && [ -n "$BUNDLE_GEMFILE" ]; then ./test-infra/s3_cache.py upload rubygems; fi + - if [ "$TRAVIS_REPO_SLUG" != twbs-savage/bootstrap ] && [ "$TWBS_TEST" = validate-html ] && [ $TWBS_DO_VALIDATOR -ne 0 ]; then ./test-infra/s3_cache.py upload rubygems; fi env: global: + - JEKYLL_VERSION="2.5.3" + - ROUGE_VERSION="1.8.0" - SAUCE_USERNAME="bootstrap" - secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ=" - secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY=" @@ -32,9 +34,8 @@ env: - secure: "PabpUdG2dE40hHUkMCdxk1e9Ak3BOo0h7Y5/uekosLKOz5N60Xmn/ooyrSkvicLthXO4cfONFhO3/xSVRKQOxlUw4on5i0VuNK+QSqxJk0IDaRSZnTCcC8J7083K0YL+FvMdGQwcYwMY9LiwS8aS014IRkSQjsa+mjo3owP+dOU=" - secure: "G4/f4PVyVi9o6UbZMqw9YFmDu7cHqe9iymiXYd1RcnPXwhWAePX12m0PWMhUj5itJ180PTEddVip8PNOgBdqyrDxEPKkcgAW2EElVAPIKJXVfvDW64UjQ0H7NS7XvF7iLQUJp/XfmR7NJ7tT393AQdh8SGmuQpJhgYbwIWbES/k=" matrix: - - TWBS_TEST=core TWBS_SASS=libsass BUNDLE_GEMFILE=test-infra/gemfiles/core.gemfile - - TWBS_TEST=core TWBS_SASS=sass BUNDLE_GEMFILE=test-infra/gemfiles/core.gemfile - - TWBS_TEST=validate-html BUNDLE_GEMFILE=Gemfile + - TWBS_TEST=core + - TWBS_TEST=validate-html - TWBS_TEST=sauce-js-unit matrix: fast_finish: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c654e33729..95a003ecf4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,7 @@ restrictions: Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them: -- `browser bug` - Issues that are reported to us, but actually are the result of a browser-specific bug. These are diagnosed with reduced test cases and result in a issue opened on that browser's own bug tracker. +- `browser bug` - Issues that are reported to us, but actually are the result of a browser-specific bug. These are diagnosed with reduced test cases and result in an issue opened on that browser's own bug tracker. - `confirmed` - Issues that have been confirmed with a reduced test case and identify a bug in Bootstrap. - `css` - Issues stemming from our compiled CSS or source Less files. - `docs` - Issues for improving or updating our documentation. diff --git a/Gruntfile.js b/Gruntfile.js index 37d0b708bb..a934eec88c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -294,8 +294,12 @@ module.exports = function (grunt) { copy: { docs: { - src: 'dist/*/*', - dest: 'docs/' + expand: true, + cwd: 'dist/', + src: [ + '**/*' + ], + dest: 'docs/dist/' } }, @@ -371,7 +375,7 @@ module.exports = function (grunt) { concurrency: 10, maxRetries: 3, maxPollRetries: 4, - urls: ['http://127.0.0.1:3000/js/tests/index.html'], + urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'], browsers: grunt.file.readYAML('grunt/sauce_browsers.yml') } } diff --git a/README.md b/README.md index a509eef0f6..6a28344893 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ Four quick start options are available: - [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.2.zip). - Clone the repo: `git clone https://github.com/twbs/bootstrap.git`. - Install with [Bower](http://bower.io): `bower install bootstrap`. -- Install with [npm](https://www.npmjs.org): `npm install bootstrap`. +- Install with [npm](https://www.npmjs.com): `npm install bootstrap`. +- Install with [Meteor](https://www.meteor.com/): `meteor add twbs:bootstrap`. Read the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more. @@ -92,10 +93,11 @@ Editor preferences are available in the [editor config](https://github.com/twbs/ Keep track of development and community news. -- Follow [@twbootstrap on Twitter](https://twitter.com/twbootstrap). +- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap). - Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com). - Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. - Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3)). +- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/twbs-bootstrap) or similar delivery mechanisms for maximum discoverability. diff --git a/docs/_data/browser-bugs.yml b/docs/_data/browser-bugs.yml index 1feb7c3129..690efef742 100644 --- a/docs/_data/browser-bugs.yml +++ b/docs/_data/browser-bugs.yml @@ -78,6 +78,16 @@ origin: > Offshoot of Bootstrap#8350 & Chromium#337668 +- + browser: > + Chrome (OS X) + summary: > + Caps Lock indicator not shown in `` with `display: block` + upstream_bug: > + Chromium#460200 + origin: > + Bootstrap#15832 + - browser: > Chrome @@ -170,6 +180,16 @@ origin: > Bootstrap#15205 +- + browser: > + Safari (OS X) + summary: > + Caps Lock indicator not shown in `` with `display: block` + upstream_bug: > + WebKit#141804, Safari#19892433 + origin: > + Bootstrap#15832 + - browser: > Safari (iOS) diff --git a/docs/_data/translations.yml b/docs/_data/translations.yml index 0978cd1fe3..2340b99f15 100644 --- a/docs/_data/translations.yml +++ b/docs/_data/translations.yml @@ -11,7 +11,7 @@ - name: French code: fr description: Bootstrap en Français - url: http://www.oneskyapp.com/docs/bootstrap/fr + url: http://www.oneskyapp.com/fr/docs/bootstrap/getting-started/ - name: German code: de @@ -31,12 +31,12 @@ - name: Russian code: ru description: Bootstrap по-русски - url: http://www.oneskyapp.com/docs/bootstrap/ru + url: http://www.oneskyapp.com/ru/docs/bootstrap/ - name: Spanish code: es description: Bootstrap en Español - url: http://www.oneskyapp.com/docs/bootstrap/es + url: http://www.oneskyapp.com/es/docs/bootstrap/ - name: Ukrainian code: uk diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html index 32305cb7cb..10f87af424 100644 --- a/docs/_includes/footer.html +++ b/docs/_includes/footer.html @@ -6,7 +6,7 @@

Designed and built with all the love in the world by @mdo and @fat.

Maintained by the core team with the help of our contributors.

-

Code licensed under MIT, documentation under CC BY 3.0.

+

Code licensed under MIT, documentation under CC BY 3.0.

diff --git a/docs/about/license.md b/docs/about/license.md index 4026241639..24746dbca0 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -7,7 +7,7 @@ Bootstrap is released under the MIT license and is copyright {{ site.time | date #### It requires you to: -* Include the license and copyright notice in your works +* Keep the license and copyright notice included in Bootstrap's CSS and JavaScript files when you use them in your works #### It permits you to: diff --git a/docs/assets/css/src/anchor.css b/docs/assets/css/src/anchor.css new file mode 100644 index 0000000000..69c6f5dcd1 --- /dev/null +++ b/docs/assets/css/src/anchor.css @@ -0,0 +1,60 @@ +/** +* Store the link icon as a base64 embedded icon font. +*/ +@font-face { + font-family: 'anchorjs-link'; + src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8yoAAAC8AAAAYGNtYXDL8RqdAAABHAAAADxnYXNwAAAAEAAAAVgAAAAIZ2x5Zkm2oNUAAAFgAAABWGhlYWQAHd4cAAACuAAAADZoaGVhB3sECwAAAvAAAAAkaG10eAYAAEcAAAMUAAAADGxvY2EACgCsAAADIAAAAAhtYXhwAAYAcAAAAygAAAAgbmFtZUQXtNYAAANIAAABOXBvc3QAAwAAAAAEhAAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAAPA/8D/wAPAAEAAAAAAAA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iMEAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZI/7GAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZIwQkIyMk2iNZXVojBAABAAAAAQAAUf+MUF8PPPUACwQAAAAAAM6jTNMAAAAAzqNM0wAAAAADuQN5AAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAARwO5AAEAAAAAAAAAAAAAAAAAAAADAAAAAAIAAAAEAABHAAAAAAAKAKwAAQAAAAMAbgACAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAA4AAAABAAAAAAACAA4ARwABAAAAAAADAA4AJAABAAAAAAAEAA4AVQABAAAAAAAFABYADgABAAAAAAAGAAcAMgABAAAAAAAKACgAYwADAAEECQABAA4AAAADAAEECQACAA4ARwADAAEECQADAA4AJAADAAEECQAEAA4AVQADAAEECQAFABYADgADAAEECQAGAA4AOQADAAEECQAKACgAYwBpAGMAbwBtAG8AbwBuAFYAZQByAHMAaQBvAG4AIAAwAC4AMABpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuAFIAZQBnAHUAbABhAHIAaQBjAG8AbQBvAG8AbgBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff'); + font-weight: normal; + font-style: normal; +} + +.anchorjs-icon { + font-family: 'anchorjs-link'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Icon Rendering */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/** +* Link placement and hover behavior. +*/ +.anchorjs-link { + float: left; + width: 1em; + height: 1em; + margin-left: -1.2em; + opacity: 0; + color: inherit; + text-align: center; +} + +@media (max-width: 480px) { + .anchorjs-link { + display: none; + } +} + +*:hover > .anchorjs-link, +.anchorjs-link:focus { + opacity: .75; + transition: color .16s linear; +} +*:hover > .anchorjs-link:hover { + opacity: 1; + text-decoration: none; +} +.anchorjs-icon { + font-size: 60%; + vertical-align: .2em; +} +.anchorjs-icon:before { + content: "\e600"; +} diff --git a/docs/assets/js/src/application.js b/docs/assets/js/src/application.js index a349157a2a..df44da5403 100644 --- a/docs/assets/js/src/application.js +++ b/docs/assets/js/src/application.js @@ -9,7 +9,7 @@ * details, see http://creativecommons.org/licenses/by/3.0/. */ -/* global ZeroClipboard */ +/* global ZeroClipboard, addAnchors */ !function ($) { 'use strict'; @@ -153,3 +153,8 @@ }) }(jQuery) + +;(function () { + 'use strict'; + addAnchors('.bs-docs-container h1, .bs-docs-container h2, .bs-docs-container h3, .bs-docs-container h4, .bs-docs-container h5'); +})(); diff --git a/docs/assets/js/vendor/anchor.js b/docs/assets/js/vendor/anchor.js new file mode 100644 index 0000000000..e5ddfa7256 --- /dev/null +++ b/docs/assets/js/vendor/anchor.js @@ -0,0 +1,48 @@ +/*! + * AnchorJS - v0.1.0 - 2014-08-17 + * https://github.com/bryanbraun/anchorjs + * Copyright (c) 2014 Bryan Braun; Licensed MIT + */ + +function addAnchors(selector) { + 'use strict'; + + // Sensible default selector, if none is provided. + if (!selector) { + selector = 'h1, h2, h3, h4, h5, h6'; + } else if (typeof selector !== 'string') { + throw new Error('AnchorJS accepts only strings; you used a ' + typeof selector); + } + + // Select any elements that match the provided selector. + var elements = document.querySelectorAll(selector); + + // Loop through the selected elements. + for (var i = 0; i < elements.length; i++) { + var elementID; + + if (elements[i].hasAttribute('id')) { + elementID = elements[i].getAttribute('id'); + } else { + // We need to create an ID on our element. First, we find which text selection method is available to the browser. + var textMethod = document.body.textContent ? 'textContent' : 'innerText'; + + // Get the text inside our element + var roughText = elements[i][textMethod]; + + // Refine it so it makes a good ID. Makes all lowercase and hyphen separated. + // Ex. Hello World > hello-world + var tidyText = roughText.replace(/\s+/g, '-').toLowerCase(); + + // Assign it to our element. + // Currently the setAttribute element is only supported in IE9 and above. + elements[i].setAttribute('id', tidyText); + + // Grab it for use in our anchor. + elementID = tidyText; + } + var anchor = ''; + + elements[i].innerHTML += anchor; + } +} diff --git a/docs/assets/scss/docs.scss b/docs/assets/scss/docs.scss index 8d22110eb7..f17b1ad22a 100644 --- a/docs/assets/scss/docs.scss +++ b/docs/assets/scss/docs.scss @@ -11,6 +11,7 @@ // Import the syntax highlighting @import "syntax"; +// @import "anchor"; // TODO: move anchor from src to scss directory // Local docs variables $bs-purple: #563d7c; diff --git a/docs/components/helpers.md b/docs/components/helpers.md index 6e5bac3185..844db2d9f7 100644 --- a/docs/components/helpers.md +++ b/docs/components/helpers.md @@ -94,14 +94,14 @@ Set an element to `display: block;` and center via `margin`. Available as a mixi {% endexample %} {% highlight scss %} -// Classes +// Class .center-block { display: block; margin-left: auto; margin-right: auto; } -// Usage as mixins +// Usage as a mixin .element { @include center-block; } @@ -126,7 +126,7 @@ Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes } } -// Usage as a Mixin +// Usage as a mixin .element { @include clearfix; } @@ -151,12 +151,12 @@ The `.invisible` class can be used to toggle only the visibility of an element, {% endhighlight %} {% highlight scss %} -// Classes +// Class .invisible { visibility: hidden; } -// Usage as mixin +// Usage as a mixin .element { .invisible(); } @@ -171,7 +171,7 @@ Hide an element to all devices **except screen readers** with `.sr-only`. Combin {% endhighlight %} {% highlight scss %} -// Usage as a Mixin +// Usage as a mixin .skip-navigation { @include sr-only; @include sr-only-focusable; @@ -187,7 +187,7 @@ Utilize the `.text-hide` class or mixin to help replace an element's text conten {% endhighlight %} {% highlight scss %} -// Usage as a Mixin +// Usage as a mixin .heading { @include text-hide; } diff --git a/docs/content/forms.md b/docs/content/forms.md index f1068a01bb..ac056a8b91 100644 --- a/docs/content/forms.md +++ b/docs/content/forms.md @@ -336,7 +336,7 @@ We remove the default `outline` styles on some form controls and apply a `box-sh ## Disabled states -Add the `disabled` boolean attribute on an ``, ` - - - - - - - -{% endhighlight %} +{% endexample %} {% highlight js %} $('#exampleModal').on('show.bs.modal', function (event) { @@ -336,6 +355,10 @@ $('#exampleModal').on('show.bs.modal', function (event) { }) {% endhighlight %} +## Modals with dynamic heights + +If the height of a modal changes while it is open, you should call `$('#myModal').data('bs.modal').handleUpdate()` to readjust the modal's position in case a scrollbar appears. + ## Usage The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds `.modal-open` to the `` to override default scrolling behavior and generates a `.modal-backdrop` to provide a click area for dismissing shown modals when clicking outside the modal. @@ -423,7 +446,7 @@ Manually hides a modal. **Returns to the caller before the modal has actually be ### Events -Bootstrap's modal class exposes a few events for hooking into modal functionality. +Bootstrap's modal class exposes a few events for hooking into modal functionality. All modal events are fired at the modal itself (i.e. at the `