Skip to content

Commit

Permalink
Merge branch 'master' into v4
Browse files Browse the repository at this point in the history
Conflicts:
	.gitignore
	Gruntfile.js
	_config.yml
	dist/css/bootstrap-theme.css
	dist/css/bootstrap-theme.min.css
	dist/css/bootstrap.css
	dist/css/bootstrap.css.map
	dist/css/bootstrap.min.css
	dist/js/bootstrap.js
	dist/js/bootstrap.min.js
	docs/_includes/components/navbar.html
	docs/_includes/components/progress-bars.html
	docs/_includes/css/grid.html
	docs/_includes/css/overview.html
	docs/_includes/customizer-variables.html
	docs/_includes/getting-started/accessibility.html
	docs/_includes/getting-started/browser-device-support.html
	docs/_includes/getting-started/community.html
	docs/_includes/getting-started/disabling-responsiveness.html
	docs/_includes/getting-started/download.html
	docs/_includes/getting-started/examples.html
	docs/_includes/getting-started/license.html
	docs/_includes/getting-started/third-party-support.html
	docs/_includes/js/alerts.html
	docs/_includes/js/buttons.html
	docs/_includes/js/carousel.html
	docs/_includes/js/collapse.html
	docs/_includes/js/dropdowns.html
	docs/_includes/js/modal.html
	docs/_includes/js/popovers.html
	docs/_includes/js/scrollspy.html
	docs/_includes/js/tabs.html
	docs/_includes/js/tooltips.html
	docs/_includes/js/transitions.html
	docs/_includes/nav/javascript.html
	docs/_includes/nav/main.html
	docs/about.html
	docs/assets/css/docs.min.css
	docs/assets/css/src/docs.css
	docs/assets/js/customize.min.js
	docs/assets/js/raw-files.min.js
	docs/assets/js/src/customizer.js
	docs/dist/css/bootstrap-theme.css
	docs/dist/css/bootstrap-theme.min.css
	docs/dist/css/bootstrap.css
	docs/dist/css/bootstrap.css.map
	docs/dist/css/bootstrap.min.css
	docs/dist/js/bootstrap.js
	docs/dist/js/bootstrap.min.js
	docs/migration.html
	js/affix.js
	js/alert.js
	js/button.js
	js/carousel.js
	js/collapse.js
	js/dropdown.js
	js/modal.js
	js/popover.js
	js/scrollspy.js
	js/tab.js
	js/tests/unit/affix.js
	js/tests/unit/button.js
	js/tests/unit/carousel.js
	js/tests/unit/modal.js
	js/tests/unit/tooltip.js
	js/tests/visual/modal.html
	js/tooltip.js
	less/component-animations.less
	less/jumbotron.less
	less/mixins/background-variant.less
	less/mixins/buttons.less
	less/mixins/responsive-visibility.less
	less/mixins/text-emphasis.less
	less/navbar.less
	less/navs.less
	less/scaffolding.less
	less/tooltip.less
	less/utilities.less
	less/variables.less
	package.json
	scss/_buttons.scss
	scss/_forms.scss
	scss/_modal.scss
  • Loading branch information
