0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-03-13 13:29:25 +01:00

Merge branch 'master' into docs_derp

Conflicts:
	_layouts/default.html
	components.html
This commit is contained in:
Mark Otto 2013-12-21 11:17:29 -08:00
commit 02c40ab991
29 changed files with 931 additions and 551 deletions

View File

@ -1,290 +1,290 @@
{
"always-semicolon": true,
"block-indent": 2,
"colon-space": true,
"color-case": "lower",
"color-shorthand": true,
"combinator-space": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,
"remove-empty-rulesets": true,
"rule-indent": 2,
"stick-brace": true,
"strip-spaces": true,
"unitless-zero": true,
"vendor-prefix-align": true,
"sort-order": [
[
"position",
"top",
"right",
"bottom",
"left",
"z-index",
"display",
"float",
"width",
"min-width",
"max-width",
"height",
"min-height",
"max-height",
"-webkit-box-sizing",
"-moz-box-sizing",
"box-sizing",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"margin",
"margin-top",
"margin-right",
"margin-bottom",
"margin-left",
"overflow",
"overflow-x",
"overflow-y",
"-ms-overflow-x",
"-ms-overflow-y",
"clip",
"clear",
"font",
"font-family",
"font-size",
"font-style",
"font-weight",
"font-variant",
"font-size-adjust",
"font-stretch",
"font-effect",
"font-emphasize",
"font-emphasize-position",
"font-emphasize-style",
"font-smooth",
"-webkit-hyphens",
"-moz-hyphens",
"hyphens",
"line-height",
"color",
"text-align",
"-webkit-text-align-last",
"-moz-text-align-last",
"-ms-text-align-last",
"text-align-last",
"text-emphasis",
"text-emphasis-color",
"text-emphasis-style",
"text-emphasis-position",
"text-decoration",
"text-indent",
"text-justify",
"text-outline",
"-ms-text-overflow",
"text-overflow",
"text-overflow-ellipsis",
"text-overflow-mode",
"text-shadow",
"text-transform",
"text-wrap",
"letter-spacing",
"-ms-word-break",
"word-break",
"word-spacing",
"-ms-word-wrap",
"word-wrap",
"-moz-tab-size",
"-o-tab-size",
"tab-size",
"white-space",
"vertical-align",
"list-style",
"list-style-position",
"list-style-type",
"list-style-image",
"pointer-events",
"cursor",
"visibility",
"zoom",
"flex-direction",
"flex-order",
"flex-pack",
"flex-align",
"table-layout",
"empty-cells",
"caption-side",
"border-spacing",
"border-collapse",
"content",
"quotes",
"counter-reset",
"counter-increment",
"resize",
"-webkit-user-select",
"-moz-user-select",
"-ms-user-select",
"user-select",
"nav-index",
"nav-up",
"nav-right",
"nav-down",
"nav-left",
"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
"background",
"background-color",
"-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
"filter:progid:DXImageTransform.Microsoft.gradient",
"background-image",
"background-repeat",
"background-attachment",
"background-position",
"background-position-x",
"background-position-y",
"-webkit-background-clip",
"-moz-background-clip",
"background-clip",
"background-origin",
"-webkit-background-size",
"-moz-background-size",
"-o-background-size",
"background-size",
"border",
"border-color",
"border-style",
"border-width",
"border-top",
"border-top-color",
"border-top-style",
"border-top-width",
"border-right",
"border-right-color",
"border-right-style",
"border-right-width",
"border-bottom",
"border-bottom-color",
"border-bottom-style",
"border-bottom-width",
"border-left",
"border-left-color",
"border-left-style",
"border-left-width",
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"-webkit-border-image",
"-moz-border-image",
"-o-border-image",
"border-image",
"-webkit-border-image-source",
"-moz-border-image-source",
"-o-border-image-source",
"border-image-source",
"-webkit-border-image-slice",
"-moz-border-image-slice",
"-o-border-image-slice",
"border-image-slice",
"-webkit-border-image-width",
"-moz-border-image-width",
"-o-border-image-width",
"border-image-width",
"-webkit-border-image-outset",
"-moz-border-image-outset",
"-o-border-image-outset",
"border-image-outset",
"-webkit-border-image-repeat",
"-moz-border-image-repeat",
"-o-border-image-repeat",
"border-image-repeat",
"outline",
"outline-width",
"outline-style",
"outline-color",
"outline-offset",
"-webkit-box-shadow",
"-moz-box-shadow",
"box-shadow",
"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity",
"-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
"opacity",
"-ms-interpolation-mode",
"-webkit-transition",
"-moz-transition",
"-ms-transition",
"-o-transition",
"transition",
"-webkit-transition-delay",
"-moz-transition-delay",
"-ms-transition-delay",
"-o-transition-delay",
"transition-delay",
"-webkit-transition-timing-function",
"-moz-transition-timing-function",
"-ms-transition-timing-function",
"-o-transition-timing-function",
"transition-timing-function",
"-webkit-transition-duration",
"-moz-transition-duration",
"-ms-transition-duration",
"-o-transition-duration",
"transition-duration",
"-webkit-transition-property",
"-moz-transition-property",
"-ms-transition-property",
"-o-transition-property",
"transition-property",
"-webkit-transform",
"-moz-transform",
"-ms-transform",
"-o-transform",
"transform",
"-webkit-transform-origin",
"-moz-transform-origin",
"-ms-transform-origin",
"-o-transform-origin",
"transform-origin",
"-webkit-animation",
"-moz-animation",
"-ms-animation",
"-o-animation",
"animation",
"-webkit-animation-name",
"-moz-animation-name",
"-ms-animation-name",
"-o-animation-name",
"animation-name",
"-webkit-animation-duration",
"-moz-animation-duration",
"-ms-animation-duration",
"-o-animation-duration",
"animation-duration",
"-webkit-animation-play-state",
"-moz-animation-play-state",
"-ms-animation-play-state",
"-o-animation-play-state",
"animation-play-state",
"-webkit-animation-timing-function",
"-moz-animation-timing-function",
"-ms-animation-timing-function",
"-o-animation-timing-function",
"animation-timing-function",
"-webkit-animation-delay",
"-moz-animation-delay",
"-ms-animation-delay",
"-o-animation-delay",
"animation-delay",
"-webkit-animation-iteration-count",
"-moz-animation-iteration-count",
"-ms-animation-iteration-count",
"-o-animation-iteration-count",
"animation-iteration-count",
"-webkit-animation-direction",
"-moz-animation-direction",
"-ms-animation-direction",
"-o-animation-direction",
"animation-direction"
]
"always-semicolon": true,
"block-indent": 2,
"colon-space": true,
"color-case": "lower",
"color-shorthand": true,
"combinator-space": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,
"remove-empty-rulesets": true,
"rule-indent": 2,
"stick-brace": true,
"strip-spaces": true,
"unitless-zero": true,
"vendor-prefix-align": true,
"sort-order": [
[
"position",
"top",
"right",
"bottom",
"left",
"z-index",
"display",
"float",
"width",
"min-width",
"max-width",
"height",
"min-height",
"max-height",
"-webkit-box-sizing",
"-moz-box-sizing",
"box-sizing",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"margin",
"margin-top",
"margin-right",
"margin-bottom",
"margin-left",
"overflow",
"overflow-x",
"overflow-y",
"-ms-overflow-x",
"-ms-overflow-y",
"clip",
"clear",
"font",
"font-family",
"font-size",
"font-style",
"font-weight",
"font-variant",
"font-size-adjust",
"font-stretch",
"font-effect",
"font-emphasize",
"font-emphasize-position",
"font-emphasize-style",
"font-smooth",
"-webkit-hyphens",
"-moz-hyphens",
"hyphens",
"line-height",
"color",
"text-align",
"-webkit-text-align-last",
"-moz-text-align-last",
"-ms-text-align-last",
"text-align-last",
"text-emphasis",
"text-emphasis-color",
"text-emphasis-style",
"text-emphasis-position",
"text-decoration",
"text-indent",
"text-justify",
"text-outline",
"-ms-text-overflow",
"text-overflow",
"text-overflow-ellipsis",
"text-overflow-mode",
"text-shadow",
"text-transform",
"text-wrap",
"letter-spacing",
"-ms-word-break",
"word-break",
"word-spacing",
"-ms-word-wrap",
"word-wrap",
"-moz-tab-size",
"-o-tab-size",
"tab-size",
"white-space",
"vertical-align",
"list-style",
"list-style-position",
"list-style-type",
"list-style-image",
"pointer-events",
"cursor",
"visibility",
"zoom",
"flex-direction",
"flex-order",
"flex-pack",
"flex-align",
"table-layout",
"empty-cells",
"caption-side",
"border-spacing",
"border-collapse",
"content",
"quotes",
"counter-reset",
"counter-increment",
"resize",
"-webkit-user-select",
"-moz-user-select",
"-ms-user-select",
"user-select",
"nav-index",
"nav-up",
"nav-right",
"nav-down",
"nav-left",
"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
"background",
"background-color",
"-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
"filter:progid:DXImageTransform.Microsoft.gradient",
"background-image",
"background-repeat",
"background-attachment",
"background-position",
"background-position-x",
"background-position-y",
"-webkit-background-clip",
"-moz-background-clip",
"background-clip",
"background-origin",
"-webkit-background-size",
"-moz-background-size",
"-o-background-size",
"background-size",
"border",
"border-color",
"border-style",
"border-width",
"border-top",
"border-top-color",
"border-top-style",
"border-top-width",
"border-right",
"border-right-color",
"border-right-style",
"border-right-width",
"border-bottom",
"border-bottom-color",
"border-bottom-style",
"border-bottom-width",
"border-left",
"border-left-color",
"border-left-style",
"border-left-width",
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"-webkit-border-image",
"-moz-border-image",
"-o-border-image",
"border-image",
"-webkit-border-image-source",
"-moz-border-image-source",
"-o-border-image-source",
"border-image-source",
"-webkit-border-image-slice",
"-moz-border-image-slice",
"-o-border-image-slice",
"border-image-slice",
"-webkit-border-image-width",
"-moz-border-image-width",
"-o-border-image-width",
"border-image-width",
"-webkit-border-image-outset",
"-moz-border-image-outset",
"-o-border-image-outset",
"border-image-outset",
"-webkit-border-image-repeat",
"-moz-border-image-repeat",
"-o-border-image-repeat",
"border-image-repeat",
"outline",
"outline-width",
"outline-style",
"outline-color",
"outline-offset",
"-webkit-box-shadow",
"-moz-box-shadow",
"box-shadow",
"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity",
"-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
"opacity",
"-ms-interpolation-mode",
"-webkit-transition",
"-moz-transition",
"-ms-transition",
"-o-transition",
"transition",
"-webkit-transition-delay",
"-moz-transition-delay",
"-ms-transition-delay",
"-o-transition-delay",
"transition-delay",
"-webkit-transition-timing-function",
"-moz-transition-timing-function",
"-ms-transition-timing-function",
"-o-transition-timing-function",
"transition-timing-function",
"-webkit-transition-duration",
"-moz-transition-duration",
"-ms-transition-duration",
"-o-transition-duration",
"transition-duration",
"-webkit-transition-property",
"-moz-transition-property",
"-ms-transition-property",
"-o-transition-property",
"transition-property",
"-webkit-transform",
"-moz-transform",
"-ms-transform",
"-o-transform",
"transform",
"-webkit-transform-origin",
"-moz-transform-origin",
"-ms-transform-origin",
"-o-transform-origin",
"transform-origin",
"-webkit-animation",
"-moz-animation",
"-ms-animation",
"-o-animation",
"animation",
"-webkit-animation-name",
"-moz-animation-name",
"-ms-animation-name",
"-o-animation-name",
"animation-name",
"-webkit-animation-duration",
"-moz-animation-duration",
"-ms-animation-duration",
"-o-animation-duration",
"animation-duration",
"-webkit-animation-play-state",
"-moz-animation-play-state",
"-ms-animation-play-state",
"-o-animation-play-state",
"animation-play-state",
"-webkit-animation-timing-function",
"-moz-animation-timing-function",
"-ms-animation-timing-function",
"-o-animation-timing-function",
"animation-timing-function",
"-webkit-animation-delay",
"-moz-animation-delay",
"-ms-animation-delay",
"-o-animation-delay",
"animation-delay",
"-webkit-animation-iteration-count",
"-moz-animation-iteration-count",
"-ms-animation-iteration-count",
"-o-animation-iteration-count",
"animation-iteration-count",
"-webkit-animation-direction",
"-moz-animation-direction",
"-ms-animation-direction",
"-o-animation-direction",
"animation-direction"
]
]
}

View File

@ -2,30 +2,155 @@
Looking to contribute something to Bootstrap? **Here's how you can help.**
Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.
Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue or assessing
patches and features.
## Reporting issues
## Using the issue tracker
We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Bootstrap core. Please read the following guidelines before opening any issue.
The [issue tracker](https://github.com/twbs/bootstrap/issues) is
the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests)
and [submitting pull requests](#pull-requests), but please respect the following
restrictions:
1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available.
2. **Create an isolated and reproducible test case.** Be sure the problem exists in Bootstrap's code with a [reduced test case](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report.
3. **Include a live example.** Make use of jsFiddle or jsBin to share your isolated test cases.
4. **Share as much information as possible.** Include operating system and version, browser and version, version of Bootstrap, customized or vanilla build, etc. where appropriate. Also include steps to reproduce the bug.
* Please **do not** use the issue tracker for personal support requests. Stack
Overflow ([`twitter-boostrap`](http://stackoverflow.com/questions/tagged/twitter-bootstrap) tag) or [IRC](https://github.com/twbs/bootstrap/blob/master/README.md#community) are better places to get help.
* Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others.
* Please **do not** open issues or pull requests regarding the code in
[`Normalize`](https://github.com/necolas/normalize.css) (open them in
their respective repositories).
## Bug reports
A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful, so thanks!
Guidelines for bug reports:
1. **Use the GitHub issue search** — check if the issue has already been
reported.
2. **Check if the issue has been fixed** — try to reproduce it using the
latest `master` or development branch in the repository.
3. **Isolate the problem** — ideally create a [reduced test
case](http://css-tricks.com/6263-reduced-test-cases/) and a live example.
[This JS Bin](http://jsbin.com/EBAwOkOK/1) is a helpful template.
A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What browser(s) and OS
experience the problem? Do other browsers show the bug differently? What
would you expect to be the outcome? All these details will help people to fix
any potential bugs.
Example:
> Short and descriptive example bug report title
>
> A summary of the issue and the browser/OS environment in which it occurs. If
> suitable, include the steps required to reproduce the bug.
>
> 1. This is the first step
> 2. This is the second step
> 3. Further steps, etc.
>
> `<url>` - a link to the reduced test case
>
> Any other information you want to share that is relevant to the issue being
> reported. This might include the lines of code that you have identified as
> causing the bug, and potential solutions (and your opinions on their
> merits).
## Feature requests
Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to *you* to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.
## Pull requests
- CSS changes must be done in `.less` files first, never just in the compiled `.css` files
- If modifying the `.less` files, always recompile and commit the compiled files `bootstrap.css` and `bootstrap.min.css`
- Try not to pollute your pull request with unintended changes--keep them simple and small
- Try to share which browsers your code has been tested in before submitting a pull request
- Pull requests should always be against the `master` branch, never against `gh-pages`.
Good pull requests—patches, improvements, new features—are a fantastic
help. They should remain focused in scope and avoid containing unrelated
commits.
**Please ask first** before embarking on any significant pull request (e.g.
implementing features, refactoring code, porting to a different language),
otherwise you risk spending a lot of time working on something that the
project's developers might not want to merge into the project.
Please adhere to the [coding conventions](#code-conventions) used throughout a
project (indentation, accurate comments, etc.) and any other requirements
(such as test coverage).
Adhering to the following this process is the best way to get your work
included in the project:
1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,
and configure the remotes:
```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/bootstrap.git
# Navigate to the newly cloned directory
cd html5-boilerplate
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/twbs/bootstrap.git
```
2. If you cloned a while ago, get the latest changes from upstream:
```bash
git checkout master
git pull upstream master
```
3. Create a new topic branch (off the main project development branch) to
contain your feature, change, or fix:
```bash
git checkout -b <topic-branch-name>
```
4. Commit your changes in logical chunks. Please adhere to these [git commit
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your code is unlikely be merged into the main project. Use Git's
[interactive rebase](https://help.github.com/articles/interactive-rebase)
feature to tidy up your commits before making them public.
5. Locally merge (or rebase) the upstream development branch into your topic branch:
```bash
git pull [--rebase] upstream master
```
6. Push your topic branch up to your fork:
```bash
git push origin <topic-branch-name>
```
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
with a clear title and description against the `master` branch.
**IMPORTANT**: By submitting a patch, you agree to allow the project owners to
license your work under the the terms of the [MIT License](LICENSE.md).
## Coding standards
## Code guidelines
### HTML
@ -37,6 +162,7 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
### CSS
- CSS changes must be done in `.less` files first, never just in the compiled `.css` files
- Adhere to the [CSS property order](http://markdotto.com/2011/11/29/css-property-order/)
- Multiple-line approach (one property and value per line)
- Always a space after a property's colon (e.g., `display: block;` and not `display:block;`)
@ -56,25 +182,9 @@ We only accept issues that are bug reports or feature requests. Bugs must be iso
- "Attractive"
## License
Prior to v3.1.0, Bootstrap was released under the Apache License v2.0. As of v3.1.0, Bootstrap is now licensed under the [MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE). By contributing your code, you agree to license your contribution under the [MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE).
By contributing your code, you agree to license your contribution under the [MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE).
Prior to v3.1.0, Bootstrap was released under the Apache License v2.0.
## Release checklist
1. Close ship list issue for the release.
2. Close the milestone for the release.
3. Open new release issue that includes this checklist.
4. Ping folks to coordinate release (mainly @jdorfman for BootstrapCDN).
5. Update version numbers using `grunt change-version-number --oldver=A.B.C --newver=X.Y.Z`. Review the changes and stage them manually.
6. Run `grunt` one last time.
7. Push to `master` branch.
8. Merge `master` into `gh-pages`.
9. Generate `bootstrap-X.Y.Z-dist.zip` file for release.
10. Create release on GitHub with `/dist/` folder and release notes.
11. Push `gh-pages`.
12. Publish blog post.
13. Tweet tweet.

View File

@ -299,13 +299,40 @@ module.exports = function (grunt) {
grunt.registerTask('dist', ['clean', 'dist-css', 'dist-fonts', 'dist-js']);
// Default task.
grunt.registerTask('default', ['test', 'dist', 'build-customizer']);
grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer']);
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// This can be overzealous, so its changes should always be manually reviewed!
grunt.registerTask('change-version-number', ['sed']);
grunt.registerTask('build-glyphicons-data', function () {
var fs = require('fs')
// Pass encoding, utf8, so `readFileSync` will return a string instead of a
// buffer
var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8')
var glpyhiconsLines = glyphiconsFile.split('\n')
// Use any line that starts with ".glyphicon-" and capture the class name
var iconClassName = /^\.(glyphicon-[^\s]+)/
var glyphiconsData = '# Generated on ' + (new Date()) + '\n' +
'# **Don\'t edit this directly!**\n' +
'# Look at the \'build-glyphicons-data\' task in Gruntfile.js\n\n';
for (var i = 0, len = glpyhiconsLines.length; i < len; i++) {
var match = glpyhiconsLines[i].match(iconClassName)
if (match != null) {
glyphiconsData += '- ' + match[1] + '\n'
}
}
// Create the `_data` directory if it doesn't already exist
if (!fs.existsSync('_data')) fs.mkdirSync('_data')
fs.writeFileSync('_data/glyphicons.yml', glyphiconsData)
});
// task for building customizer
grunt.registerTask('build-customizer', 'Add scripts/less files to customizer.', function () {
var fs = require('fs')

View File

@ -1,11 +1,21 @@
# [Bootstrap](http://getbootstrap.com) [![Build Status](https://secure.travis-ci.org/twbs/bootstrap.png)](http://travis-ci.org/twbs/bootstrap) [![devDependency Status](https://david-dm.org/twbs/bootstrap/dev-status.png)](https://david-dm.org/twbs/bootstrap#info=devDependencies)
[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created and maintained by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat).
Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat), and maintained by the [core team](https://github.com/twbs?tab=members) with the massive support and involvement of the community.
To get started, check out <http://getbootstrap.com>!
## Table of contents
- [Quick start](#quick-start)
- [Bugs and feature requests](#bugs-and-feature-requests)
- [Documentation](#documentation)
- [Compiling CSS and JavaScript](#compiling-css-and-javascript)
- [Contributing](#contributing)
- [Community](#community)
- [Versioning](#versioning)
- [Authors](#authors)
- [Copyright and license](#copyright-and-license)
## Quick start
@ -44,10 +54,7 @@ We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified
## Bugs and feature requests
Have a bug or a feature request? [Please open a new issue](https://github.com/twbs/bootstrap/issues). Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/).
You may use [this JS Bin](http://jsbin.com/aKiCIDO/1/edit) as a template for your bug reports.
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
## Documentation
@ -124,6 +131,7 @@ Keep track of development and community news.
- Follow [@twbootstrap on Twitter](http://twitter.com/twbootstrap).
- 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 `##twitter-bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap`](http://stackoverflow.com/questions/tagged/twitter-bootstrap)).

204
_data/glyphicons.yml Normal file
View File

@ -0,0 +1,204 @@
# Generated on Wed Dec 18 2013 20:14:37 GMT-0800 (PST)
# **Don't edit this directly!**
# Look at the 'build-glyphicons-data' task in Gruntfile.js
- glyphicon-asterisk
- glyphicon-plus
- glyphicon-euro
- glyphicon-minus
- glyphicon-cloud
- glyphicon-envelope
- glyphicon-pencil
- glyphicon-glass
- glyphicon-music
- glyphicon-search
- glyphicon-heart
- glyphicon-star
- glyphicon-star-empty
- glyphicon-user
- glyphicon-film
- glyphicon-th-large
- glyphicon-th
- glyphicon-th-list
- glyphicon-ok
- glyphicon-remove
- glyphicon-zoom-in
- glyphicon-zoom-out
- glyphicon-off
- glyphicon-signal
- glyphicon-cog
- glyphicon-trash
- glyphicon-home
- glyphicon-file
- glyphicon-time
- glyphicon-road
- glyphicon-download-alt
- glyphicon-download
- glyphicon-upload
- glyphicon-inbox
- glyphicon-play-circle
- glyphicon-repeat
- glyphicon-refresh
- glyphicon-list-alt
- glyphicon-lock
- glyphicon-flag
- glyphicon-headphones
- glyphicon-volume-off
- glyphicon-volume-down
- glyphicon-volume-up
- glyphicon-qrcode
- glyphicon-barcode
- glyphicon-tag
- glyphicon-tags
- glyphicon-book
- glyphicon-bookmark
- glyphicon-print
- glyphicon-camera
- glyphicon-font
- glyphicon-bold
- glyphicon-italic
- glyphicon-text-height
- glyphicon-text-width
- glyphicon-align-left
- glyphicon-align-center
- glyphicon-align-right
- glyphicon-align-justify
- glyphicon-list
- glyphicon-indent-left
- glyphicon-indent-right
- glyphicon-facetime-video
- glyphicon-picture
- glyphicon-map-marker
- glyphicon-adjust
- glyphicon-tint
- glyphicon-edit
- glyphicon-share
- glyphicon-check
- glyphicon-move
- glyphicon-step-backward
- glyphicon-fast-backward
- glyphicon-backward
- glyphicon-play
- glyphicon-pause
- glyphicon-stop
- glyphicon-forward
- glyphicon-fast-forward
- glyphicon-step-forward
- glyphicon-eject
- glyphicon-chevron-left
- glyphicon-chevron-right
- glyphicon-plus-sign
- glyphicon-minus-sign
- glyphicon-remove-sign
- glyphicon-ok-sign
- glyphicon-question-sign
- glyphicon-info-sign
- glyphicon-screenshot
- glyphicon-remove-circle
- glyphicon-ok-circle
- glyphicon-ban-circle
- glyphicon-arrow-left
- glyphicon-arrow-right
- glyphicon-arrow-up
- glyphicon-arrow-down
- glyphicon-share-alt
- glyphicon-resize-full
- glyphicon-resize-small
- glyphicon-exclamation-sign
- glyphicon-gift
- glyphicon-leaf
- glyphicon-fire
- glyphicon-eye-open
- glyphicon-eye-close
- glyphicon-warning-sign
- glyphicon-plane
- glyphicon-calendar
- glyphicon-random
- glyphicon-comment
- glyphicon-magnet
- glyphicon-chevron-up
- glyphicon-chevron-down
- glyphicon-retweet
- glyphicon-shopping-cart
- glyphicon-folder-close
- glyphicon-folder-open
- glyphicon-resize-vertical
- glyphicon-resize-horizontal
- glyphicon-hdd
- glyphicon-bullhorn
- glyphicon-bell
- glyphicon-certificate
- glyphicon-thumbs-up
- glyphicon-thumbs-down
- glyphicon-hand-right
- glyphicon-hand-left
- glyphicon-hand-up
- glyphicon-hand-down
- glyphicon-circle-arrow-right
- glyphicon-circle-arrow-left
- glyphicon-circle-arrow-up
- glyphicon-circle-arrow-down
- glyphicon-globe
- glyphicon-wrench
- glyphicon-tasks
- glyphicon-filter
- glyphicon-briefcase
- glyphicon-fullscreen
- glyphicon-dashboard
- glyphicon-paperclip
- glyphicon-heart-empty
- glyphicon-link
- glyphicon-phone
- glyphicon-pushpin
- glyphicon-usd
- glyphicon-gbp
- glyphicon-sort
- glyphicon-sort-by-alphabet
- glyphicon-sort-by-alphabet-alt
- glyphicon-sort-by-order
- glyphicon-sort-by-order-alt
- glyphicon-sort-by-attributes
- glyphicon-sort-by-attributes-alt
- glyphicon-unchecked
- glyphicon-expand
- glyphicon-collapse-down
- glyphicon-collapse-up
- glyphicon-log-in
- glyphicon-flash
- glyphicon-log-out
- glyphicon-new-window
- glyphicon-record
- glyphicon-save
- glyphicon-open
- glyphicon-saved
- glyphicon-import
- glyphicon-export
- glyphicon-send
- glyphicon-floppy-disk
- glyphicon-floppy-saved
- glyphicon-floppy-remove
- glyphicon-floppy-save
- glyphicon-floppy-open
- glyphicon-credit-card
- glyphicon-transfer
- glyphicon-cutlery
- glyphicon-header
- glyphicon-compressed
- glyphicon-earphone
- glyphicon-phone-alt
- glyphicon-tower
- glyphicon-stats
- glyphicon-sd-video
- glyphicon-hd-video
- glyphicon-subtitles
- glyphicon-sound-stereo
- glyphicon-sound-dolby
- glyphicon-sound-5-1
- glyphicon-sound-6-1
- glyphicon-sound-7-1
- glyphicon-copyright-mark
- glyphicon-registration-mark
- glyphicon-cloud-download
- glyphicon-cloud-upload
- glyphicon-tree-conifer
- glyphicon-tree-deciduous

View File

@ -5,6 +5,7 @@
{% include social-buttons.html %}
<p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
<p>Maintained by the <a href="https://github.com/twbs?tab=members">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
<p>Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
<ul class="footer-links muted">
<li>Currently v{{ site.current_version }}</li>

View File

@ -17,7 +17,16 @@ base_url: "../"
<h2 id="glyphicons-glyphs">Available glyphs</h2>
<p>Includes 200 glyphs in font format from the Glyphicon Halflings set. <a href="http://glyphicons.com/">Glyphicons</a> Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, we only ask that you to include a link back to <a href="http://glyphicons.com/">Glyphicons</a> whenever possible.</p>
{% include glyphicons.html %}
<div class="bs-glyphicons">
<ul class="bs-glyphicons-list">
{% for iconClassName in site.data.glyphicons %}
<li>
<span class="glyphicon {{ iconClassName }}"></span>
<span class="glyphicon-class">glyphicon {{ iconClassName }}</span>
</li>
{% endfor %}
</ul>
</div>
<h2 id="glyphicons-how-to-use">How to use</h2>

View File

@ -1,25 +1,25 @@
{
"name": "twbs/bootstrap"
, "description": "Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development."
, "keywords": ["bootstrap", "css"]
, "homepage": "http://getbootstrap.com"
, "authors": [
{
"name": "Mark Otto",
"email": "markdotto@gmail.com"
},
{
"name": "Jacob Thornton",
"email": "jacobthornton@gmail.com"
}
]
, "support": {
"issues": "https://github.com/twbs/bootstrap/issues"
"name": "twbs/bootstrap",
"description": "Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.",
"keywords": ["bootstrap", "css"],
"homepage": "http://getbootstrap.com",
"authors": [
{
"name": "Mark Otto",
"email": "markdotto@gmail.com"
},
{
"name": "Jacob Thornton",
"email": "jacobthornton@gmail.com"
}
],
"support": {
"issues": "https://github.com/twbs/bootstrap/issues"
},
"license": "MIT",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
, "license": "MIT"
, "extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
}
}

View File

@ -872,15 +872,15 @@ base_url: "../"
{% endhighlight %}
<h4>Alternate displays</h4>
<p>Use <code>.pull-right</code> for a floated, right-aligned blockquote.</p>
<p>Add <code>.blockquote-reverse</code> for blockquote with right-aligned content.</p>
<div class="bs-example" style="overflow: hidden;">
<blockquote class="pull-right">
<blockquote class="blockquote-reverse">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>
</div>
{% highlight html %}
<blockquote class="pull-right">
<blockquote class="blockquote-reverse">
...
</blockquote>
{% endhighlight %}
@ -1775,7 +1775,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
{% endhighlight %}
<h4>Inline checkboxes</h4>
<p>Use <code>.checkbox-inline</code> or <code>.radio-inline</code> class to a series of checkboxes or radios for controls appear on the same line.</p>
<p>Use the <code>.checkbox-inline</code> or <code>.radio-inline</code> classes on a series of checkboxes or radios for controls that appear on the same line.</p>
<div class="bs-example">
<form role="form">
<label class="checkbox-inline">
@ -2819,7 +2819,7 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<div class="page-header">
<h1>Using LESS</h1>
</div>
<p class="lead">Bootstrap's CSS is built on LESS, a preprocessor with additional functionality like variables, mixins, and functions for compiling CSS. Thosing looking to use the source LESS files instead of our compiled CSS files can make use of the numerous variables and mixins we use throughout the framework.</p>
<p class="lead">Bootstrap's CSS is built on LESS, a preprocessor with additional functionality like variables, mixins, and functions for compiling CSS. Those looking to use the source LESS files instead of our compiled CSS files can make use of the numerous variables and mixins we use throughout the framework.</p>
<p>Grid variables and mixins are covered <a href="{{ page.base_url }}css/#grid-less">within the Grid system section</a>.</p>
@ -2910,7 +2910,7 @@ a {
<p>Note that the <code>@link-color-hover</code> uses a function, another awesome tool from LESS, to automagically create the right hover color. You can use <code>darken</code>, <code>lighten</code>, <code>saturate</code>, and <code>desaturate</code>.</p>
<h3 id="less-variables-typography">Typography</h3>
<p>Easily set your type face, text size, leading, and more with a few quick variables. Bootstrap makes use of these as well to provide easy typographic mixins as well.</p>
<p>Easily set your type face, text size, leading, and more with a few quick variables. Bootstrap makes use of these as well to provide easy typographic mixins.</p>
{% highlight css %}
@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
@font-family-serif: Georgia, "Times New Roman", Times, serif;
@ -2942,7 +2942,7 @@ a {
{% highlight css %}
@icon-font-path: "../fonts/";
@icon-font-name: "glyphicons-halflings-regular";
{% endhighlight %}}
{% endhighlight %}
<h3 id="less-variables-components">Components</h3>
<p>Components throughout Bootstrap make use of some default variables for setting common values. Here are the most commonly used.</p>
@ -2971,7 +2971,7 @@ a {
@caret-width-base: 4px;
@caret-width-large: 5px;
{% endhighlight %}}
{% endhighlight %}
<h2 id="less-mixins-vendor">Vendor mixins</h2>

View File

@ -616,18 +616,19 @@ abbr[data-original-title] {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eee;
}
blockquote p {
font-size: 17.5px;
}
blockquote p:last-child {
blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
margin-bottom: 0;
}
blockquote footer,
blockquote small,
blockquote .small {
display: block;
font-size: 80%;
line-height: 1.428571429;
color: #999;
}
@ -636,22 +637,27 @@ blockquote small:before,
blockquote .small:before {
content: '\2014 \00A0';
}
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
text-align: right;
border-right: 5px solid #eee;
border-left: 0;
}
blockquote.pull-right p,
blockquote.pull-right small,
blockquote.pull-right .small {
text-align: right;
}
.blockquote-reverse footer:before,
blockquote.pull-right footer:before,
.blockquote-reverse small:before,
blockquote.pull-right small:before,
.blockquote-reverse .small:before,
blockquote.pull-right .small:before {
content: '';
}
.blockquote-reverse footer:after,
blockquote.pull-right footer:after,
.blockquote-reverse small:after,
blockquote.pull-right small:after,
.blockquote-reverse .small:after,
blockquote.pull-right .small:after {
content: '\00A0 \2014';
}
@ -1456,6 +1462,7 @@ table col[class*="col-"] {
}
table td[class*="col-"],
table th[class*="col-"] {
position: static;
display: table-cell;
float: none;
}
@ -4120,6 +4127,7 @@ textarea.input-group-sm > .input-group-btn > .btn {
padding: 6px 12px;
margin-left: -1px;
line-height: 1.428571429;
color: #428bca;
text-decoration: none;
background-color: #fff;
border: 1px solid #ddd;
@ -4139,7 +4147,9 @@ textarea.input-group-sm > .input-group-btn > .btn {
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
color: #2a6496;
background-color: #eee;
border-color: #ddd;
}
.pagination > .active > a,
.pagination > .active > span,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

10
dist/js/bootstrap.js vendored
View File

@ -718,7 +718,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (!selector) {
selector = $this.attr('href')
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
var $parent = selector && $(selector)
@ -1573,15 +1573,15 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
.parents('.active')
.removeClass('active')
var selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
var selector = this.selector +
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'
var active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
if (active.parent('.dropdown-menu').length) {
active = active
.closest('li.dropdown')
.addClass('active')

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,11 @@
/* jshint multistr:true */
window.onload = function () { // wait for load in a dumb way because B-0
var cw = '/*!\n * Bootstrap v3.1.0 (http://getbootstrap.com)\n\n *\n * Copyright 2013 Twitter, Inc\n * Licensed under MIT (<%= _.pluck(pkg.licenses, "url").join(", ") %>)\n */\n\n'
var cw = '/*!\n' +
' * Bootstrap v3.1.0 (http://getbootstrap.com)\n' +
' * Copyright 2013 Twitter, Inc.\n' +
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
' */\n\n';
function showError(msg, err) {
$('<div id="bsCustomizerAlert" class="bs-customizer-alert">\

View File

@ -297,7 +297,7 @@ $('#myModal').on('show.bs.modal', function (e) {
<h2 id="modals-usage">Usage</h2>
<p>The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds <code>.model-open</code> to the <code>&lt;body&gt;</code> to override default scrolling behavior and generates a <code>.modal-backdrop</code> to provide a click area for dismissing shown modals when clicking outside the modal.</p>
<p>The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds <code>.modal-open</code> to the <code>&lt;body&gt;</code> to override default scrolling behavior and generates a <code>.modal-backdrop</code> to provide a click area for dismissing shown modals when clicking outside the modal.</p>
<h3>Via data attributes</h3>
<p>Activate a modal without writing JavaScript. Set <code>data-toggle="modal"</code> on a controller element, like a button, along with a <code>data-target="#foo"</code> or <code>href="#foo"</code> to target a specific modal to toggle.</p>
@ -344,7 +344,7 @@ $('#myModal').on('show.bs.modal', function (e) {
<td>remote</td>
<td>path</td>
<td>false</td>
<td><p>If a remote URL is provided, content will be loaded via jQuery's <code>load</code> method and injected into the root of the modal element. If you're using the data-api, you may alternatively use the <code>href</code> attribute to specify the remote source. An example of this is shown below:</p>
<td><p>If a remote URL is provided, <strong>content will be loaded one time</strong> via jQuery's <code>load</code> method and injected into the root of the modal element. If you're using the data-api, you may alternatively use the <code>href</code> attribute to specify the remote source. An example of this is shown below:</p>
{% highlight html %}
<a data-toggle="modal" href="remote.html" data-target="#modal">Click me</a>
{% endhighlight %}

View File

@ -95,7 +95,7 @@
if (!selector) {
selector = $this.attr('href')
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
var $parent = selector && $(selector)

View File

@ -88,15 +88,15 @@
.parents('.active')
.removeClass('active')
var selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
var selector = this.selector +
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'
var active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
if (active.parent('.dropdown-menu').length) {
active = active
.closest('li.dropdown')
.addClass('active')

View File

@ -17,10 +17,10 @@ $(function () {
})
test('should fade element out on clicking .close', function () {
var alertHTML = '<div class="alert-message warning fade in">'
+ '<a class="close" href="#" data-dismiss="alert">×</a>'
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
+ '</div>',
var alertHTML = '<div class="alert-message warning fade in">' +
'<a class="close" href="#" data-dismiss="alert">×</a>' +
'<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' +
'</div>',
alert = $(alertHTML).alert()
alert.find('.close').click()
@ -31,10 +31,10 @@ $(function () {
test('should remove element when clicking .close', function () {
$.support.transition = false
var alertHTML = '<div class="alert-message warning fade in">'
+ '<a class="close" href="#" data-dismiss="alert">×</a>'
+ '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>'
+ '</div>',
var alertHTML = '<div class="alert-message warning fade in">' +
'<a class="close" href="#" data-dismiss="alert">×</a>' +
'<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' +
'</div>',
alert = $(alertHTML).appendTo('#qunit-fixture').alert()
ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom')

View File

@ -18,68 +18,68 @@ $(function () {
})
test('should not open dropdown if target is disabled', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<button disabled href="#" class="btn dropdown-toggle" data-toggle="dropdown">Dropdown</button>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>',
var dropdownHTML = '<ul class="tabs">' +
'<li class="dropdown">' +
'<button disabled href="#" class="btn dropdown-toggle" data-toggle="dropdown">Dropdown</button>' +
'<ul class="dropdown-menu">' +
'<li><a href="#">Secondary link</a></li>' +
'<li><a href="#">Something else here</a></li>' +
'<li class="divider"></li>' +
'<li><a href="#">Another link</a></li>' +
'</ul>' +
'</li>' +
'</ul>',
dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
})
test('should not open dropdown if target is disabled', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<button href="#" class="btn dropdown-toggle disabled" data-toggle="dropdown">Dropdown</button>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>',
var dropdownHTML = '<ul class="tabs">' +
'<li class="dropdown">' +
'<button href="#" class="btn dropdown-toggle disabled" data-toggle="dropdown">Dropdown</button>' +
'<ul class="dropdown-menu">' +
'<li><a href="#">Secondary link</a></li>' +
'<li><a href="#">Something else here</a></li>' +
'<li class="divider"></li>' +
'<li><a href="#">Another link</a></li>' +
'</ul>' +
'</li>' +
'</ul>',
dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
})
test('should add class open to menu if clicked', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>',
var dropdownHTML = '<ul class="tabs">' +
'<li class="dropdown">' +
'<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' +
'<ul class="dropdown-menu">' +
'<li><a href="#">Secondary link</a></li>' +
'<li><a href="#">Something else here</a></li>' +
'<li class="divider"></li>' +
'<li><a href="#">Another link</a></li>' +
'</ul>' +
'</li>' +
'</ul>',
dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
})
test('should test if element has a # before assuming it\'s a selector', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="/foo/" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>',
var dropdownHTML = '<ul class="tabs">' +
'<li class="dropdown">' +
'<a href="/foo/" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' +
'<ul class="dropdown-menu">' +
'<li><a href="#">Secondary link</a></li>' +
'<li><a href="#">Something else here</a></li>' +
'<li class="divider"></li>' +
'<li><a href="#">Another link</a></li>' +
'</ul>' +
'</li>' +
'</ul>',
dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click()
ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click')
@ -87,17 +87,17 @@ $(function () {
test('should remove open class if body clicked', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>',
var dropdownHTML = '<ul class="tabs">' +
'<li class="dropdown">' +
'<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' +
'<ul class="dropdown-menu">' +
'<li><a href="#">Secondary link</a></li>' +
'<li><a href="#">Something else here</a></li>' +
'<li class="divider"></li>' +
'<li><a href="#">Another link</a></li>' +
'</ul>' +
'</li>' +
'</ul>',
dropdown = $(dropdownHTML)
.appendTo('#qunit-fixture')
.find('[data-toggle="dropdown"]')
@ -111,23 +111,22 @@ $(function () {
})
test('should remove open class if body clicked, with multiple drop downs', function () {
var dropdownHTML =
'<ul class="nav">'
+ ' <li><a href="#menu1">Menu 1</a></li>'
+ ' <li class="dropdown" id="testmenu">'
+ ' <a class="dropdown-toggle" data-toggle="dropdown" href="#testmenu">Test menu <b class="caret"></b></a>'
+ ' <ul class="dropdown-menu" role="menu">'
+ ' <li><a href="#sub1">Submenu 1</a></li>'
+ ' </ul>'
+ ' </li>'
+ '</ul>'
+ '<div class="btn-group">'
+ ' <button class="btn">Actions</button>'
+ ' <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>'
+ ' <ul class="dropdown-menu">'
+ ' <li><a href="#">Action 1</a></li>'
+ ' </ul>'
+ '</div>',
var dropdownHTML = '<ul class="nav">' +
' <li><a href="#menu1">Menu 1</a></li>' +
' <li class="dropdown" id="testmenu">' +
' <a class="dropdown-toggle" data-toggle="dropdown" href="#testmenu">Test menu <b class="caret"></b></a>' +
' <ul class="dropdown-menu" role="menu">' +
' <li><a href="#sub1">Submenu 1</a></li>' +
' </ul>' +
' </li>' +
'</ul>' +
'<div class="btn-group">' +
' <button class="btn">Actions</button>' +
' <button class="btn dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>' +
' <ul class="dropdown-menu">' +
' <li><a href="#">Action 1</a></li>' +
' </ul>' +
'</div>',
dropdowns = $(dropdownHTML).appendTo('#qunit-fixture').find('[data-toggle="dropdown"]'),
first = dropdowns.first(),
last = dropdowns.last()
@ -150,17 +149,17 @@ $(function () {
})
test('should fire show and hide event', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>',
var dropdownHTML = '<ul class="tabs">' +
'<li class="dropdown">' +
'<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' +
'<ul class="dropdown-menu">' +
'<li><a href="#">Secondary link</a></li>' +
'<li><a href="#">Something else here</a></li>' +
'<li class="divider"></li>' +
'<li><a href="#">Another link</a></li>' +
'</ul>' +
'</li>' +
'</ul>',
dropdown = $(dropdownHTML)
.appendTo('#qunit-fixture')
.find('[data-toggle="dropdown"]')
@ -184,17 +183,17 @@ $(function () {
test('should fire shown and hiden event', function () {
var dropdownHTML = '<ul class="tabs">'
+ '<li class="dropdown">'
+ '<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#">Secondary link</a></li>'
+ '<li><a href="#">Something else here</a></li>'
+ '<li class="divider"></li>'
+ '<li><a href="#">Another link</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>',
var dropdownHTML = '<ul class="tabs">' +
'<li class="dropdown">' +
'<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' +
'<ul class="dropdown-menu">' +
'<li><a href="#">Secondary link</a></li>' +
'<li><a href="#">Something else here</a></li>' +
'<li class="divider"></li>' +
'<li><a href="#">Another link</a></li>' +
'</ul>' +
'</li>' +
'</ul>',
dropdown = $(dropdownHTML)
.appendTo('#qunit-fixture')
.find('[data-toggle="dropdown"]')

View File

@ -19,16 +19,15 @@ $(function () {
test('should switch active class on scroll', function () {
var sectionHTML = '<div id="masthead"></div>'
$section = $(sectionHTML).append('#qunit-fixture'),
topbarHTML = '<div class="topbar">'
+ '<div class="topbar-inner">'
+ '<div class="container">'
+ '<h3><a href="#">Bootstrap</a></h3>'
+ '<ul class="nav">'
+ '<li><a href="#masthead">Overview</a></li>'
+ '</ul>'
+ '</div>'
+ '</div>'
+ '</div>',
topbarHTML = '<div class="topbar">' +
'<div class="topbar-inner">' +
'<div class="container">' +
'<h3><a href="#">Bootstrap</a></h3>' +
'<li><a href="#masthead">Overview</a></li>' +
'</ul>' +
'</div>' +
'</div>' +
'</div>',
$topbar = $(topbarHTML).scrollspy()
ok($topbar.find('.active', true))

View File

@ -17,11 +17,10 @@ $(function () {
})
test('should activate element by tab id', function () {
var tabsHTML =
'<ul class="tabs">'
+ '<li><a href="#home">Home</a></li>'
+ '<li><a href="#profile">Profile</a></li>'
+ '</ul>'
var tabsHTML = '<ul class="tabs">' +
'<li><a href="#home">Home</a></li>' +
'<li><a href="#profile">Profile</a></li>' +
'</ul>'
$('<ul><li id="home"></li><li id="profile"></li></ul>').appendTo('#qunit-fixture')
@ -33,11 +32,10 @@ $(function () {
})
test('should activate element by tab id', function () {
var pillsHTML =
'<ul class="pills">'
+ '<li><a href="#home">Home</a></li>'
+ '<li><a href="#profile">Profile</a></li>'
+ '</ul>'
var pillsHTML = '<ul class="pills">' +
'<li><a href="#home">Home</a></li>' +
'<li><a href="#profile">Profile</a></li>' +
'</ul>'
$('<ul><li id="home"></li><li id="profile"></li></ul>').appendTo('#qunit-fixture')
@ -65,15 +63,14 @@ $(function () {
})
test('show and shown events should reference correct relatedTarget', function () {
var dropHTML =
'<ul class="drop">'
+ '<li class="dropdown"><a data-toggle="dropdown" href="#">1</a>'
+ '<ul class="dropdown-menu">'
+ '<li><a href="#1-1" data-toggle="tab">1-1</a></li>'
+ '<li><a href="#1-2" data-toggle="tab">1-2</a></li>'
+ '</ul>'
+ '</li>'
+ '</ul>'
var dropHTML = '<ul class="drop">' +
'<li class="dropdown"><a data-toggle="dropdown" href="#">1</a>' +
'<ul class="dropdown-menu">' +
'<li><a href="#1-1" data-toggle="tab">1-1</a></li>' +
'<li><a href="#1-2" data-toggle="tab">1-2</a></li>' +
'</ul>' +
'</li>' +
'</ul>'
$(dropHTML).find('ul>li:first a').tab('show').end()
.find('ul>li:last a').on('show', function (event) {

View File

@ -16,6 +16,7 @@
padding: @padding-base-vertical @padding-base-horizontal;
line-height: @line-height-base;
text-decoration: none;
color: @pagination-color;
background-color: @pagination-bg;
border: 1px solid @pagination-border;
margin-left: -1px;
@ -39,7 +40,9 @@
> li > span {
&:hover,
&:focus {
color: @pagination-hover-color;
background-color: @pagination-hover-bg;
border-color: @pagination-hover-border;
}
}
@ -51,7 +54,7 @@
z-index: 2;
color: @pagination-active-color;
background-color: @pagination-active-bg;
border-color: @pagination-active-bg;
border-color: @pagination-active-border;
cursor: default;
}
}
@ -64,8 +67,8 @@
> a:hover,
> a:focus {
color: @pagination-disabled-color;
background-color: @pagination-bg;
border-color: @pagination-border;
background-color: @pagination-disabled-bg;
border-color: @pagination-disabled-border;
cursor: not-allowed;
}
}

View File

@ -141,6 +141,7 @@ table {
td,
th {
&[class*="col-"] {
position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
float: none;
display: table-cell;
}

View File

@ -263,12 +263,15 @@ abbr[data-original-title] {
blockquote {
padding: (@line-height-computed / 2) @line-height-computed;
margin: 0 0 @line-height-computed;
font-size: (@font-size-base * 1.25);
border-left: 5px solid @blockquote-border-color;
p {
font-size: (@font-size-base * 1.25);
}
p:last-child {
margin-bottom: 0;
p,
ul,
ol {
&:last-child {
margin-bottom: 0;
}
}
// Deprecating small and .small for v3.1
@ -277,32 +280,34 @@ blockquote {
small,
.small {
display: block;
font-size: 80%; // back to default font-size
line-height: @line-height-base;
color: @blockquote-small-color;
&:before {
content: '\2014 \00A0'; // EM DASH, NBSP
content: '\2014 \00A0'; // em dash, nbsp
}
}
}
// Float right with text-align: right
&.pull-right {
padding-right: 15px;
padding-left: 0;
border-right: 5px solid @blockquote-border-color;
border-left: 0;
p,
small,
.small {
text-align: right;
}
small,
.small {
&:before {
content: '';
}
&:after {
content: '\00A0 \2014'; // NBSP, EM DASH
}
// Opposite alignment of blockquote
//
// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
border-right: 5px solid @blockquote-border-color;
border-left: 0;
text-align: right;
// Account for citation
footer,
small,
.small {
&:before { content: ''; }
&:after {
content: '\00A0 \2014'; // nbsp, em dash
}
}
}

View File

@ -352,15 +352,21 @@
// Pagination
// -------------------------
@pagination-color: @link-color;
@pagination-bg: #fff;
@pagination-border: #ddd;
@pagination-hover-color: @link-hover-color;
@pagination-hover-bg: @gray-lighter;
@pagination-hover-border: #ddd;
@pagination-active-bg: @brand-primary;
@pagination-active-color: #fff;
@pagination-active-bg: @brand-primary;
@pagination-active-border: @brand-primary;
@pagination-disabled-color: @gray-light;
@pagination-disabled-bg: #fff;
@pagination-disabled-border: #ddd;
// Pager

View File

@ -7,11 +7,11 @@
"author": "Twitter, Inc.",
"scripts": { "test": "grunt test" },
"repository": {
"type": "git"
, "url": "https://github.com/twbs/bootstrap.git"
"type": "git",
"url": "https://github.com/twbs/bootstrap.git"
},
"bugs": {
"url": "https://github.com/twbs/bootstrap/issues"
"url": "https://github.com/twbs/bootstrap/issues"
},
"licenses": [
{
@ -33,7 +33,7 @@
"grunt-contrib-qunit": "~0.3.0",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-watch": "~0.5.3",
"grunt-csscomb": "~1.1.0",
"grunt-csscomb": "~1.2.1",
"grunt-html-validation": "~0.1.11",
"grunt-jekyll": "~0.4.0",
"grunt-jscs-checker": "~0.2.5",

View File

@ -3,12 +3,14 @@
{
browserName: "safari",
version: "6",
platform: "OS X 10.8"
},
# { # Safari 7 (which requires Mavericks) is not currently supported by Sauce Labs
# browserName: "safari",
# platform: "OS X 10.9"
# },
{
browserName: "chrome",
version: "31",
platform: "OS X 10.9"
},
@ -50,12 +52,10 @@
{
browserName: "chrome",
version: "31",
platform: "Windows 8.1"
},
{
browserName: "firefox",
version: "25",
platform: "Windows 8.1"
},
@ -63,7 +63,6 @@
{
browserName: "iphone",
version: "6.1",
platform: "OS X 10.8"
},
@ -72,12 +71,10 @@
# Linux (unofficial):
{
browserName: "chrome",
version: "30",
platform: "Linux"
},
{
browserName: "firefox",
version: "25",
platform: "Linux"
}