mdo committed Mar 29, 2015
2 parents 321c3b6 + ce75f28 commit 58082cd
Show file tree
Hide file tree
Showing 38 changed files with 1,054 additions and 361 deletions.
5 changes: 4 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ module.exports = function (grunt) {

cssmin: {
options: {
// TODO: disable `zeroUnits` optimization once clean-css 3.2 is released
// and then simplify the fix for https://github.com/twbs/bootstrap/issues/14837 accordingly
compatibility: 'ie8',
keepSpecialComments: '*',
noAdvanced: true
},
Expand Down Expand Up @@ -341,7 +344,7 @@ module.exports = function (grunt) {
watch: {
src: {
files: '<%= jshint.core.src %>',
tasks: ['jshint:src', 'qunit', 'concat']
tasks: ['jshint:core', 'qunit', 'concat']
},
test: {
files: '<%= jshint.test.src %>',
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ To get started, check out <http://getbootstrap.com>!

## Quick start

Four quick start options are available:
Several quick start options are available:

- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.2.zip).
- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.4.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.com): `npm install bootstrap`.
- Install with [Meteor](https://www.meteor.com/): `meteor add twbs:bootstrap`.
- Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap`.
- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap`.

Read the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.

Expand Down Expand Up @@ -83,7 +84,7 @@ Documentation for v2.3.2 has been made available for the time being at <http://g

Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.

Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).

Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.

Expand All @@ -97,7 +98,7 @@ Keep track of development and community news.
- 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.
- 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/bootstrap) or similar delivery mechanisms for maximum discoverability.



Expand Down
10 changes: 5 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ repo: https://github.com/twbs/bootstrap
sass_repo: https://github.com/twbs/bootstrap-sass

download:
source: https://github.com/twbs/bootstrap/archive/v3.3.2.zip
dist: https://github.com/twbs/bootstrap/releases/download/v3.3.2/bootstrap-3.3.2-dist.zip
sass: https://github.com/twbs/bootstrap-sass/archive/v3.3.2.tar.gz
source: https://github.com/twbs/bootstrap/archive/v3.3.4.zip
dist: https://github.com/twbs/bootstrap/releases/download/v3.3.4/bootstrap-3.3.4-dist.zip
sass: https://github.com/twbs/bootstrap-sass/archive/v3.3.4.tar.gz

blog: http://blog.getbootstrap.com
expo: http://expo.getbootstrap.com

cdn:
css: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css
js: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js
css: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css
js: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js
jquery: //code.jquery.com/jquery-2.1.1.min.js

bug:
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"version": "3.3.2",
"version": "3.3.4",
"keywords": [
"css",
"js",
Expand Down
10 changes: 10 additions & 0 deletions docs/_data/browser-bugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@
origin: >
Bootstrap#14409
-
browser: >
Chrome
summary: >
`:focus` `outline` style causes cursor to not be displayed when toggling a `readonly` `<input>` to read-write.
upstream_bug: >
Chromium#465274
origin: >
Bootstrap#16022
-
browser: >
Chrome (Windows & Linux)
Expand Down
5 changes: 5 additions & 0 deletions docs/_data/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@
code: uk
description: Bootstrap українською
url: http://twbs.docs.org.ua

- name: Vietnamese
code: vi
description: Bootstrap bằng tiếng Việt
url: http://getbootstrap.com.vn
2 changes: 1 addition & 1 deletion docs/about/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Originally created by a designer and a developer at Twitter, Bootstrap has becom

Bootstrap was created at Twitter in mid-2010 by [@mdo](https://twitter.com/mdo) and [@fat](https://twitter.com/fat). Prior to being an open-sourced framework, Bootstrap was known as _Twitter Blueprint_. A few months into development, Twitter held its [first Hack Week](https://blog.twitter.com/2010/hack-week) and the project exploded as developers of all skill levels jumped in without any external guidance. It served as the style guide for internal tools development at the company for over a year before its public release, and continues to do so today.

Originally [released](https://dev.twitter.com/blog/bootstrap-twitter) on [<time datetime="2011-08-19 11:25">Friday, August 19, 2011</time>](https://twitter.com/mdo/statuses/104620039650557952), we've since had over [twenty releases](https://github.com/twbs/bootstrap/releases), including two major rewrites with v2 and v3. With Bootstrap 2, we added responsive functionality to the entire framework as an optional stylesheet. Building on that with Bootstrap 3, we rewrote the library once more to make it responsive by default with a mobile first approach.
Originally [released](https://blog.twitter.com/2011/bootstrap-twitter) on [<time datetime="2011-08-19 11:25">Friday, August 19, 2011</time>](https://twitter.com/mdo/statuses/104620039650557952), we've since had over [twenty releases](https://github.com/twbs/bootstrap/releases), including two major rewrites with v2 and v3. With Bootstrap 2, we added responsive functionality to the entire framework as an optional stylesheet. Building on that with Bootstrap 3, we rewrote the library once more to make it responsive by default with a mobile first approach.
6 changes: 3 additions & 3 deletions docs/getting-started/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Accessibility

Bootstrap follows common web standards and—with minimal extra effort—can be used to create sites that are accessible to those using <abbr title="Assistive Technology" class="initialism">AT</abbr>.

### Skip navigation
## Skip navigation

If your navigation contains many links and comes before the main content in the DOM, add a `Skip to main content` link before the navigation (for a simple explanation, see this [A11Y Project article on skip navigation links](http://a11yproject.com/posts/skip-nav-links/)). Using the `.sr-only` class will visually hide the skip link, and the <code>.sr-only-focusable</code> class will ensure that the link becomes visible once focused (for sighted keyboard users).

Expand All @@ -25,13 +25,13 @@ If your navigation contains many links and comes before the main content in the
</body>
{% endhighlight %}

### Nested headings
## Nested headings

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

Learn more at [HTML CodeSniffer](http://squizlabs.github.io/HTML_CodeSniffer/Standards/Section508/) and [Penn State's Accessability](http://accessibility.psu.edu/headings).

### Additional resources
## Additional resources

- ["HTML Codesniffer" bookmarklet for identifying accessibility issues](https://github.com/squizlabs/HTML_CodeSniffer)
- [The A11Y Project](http://a11yproject.com/)
Expand Down
13 changes: 13 additions & 0 deletions docs/getting-started/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ Bootstrap's `package.json` contains some additional metadata under the following
- `less` - path to Bootstrap's main [Less](http://lesscss.org) source file
- `style` - path to Bootstrap's non-minified CSS that's been precompiled using the default settings (no customization)

### Meteor

{% highlight bash %}
$ meteor add twbs:bootstrap
{% endhighlight %}

### Composer

{% highlight bash %}
$ composer require twbs/bootstrap
{% endhighlight %}


### Autoprefixer required

Bootstrap uses [Autoprefixer](https://github.com/postcss/autoprefixer) to deal with [CSS vendor prefixes](http://webdesign.about.com/od/css/a/css-vendor-prefixes.htm). If you're compiling Bootstrap from its source Sass and not using our Gruntfile, you'll need to integrate Autoprefixer into your build process yourself. If you're using precompiled Bootstrap or using our Gruntfile, you don't need to worry about this as Autoprefixer is already integrated into our Gruntfile.
28 changes: 14 additions & 14 deletions docs/getting-started/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Supported platforms

Bootstrap is built to work best with the latest techniques. As such, older desktop and mobile browsers may display differently, but should remain fully functional.

### Supported browsers
## Supported browsers

Bootstrap supports the **latest, stable releases** of all major browsers and platforms. On Windows, **we support Internet Explorer 9-11**. More specific support information is provided below.

Expand Down Expand Up @@ -65,7 +65,7 @@ Unofficially, Bootstrap should look and behave well enough in Chromium and Chrom

For a list of some of the browser bugs that Bootstrap has to grapple with, see our [Wall of browser bugs](../browser-bugs/).

### Internet Explorer 9
## Internet Explorer 9

Internet Explorer 9 is also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported.

Expand Down Expand Up @@ -104,7 +104,7 @@ Internet Explorer 9 is also supported, however, please be aware that some CSS3 p

Visit [Can I use...](http://caniuse.com/) for details on browser support of CSS3 and HTML5 features.

### Supporting Internet Explorer 8
## Supporting Internet Explorer 8

As of v4, Bootstrap no longer supports IE8. **If you require IE8 support, we recommend you use Bootstrap 3.** It's still supported by our team for bugfixes and documentation changes, but no new features will be added to it.

Expand All @@ -114,7 +114,7 @@ Alternatively, you can add the some third party JavaScript to backfill support f
* [Respond.js](https://github.com/scottjehl/Respond)
* [Rem unit polyfill](https://github.com/chuckcarpenter/REM-unit-polyfill)

### IE Compatibility modes
## IE Compatibility modes

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

Expand All @@ -128,7 +128,7 @@ This tag is included in all of Bootstrap's documentation and examples to ensure

See [this StackOverflow question](http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge) for more information.

### Internet Explorer 10 in Windows Phone 8
## Internet Explorer 10 in Windows Phone 8

Internet Explorer 10 in Windows Phone 8 versions older than [Update 3 (a.k.a. GDR3)](http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/10/14/introducing-windows-phone-preview-for-developers.aspx) doesn't differentiate **device width** from **viewport width** in `@-ms-viewport` at-rules, and thus doesn't properly apply the media queries in Bootstrap's CSS. To address this, you'll need to **include the following JavaScript to work around the bug**.

Expand All @@ -148,30 +148,30 @@ For more information and usage guidelines, read [Windows Phone 8 and Device-Widt

As a heads up, we include this in all of Bootstrap's documentation and examples as a demonstration.

### Modals, navbars, and virtual keyboards
## Modals, navbars, and virtual keyboards

#### Overflow and scrolling
### Overflow and scrolling

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

#### Virtual keyboards
### Virtual keyboards

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

#### Navbar Dropdowns
### Navbar Dropdowns

The `.dropdown-backdrop` element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or [any other element which will fire a click event in iOS](https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile)).

### Browser zooming
## Browser zooming

Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.

### Sticky `:hover`/`:focus` on mobile
## Sticky `:hover`/`:focus` on mobile
Even though real hovering isn't possible on most touchscreens, most mobile browsers emulate hovering support and make `:hover` "sticky". In other words, `:hover` styles start applying after tapping an element and only stop applying after the user taps some other element. On mobile-first sites, this behavior is normally undesirable.

Bootstrap includes a workaround for this, although it is disabled by default. By setting `$use-hover-media-query` to `true` when compiling from Sass, Bootstrap will use [mq4-hover-shim](https://github.com/twbs/mq4-hover-shim) to disable `:hover` styles in browsers that emulate hovering, thus preventing sticky `:hover` styles. There are some caveats to this workaround; see the shim's documentation for details.

### Printing
## Printing

Even in some modern browsers, printing can be quirky.

Expand All @@ -187,7 +187,7 @@ Also, as of Safari v8.0, fixed-width <code>.container</code>s can cause Safari t
}
{% endhighlight %}

### Android stock browser
## Android stock browser

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

Expand All @@ -209,7 +209,7 @@ $(function () {

Want to see an example? [Check out this JS Bin demo.](http://jsbin.com/OyaqoDO/2)

### Validators
## Validators

In order to provide the best possible experience to old and buggy browsers, Bootstrap uses [CSS browser hacks](http://browserhacks.com) in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/third-party-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Third party support

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

### Box-sizing
## Box-sizing

Some third-party software, including Google Maps and Google Custom Search Engine, conflict with Bootstrap due to `* { box-sizing: border-box; }`, a rule which makes it so `padding` does not affect the final computed width of an element. These widgets expect the box model to be `content-box` instead. Learn more about [box model and sizing at CSS Tricks](http://css-tricks.com/box-sizing/).

Expand Down
1 change: 1 addition & 0 deletions js/.jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforeBinaryOperators": [","],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
Expand Down
61 changes: 61 additions & 0 deletions js/tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## How does Bootstrap's test suite work?

Bootstrap uses [QUnit](http://api.qunitjs.com/), a powerful, easy-to-use JavaScript unit test framework. Each plugin has a file dedicated to its tests in `unit/<plugin-name>.js`.

* `unit/` contains the unit test files for each Bootstrap plugin.
* `vendor/` contains third-party testing-related code (QUnit and jQuery).
* `visual/` contains "visual" tests which are run interactively in real browsers and require manual verification by humans.

To run the unit test suite via [PhantomJS](http://phantomjs.org/), run `grunt test-js`.

To run the unit test suite via a real web browser, open `index.html` in the browser.


## How do I add a new unit test?

1. Locate and open the file dedicated to the plugin which you need to add tests to (`unit/<plugin-name>.js`).
2. Review the [QUnit API Documentation](http://api.qunitjs.com/) and use the existing tests as references for how to structure your new tests.
3. Write the necessary unit test(s) for the new or revised functionality.
4. Run `grunt test-js` to see the results of your newly-added test(s).

**Note:** Your new unit tests should fail before your changes are applied to the plugin, and should pass after your changes are applied to the plugin.

## What should a unit test look like?

* Each test should have a unique name clearly stating what unit is being tested.
* Each test should test only one unit per test, although one test can include several assertions. Create multiple tests for multiple units of functionality.
* Each test should begin with [`assert.expect`](http://api.qunitjs.com/expect/) to ensure that the expected assertions are run.
* Each test should follow the project's [JavaScript Code Guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#js)

### Example tests

```javascript
// Synchronous test
QUnit.test('should describe the unit being tested', function (assert) {
assert.expect(1)
var templateHTML = '<div class="alert alert-danger fade in">'
+ '<a class="close" href="#" data-dismiss="alert">×</a>'
+ '<p><strong>Template necessary for the test.</p>'
+ '</div>'
var $alert = $(templateHTML).appendTo('#qunit-fixture').bootstrapAlert()

$alert.find('.close').click()

// Make assertion
assert.strictEqual($alert.hasClass('in'), false, 'remove .in class on .close click')
})

// Asynchronous test
QUnit.test('should describe the unit being tested', function (assert) {
assert.expect(1)
var done = assert.async()

$('<div title="tooltip title"></div>')
.appendTo('#qunit-fixture')
.on('shown.bs.tooltip', function () {
assert.ok(true, '"shown" event was fired after calling "show"')
done()
})
.bootstrapTooltip('show')
})
```
Loading

0 comments on commit 58082cd

Please sign in to comment.