diff --git a/.babelrc.js b/.babelrc.js
new file mode 100644
index 000000000000..277f96ae746a
--- /dev/null
+++ b/.babelrc.js
@@ -0,0 +1,16 @@
+module.exports = {
+ presets: [
+ [
+ '@babel/env',
+ {
+ loose: true,
+ modules: false,
+ exclude: ['transform-typeof-symbol']
+ }
+ ]
+ ],
+ plugins: [
+ process.env.PLUGINS && 'transform-es2015-modules-strip',
+ '@babel/proposal-object-rest-spread'
+ ].filter(Boolean)
+};
diff --git a/.editorconfig b/.editorconfig
index 0b008c95741b..9d5248e86f37 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -3,13 +3,12 @@
root = true
[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
charset = utf-8
-trim_trailing_whitespace = true
+end_of_line = lf
+indent_size = 2
+indent_style = space
insert_final_newline = true
+trim_trailing_whitespace = true
-[*.py]
-indent_style = space
-indent_size = 4
+[*.md]
+trim_trailing_whitespace = false
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 000000000000..e1d5490eef65
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,5 @@
+**/*.min.js
+**/dist/
+**/vendor/
+/_gh_pages/
+/package.js
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000000000000..8cfaeea153db
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,235 @@
+{
+ "root": true,
+ "parser": "babel-eslint",
+ "env": {
+ "browser": true,
+ "es6": true
+ },
+ "extends": "eslint:recommended",
+ "plugins": ["compat"],
+ "rules": {
+ // Possible Errors
+ "no-await-in-loop": "error",
+ "no-extra-parens": "error",
+ "no-prototype-builtins": "error",
+ "no-template-curly-in-string": "error",
+ "compat/compat": "error",
+ "valid-jsdoc": "error",
+
+ // Best Practices
+ "accessor-pairs": "error",
+ "array-callback-return": "error",
+ "block-scoped-var": "error",
+ "class-methods-use-this": "off",
+ "complexity": "error",
+ "consistent-return": "error",
+ "curly": "error",
+ "default-case": "error",
+ "dot-location": ["error", "property"],
+ "dot-notation": "error",
+ "eqeqeq": "error",
+ "guard-for-in": "error",
+ "no-alert": "error",
+ "no-caller": "error",
+ "no-div-regex": "error",
+ "no-else-return": "error",
+ "no-empty-function": "error",
+ "no-eq-null": "error",
+ "no-eval": "error",
+ "no-extend-native": "error",
+ "no-extra-bind": "error",
+ "no-extra-label": "error",
+ "no-floating-decimal": "error",
+ "no-implicit-coercion": "error",
+ "no-implicit-globals": "error",
+ "no-implied-eval": "error",
+ "no-invalid-this": "off",
+ "no-iterator": "error",
+ "no-labels": "error",
+ "no-lone-blocks": "error",
+ "no-loop-func": "error",
+ "no-magic-numbers": ["error", {
+ "ignore": [-1, 0, 1],
+ "ignoreArrayIndexes": true
+ }
+ ],
+ "no-multi-spaces": ["error", {
+ "ignoreEOLComments": true,
+ "exceptions": {
+ "AssignmentExpression": true,
+ "ArrowFunctionExpression": true,
+ "CallExpression": true,
+ "VariableDeclarator": true
+ }
+ }
+ ],
+ "no-multi-str": "error",
+ "no-new": "error",
+ "no-new-func": "error",
+ "no-new-wrappers": "error",
+ "no-octal-escape": "error",
+ "no-param-reassign": "off",
+ "no-proto": "error",
+ "no-restricted-properties": "error",
+ "no-return-assign": "error",
+ "no-return-await": "error",
+ "no-script-url": "error",
+ "no-self-compare": "error",
+ "no-sequences": "error",
+ "no-throw-literal": "error",
+ "no-unmodified-loop-condition": "error",
+ "no-unused-expressions": "error",
+ "no-useless-call": "error",
+ "no-useless-concat": "error",
+ "no-useless-return": "error",
+ "no-void": "error",
+ "no-warning-comments": "off",
+ "no-with": "error",
+ "prefer-promise-reject-errors": "error",
+ "radix": "error",
+ "require-await": "error",
+ "vars-on-top": "error",
+ "wrap-iife": "error",
+ "yoda": "error",
+
+ // Strict Mode
+ "strict": "error",
+
+ // Variables
+ "init-declarations": "off",
+ "no-catch-shadow": "error",
+ "no-label-var": "error",
+ "no-restricted-globals": "error",
+ "no-shadow": "off",
+ "no-shadow-restricted-names": "error",
+ "no-undef-init": "error",
+ "no-undefined": "error",
+ "no-use-before-define": "off",
+
+ // Node.js and CommonJS
+ "callback-return": "off",
+ "global-require": "error",
+ "handle-callback-err": "error",
+ "no-mixed-requires": "error",
+ "no-new-require": "error",
+ "no-path-concat": "error",
+ "no-process-env": "error",
+ "no-process-exit": "error",
+ "no-restricted-modules": "error",
+ "no-sync": "error",
+
+ // Stylistic Issues
+ "array-bracket-spacing": "error",
+ "block-spacing": "error",
+ "brace-style": "error",
+ "camelcase": "error",
+ "capitalized-comments": "off",
+ "comma-dangle": "error",
+ "comma-spacing": "error",
+ "comma-style": "error",
+ "computed-property-spacing": "error",
+ "consistent-this": "error",
+ "eol-last": "error",
+ "func-call-spacing": "error",
+ "func-name-matching": "error",
+ "func-names": "off",
+ "func-style": ["error", "declaration"],
+ "id-blacklist": "error",
+ "id-length": "off",
+ "id-match": "error",
+ "indent": ["error", 2, { "SwitchCase": 1 }],
+ "jsx-quotes": "error",
+ "key-spacing": "off",
+ "keyword-spacing": "error",
+ "linebreak-style": ["error", "unix"],
+ "line-comment-position": "off",
+ "lines-around-comment": "off",
+ "lines-around-directive": "error",
+ "max-depth": ["error", 10],
+ "max-len": "off",
+ "max-lines": "off",
+ "max-nested-callbacks": "error",
+ "max-params": "off",
+ "max-statements": "off",
+ "max-statements-per-line": "error",
+ "multiline-ternary": "off",
+ "new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }],
+ "newline-after-var": "off",
+ "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
+ "new-parens": "error",
+ "no-array-constructor": "error",
+ "no-bitwise": "error",
+ "no-continue": "off",
+ "no-inline-comments": "off",
+ "no-lonely-if": "error",
+ "no-mixed-operators": "off",
+ "no-multi-assign": "error",
+ "no-multiple-empty-lines": "error",
+ "nonblock-statement-body-position": "error",
+ "no-negated-condition": "off",
+ "no-nested-ternary": "error",
+ "no-new-object": "error",
+ "no-plusplus": "off",
+ "no-restricted-syntax": "error",
+ "no-tabs": "error",
+ "no-ternary": "off",
+ "no-trailing-spaces": "error",
+ "no-underscore-dangle": "off",
+ "no-unneeded-ternary": "error",
+ "no-whitespace-before-property": "error",
+ "object-curly-newline": ["error", { "minProperties": 1 }],
+ "object-curly-spacing": ["error", "always"],
+ "object-property-newline": "error",
+ "one-var": ["error", "never"],
+ "one-var-declaration-per-line": "error",
+ "operator-assignment": "error",
+ "operator-linebreak": "error",
+ "padded-blocks": ["error", "never"],
+ "padding-line-between-statements": "off",
+ "quote-props": ["error", "as-needed"],
+ "quotes": ["error", "single"],
+ "require-jsdoc": "off",
+ "semi": ["error", "never"],
+ "semi-spacing": "error",
+ "sort-keys": "off",
+ "sort-vars": "error",
+ "space-before-blocks": "error",
+ "space-before-function-paren": ["error", {
+ "anonymous": "always",
+ "named": "never"
+ }],
+ "space-in-parens": "error",
+ "space-infix-ops": "error",
+ "space-unary-ops": "error",
+ "spaced-comment": "error",
+ "template-tag-spacing": "error",
+ "unicode-bom": "error",
+ "wrap-regex": "off",
+
+ // ECMAScript 6
+ "arrow-body-style": ["error", "as-needed"],
+ "arrow-parens": "error",
+ "arrow-spacing": "error",
+ "generator-star-spacing": "error",
+ "no-confusing-arrow": "error",
+ "no-duplicate-imports": "error",
+ "no-restricted-imports": "error",
+ "no-useless-computed-key": "error",
+ "no-useless-constructor": "error",
+ "no-useless-rename": "error",
+ "no-var": "error",
+ "object-shorthand": "error",
+ "prefer-arrow-callback": "error",
+ "prefer-const": "error",
+ "prefer-destructuring": "off",
+ "prefer-numeric-literals": "error",
+ "prefer-rest-params": "error",
+ "prefer-spread": "error",
+ "prefer-template": "error",
+ "rest-spread-spacing": "error",
+ "sort-imports": "error",
+ "symbol-description": "error",
+ "template-curly-spacing": "error",
+ "yield-star-spacing": "error"
+ }
+}
diff --git a/.gitattributes b/.gitattributes
index 0c6b2fea5f3b..21b6fd140ecb 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3,6 +3,14 @@
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
-*.less text eol=lf
*.md text eol=lf
+*.rb text eol=lf
+*.scss text eol=lf
+*.svg text eol=lf
+*.txt text eol=lf
*.yml text eol=lf
+# Don't diff or textually merge source maps
+*.map binary
+
+bootstrap.css linguist-vendored=false
+bootstrap.js linguist-vendored=false
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 000000000000..0aaa1bb94980
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,252 @@
+# Contributing to Bootstrap
+
+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.
+
+
+## Using the issue tracker
+
+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:
+
+* Please **do not** use the issue tracker for personal support requests. Stack
+ Overflow ([`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag), [Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](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** post comments consisting solely of "+1" or ":thumbsup:".
+ Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments)
+ instead. We reserve the right to delete comments which violate this rule.
+
+* Please **do not** open issues regarding the official themes offered on .
+ Instead, please email any questions or feedback regarding those themes to `themes AT getbootstrap DOT com`.
+
+
+## Issues and labels
+
+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 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 Sass files.
+- `docs` - Issues for improving or updating our documentation.
+- `examples` - Issues involving the example templates included in our docs.
+- `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v3.0.0` to `v3.1.0`).
+- `build` - Issues with our build system, which is used to run all our tests, concatenate and compile source files, and more.
+- `help wanted` - Issues we need or would love help from the community to resolve.
+- `js` - Issues stemming from our compiled or source JavaScript files.
+- `meta` - Issues with the project itself or our GitHub repository.
+
+For a complete look at our labels, see the [project labels page](https://github.com/twbs/bootstrap/labels).
+
+
+## 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:
+
+0. **Validate and lint your code** — [validate your HTML](https://html5.validator.nu/)
+ and [lint your HTML](https://github.com/twbs/bootlint) to ensure your
+ problem isn't caused by a simple error in your own code.
+
+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](https://css-tricks.com/reduced-test-cases/) and a live example.
+ [This JS Bin](https://jsbin.com/lolome/edit?html,output) 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.
+>
+> `` - 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).
+
+### Reporting upstream browser bugs
+
+Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se.
+When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](https://getbootstrap.com/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web).
+
+| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes |
+| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- |
+| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. |
+| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit https://bugreport.apple.com | In Apple's bug reporter, choose "Safari" as the product. |
+| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://code.google.com/p/chromium/issues/list | Click the "New issue" button. |
+| Microsoft | Edge | EdgeHTML | https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/ | |
+
+### Issues bots
+
+[@twbs-lmvtfy](https://github.com/twbs-lmvtfy) is a Bootstrap bot that hangs out in our GitHub issue tracker and automatically checks for HTML validation errors in live examples (e.g. jsFiddles, JS Bins, Bootplys, Plunks, CodePens, etc.) posted in issue comments. If it finds any errors, it will post a follow-up comment on the issue and point out the errors. If this happens with an example you've posted, please fix the errors and post an updated live example. If you opened a bug report, please check whether the bug still occurs with your revised, valid live example. If the bug no longer occurs, it was probably due to your invalid HTML rather than something in Bootstrap and we'd appreciate it if you could close out the GitHub issue.
+
+
+## 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
+
+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 guidelines](#code-guidelines) used throughout the
+project (indentation, accurate comments, etc.) and any other requirements
+(such as test coverage).
+
+**Do not edit `bootstrap.css`, or `bootstrap.js`
+directly!** Those files are automatically generated. You should edit the
+source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/master/scss)
+and/or [`/bootstrap/js/`](https://github.com/twbs/bootstrap/tree/master/js) instead.
+
+Similarly, when contributing to Bootstrap's documentation, you should edit the
+documentation source files in
+[the `/bootstrap/docs/` directory of the `master` branch](https://github.com/twbs/bootstrap/tree/master/docs).
+**Do not edit the `gh-pages` branch.** That branch is generated from the
+documentation source files and is managed separately by the Bootstrap Core Team.
+
+Adhering to the following process is the best way to get your work
+included in the project:
+
+1. [Fork](https://help.github.com/articles/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//bootstrap.git
+ # Navigate to the newly cloned directory
+ cd bootstrap
+ # 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
+ ```
+
+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/about-git-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
+ ```
+
+7. [Open a Pull Request](https://help.github.com/articles/about-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 terms of the [MIT License](LICENSE) (if it
+includes code changes) and under the terms of the
+[Creative Commons Attribution 3.0 Unported License](docs/LICENSE)
+(if it includes documentation changes).
+
+### Pull request bots
+
+[@twbs-rorschach](https://github.com/twbs-rorschach) is a Bootstrap bot that hangs out in our GitHub issue tracker and automatically checks all pull requests for a few simple common mistakes. It's possible that Rorschach might leave a comment on your pull request and then close it. If that happens, simply fix the problem(s) mentioned in the comment (there should be link(s) in the comment explaining the problem(s) in detail) and then either:
+
+* Push the revised version to your pull request's branch and post a comment on the pull request saying that you've fixed the problem(s). One of the Bootstrap Core Team members will then come along and reopen your pull request.
+* Or you can just open a new pull request for your revised version.
+
+[@twbs-savage](https://github.com/twbs-savage) is a Bootstrap bot that automatically runs cross-browser tests (via [Sauce](https://saucelabs.com/) and Travis CI) on JavaScript pull requests. Savage will leave a comment on pull requests stating whether cross-browser JS tests passed or failed, with a link to the full Travis build details. If your pull request fails, check the Travis log to see which browser + OS combinations failed. Each browser test in the Travis log includes a link to a Sauce page with details about the test. On those details pages, you can watch a screencast of the test run to see exactly which unit tests failed.
+
+
+## Code guidelines
+
+### HTML
+
+[Adhere to the Code Guide.](http://codeguide.co/#html)
+
+- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags).
+- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
+- Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility.
+
+### CSS
+
+[Adhere to the Code Guide.](http://codeguide.co/#css)
+
+- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG20/#visual-audio-contrast).
+- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](http://a11yproject.com/posts/never-remove-css-outlines/) for more details.
+
+### JS
+
+- No semicolons (in client-side JS)
+- 2 spaces (no tabs)
+- strict mode
+- "Attractive"
+- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](https://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](https://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded.
+
+### Checking coding style
+
+Run `npm run test` before committing to ensure your changes follow our coding standards.
+
+
+## License
+
+By contributing your code, you agree to license your contribution under the [MIT License](LICENSE).
+By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](docs/LICENSE).
+
+Prior to v3.1.0, Bootstrap's code was released under the Apache License v2.0.
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 000000000000..98b760ecadae
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,22 @@
+Before opening an issue:
+
+- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
+- [Validate](https://html5.validator.nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
+- Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs
+- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
+
+When asking general "how to" questions:
+
+- Please do not open an issue here
+- Instead, ask for help on [StackOverflow, IRC, or Slack](https://github.com/twbs/bootstrap/blob/master/README.md#community)
+
+When reporting a bug, include:
+
+- Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
+- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
+- Reduced test cases and potential fixes using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/)
+
+When suggesting a feature, include:
+
+- As much detail as possible for what we should add and why it's important to Bootstrap
+- Relevant links to prior art, screenshots, or live demos whenever possible
diff --git a/.gitignore b/.gitignore
index 465cdb4633be..2ea8867b2dc1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,42 +1,46 @@
# Ignore docs files
_gh_pages
_site
+
+# Ignore ruby files
.ruby-version
+.bundle
+vendor/cache
+vendor/bundle
# Numerous always-ignore extensions
*.diff
*.err
-*.orig
*.log
+*.orig
*.rej
*.swo
*.swp
-*.zip
*.vi
+*.zip
*~
# OS or Editor folders
-.DS_Store
._*
-Thumbs.db
.cache
+.DS_Store
+.idea
.project
.settings
.tmproj
*.esproj
-nbproject
*.sublime-project
*.sublime-workspace
-.idea
+nbproject
+Thumbs.db
# Komodo
-*.komodoproject
.komodotools
+*.komodoproject
-# grunt-html-validation
-validation-status.json
-validation-report.json
+# Jekyll metadata and extra config file for `github` script
+docs/.jekyll-metadata
+twbsconfig.yml
# Folders to ignore
node_modules
-bower_components
diff --git a/.stylelintignore b/.stylelintignore
new file mode 100644
index 000000000000..7bc488e5f871
--- /dev/null
+++ b/.stylelintignore
@@ -0,0 +1,4 @@
+**/*.min.css
+**/dist/
+**/vendor/
+/_gh_pages/
diff --git a/less/.csscomb.json b/.stylelintrc
similarity index 51%
rename from less/.csscomb.json
rename to .stylelintrc
index c3d0c088b899..4a47533189e5 100644
--- a/less/.csscomb.json
+++ b/.stylelintrc
@@ -1,28 +1,60 @@
{
- "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": [
- [
+ "extends": ["stylelint-config-standard", "stylelint-config-recommended-scss"],
+ "plugins": [
+ "stylelint-order"
+ ],
+ "rules": {
+ "at-rule-empty-line-before": [null,
+ "except": ["first-nested"]
+ ],
+ "at-rule-name-space-after": "always",
+ "at-rule-no-vendor-prefix": true,
+ "at-rule-semicolon-space-before": "never",
+ "block-closing-brace-empty-line-before": null,
+ "block-closing-brace-newline-after": null,
+ "block-opening-brace-space-before": null,
+ "color-named": "never",
+ "declaration-block-semicolon-newline-after": "always-multi-line",
+ "declaration-block-semicolon-newline-before": "never-multi-line",
+ "declaration-block-semicolon-space-after": "always-single-line",
+ "declaration-empty-line-before": null,
+ "declaration-no-important": true,
+ "font-family-name-quotes": "always-where-recommended",
+ "font-weight-notation": "numeric",
+ "function-url-no-scheme-relative": true,
+ "function-url-quotes": "always",
+ "length-zero-no-unit": true,
+ "max-empty-lines": 2,
+ "max-line-length": null,
+ "media-feature-name-no-vendor-prefix": true,
+ "media-feature-parentheses-space-inside": "never",
+ "media-feature-range-operator-space-after": "always",
+ "media-feature-range-operator-space-before": "never",
+ "no-descending-specificity": null,
+ "no-duplicate-selectors": true,
+ "number-leading-zero": "never",
+ "order/properties-order": [
"position",
"top",
"right",
"bottom",
"left",
"z-index",
+ "box-sizing",
"display",
+ "flex",
+ "flex-align",
+ "flex-basis",
+ "flex-direction",
+ "flex-wrap",
+ "flex-flow",
+ "flex-grow",
+ "flex-order",
+ "flex-pack",
+ "align-items",
+ "align-self",
+ "justify-content",
+ "order",
"float",
"width",
"min-width",
@@ -30,10 +62,6 @@
"height",
"min-height",
"max-height",
- "-webkit-box-sizing",
- "-moz-box-sizing",
- "box-sizing",
- "-webkit-appearance",
"padding",
"padding-top",
"padding-right",
@@ -66,15 +94,10 @@
"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",
@@ -99,8 +122,7 @@
"word-spacing",
"-ms-word-wrap",
"word-wrap",
- "-moz-tab-size",
- "-o-tab-size",
+ "overflow-wrap",
"tab-size",
"white-space",
"vertical-align",
@@ -109,13 +131,11 @@
"list-style-type",
"list-style-image",
"pointer-events",
+ "-ms-touch-action",
+ "touch-action",
"cursor",
"visibility",
"zoom",
- "flex-direction",
- "flex-order",
- "flex-pack",
- "flex-align",
"table-layout",
"empty-cells",
"caption-side",
@@ -126,10 +146,6 @@
"counter-reset",
"counter-increment",
"resize",
- "-webkit-user-select",
- "-moz-user-select",
- "-ms-user-select",
- "-o-user-select",
"user-select",
"nav-index",
"nav-up",
@@ -139,22 +155,14 @@
"background",
"background-color",
"background-image",
- "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
- "filter:progid:DXImageTransform.Microsoft.gradient",
- "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
"filter",
"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",
@@ -181,117 +189,59 @@
"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"
- ]
- ]
+ ],
+ "property-no-vendor-prefix": true,
+ "rule-empty-line-before": null,
+ "selector-attribute-quotes": "always",
+ "selector-list-comma-newline-after": "always",
+ "selector-list-comma-newline-before": "never-multi-line",
+ "selector-list-comma-space-after": "always-single-line",
+ "selector-list-comma-space-before": "never-single-line",
+ "selector-max-attribute": 2,
+ "selector-max-class": 4,
+ "selector-max-combinators": 4,
+ "selector-max-compound-selectors": 4,
+ "selector-max-empty-lines": 1,
+ "selector-max-id": 0,
+ "selector-max-specificity": null,
+ "selector-max-type": 2,
+ "selector-max-universal": 1,
+ "selector-no-qualifying-type": true,
+ "selector-no-vendor-prefix": true,
+ "string-quotes": "double",
+ "value-keyword-case": "lower",
+ "value-list-comma-newline-after": "never-multi-line",
+ "value-list-comma-newline-before": "never-multi-line",
+ "value-list-comma-space-after": "always",
+ "value-no-vendor-prefix": true
+ }
}
diff --git a/.travis.yml b/.travis.yml
index 2e080ac1dc50..bc16945169a1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,31 +1,34 @@
+sudo: required
+dist: trusty
+addons:
+ chrome: stable
language: node_js
+git:
+ depth: 3
node_js:
- - "0.10"
+ - "6"
+ - "8"
before_install:
- - time sudo pip install --use-mirrors -r test-infra/requirements.txt
- - rvm use 1.9.3 --fuzzy
- - if [ "$TWBS_TEST" = validate-html ]; then echo "ruby=$(basename $(rvm gemdir)) jekyll=$JEKYLL_VERSION" > pseudo_Gemfile.lock; fi
+ - if [[ `npm -v` != 5* ]]; then npm install -g npm@5; fi
install:
- - time npm install -g grunt-cli
- - time ./test-infra/s3_cache.py download 'npm packages' test-infra/npm-shrinkwrap.canonical.json ./node_modules || time ./test-infra/uncached-npm-install.sh
- - if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py download rubygems pseudo_Gemfile.lock $(rvm gemdir) || gem install -N jekyll -v $JEKYLL_VERSION; fi
-after_script:
- - if [ "$TWBS_TEST" = core ]; then time ./test-infra/s3_cache.py upload 'npm packages' test-infra/npm-shrinkwrap.canonical.json ./node_modules; fi
- - if [ "$TWBS_TEST" = validate-html ]; then time ./test-infra/s3_cache.py upload rubygems pseudo_Gemfile.lock $(rvm gemdir); fi
-env:
- global:
- - JEKYLL_VERSION: 1.4.1
- - SAUCE_USERNAME: bootstrap
- - secure: "pJkBwnuae9dKU5tEcCqccfS1QQw7/meEcfz63fM7ba7QJNjoA6BaXj08L5Z3Vb5vBmVPwBawxo5Hp0jC0r/Z/O0hGnAmz/Cz09L+cy7dSAZ9x4hvZePSja/UAusaB5ogMoO8l2b773MzgQeSmrLbExr9BWLeqEfjC2hFgdgHLaQ="
- - secure: "gqjqISbxBJK6byFbsmr1AyP1qoWH+rap06A2gI7v72+Tn2PU2nYkIMUkCvhZw6K889jv+LhQ/ybcBxDOXHpNCExCnSgB4dcnmYp+9oeNZb37jSP0rQ+Ib4OTLjzc3/FawE/fUq5kukZTC7porzc/k0qJNLAZRx3YLALmK1GIdUY="
- - secure: "Gghh/e3Gsbj1+4RR9Lh2aR/xJl35HWiHqlPIeSUqE9D7uDCVTAwNce/dGL3Ew7uJPfJ6Pgr70wD3zgu3stw0Zmzayax0hiDtGwcQCxVIER08wqGANK9C2Q7PYJkNTNtiTo6ehKWbdV4Z+/U+TEYyQfpQTDbAFYk/vVpsdjp0Lmc="
- - secure: "RTbRdx4G/2OTLfrZtP1VbRljxEmd6A1F3GqXboeQTldsnAlwpsES65es5CE3ub/rmixLApOY9ot7OPmNixFgC2Y8xOsV7lNCC62QVpmqQEDyGFFQKb3yO6/dmwQxdsCqGfzf9Np6Wh5V22QFvr50ZLKLd7Uhd9oXMDIk/z1MJ3o="
- - secure: "Besg41eyU+2mfxrywQ4ydOShMdc34ImaO0S0ENP+aCOBuyNBIgP59wy5tBMmyai2/8eInYeVps4Td96mWInMMxzTe3Bar7eTLG5tWVKRSr/wc4NBPZ/ppoPAmCEsz9Y+VptRH9/FO8n7hsL9EFZ+xBKbG+C0SccGoyBDpA5j7/w="
- - secure: "Ptiv7phCImFP3ALIz+sMQzrZg8k7C1gLZbFBhWxjnQr3g06wIfX3Ls5y9OHvxid+lOZZjISui3wzBVgpVHqwHUYf96+r0mo6/mJ+F4ffUmShZANVaIMD/JRTnXhUQJbvntGLvxn1EYWPdNM+2IHJrMipnjHxU9tkgAnlel4Zdew="
- matrix:
- - TWBS_TEST=core
- - TWBS_TEST=validate-html
- - TWBS_TEST=sauce-js-unit
- - TWBS_TEST=browserstack-js-unit
-matrix:
- fast_finish: true
+ - bundle install --deployment --jobs=3 --retry=3
+ - npm install
+after_success:
+ - if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then npm run docs-upload-preview; fi
+stages:
+ - test
+ - name: browser
+ if: type = push
+jobs:
+ include:
+ - stage: browser
+ node_js: 8
+ script: if ! git log --format=%B --no-merges -n 1 | grep '\[skip browser\]'; then npm test && npm run js-test-cloud; fi
+cache:
+ directories:
+ - node_modules
+ - vendor/bundle
+notifications:
+ slack: heybb:iz4wwosL0N0EdaX1gvgkU0NH
+ webhooks:
+ - http://savage.twbsapps.com/savage/travis
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000000..660428d8fd2e
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mdo@getbootstrap.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 7d7b0fb6a656..000000000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,192 +0,0 @@
-# Contributing to Bootstrap
-
-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.
-
-
-## Using the issue tracker
-
-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:
-
-* Please **do not** use the issue tracker for personal support requests. Stack
- Overflow ([`twitter-bootstrap-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3) 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.
->
-> `` - 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
-
-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 guidelines](#code-guidelines) used throughout the
-project (indentation, accurate comments, etc.) and any other requirements
-(such as test coverage).
-
-Adhering to the following 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//bootstrap.git
- # Navigate to the newly cloned directory
- cd bootstrap
- # 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
- ```
-
-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
- ```
-
-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 terms of the [MIT License](LICENSE.md).
-
-
-## Code guidelines
-
-### HTML
-
-- Two spaces for indentation, never tabs.
-- Double quotes only, never single quotes.
-- Always use proper indentation.
-- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags).
-- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
-- Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility.
-
-### 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;`).
-- End all lines with a semi-colon.
-- For multiple, comma-separated selectors, place each selector on its own line.
-- Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks).
-- Attribute selectors should only be used where absolutely necessary (e.g., form controls) and should be avoided on custom components for performance and explicitness.
-- Series of classes for a component should include a base class (e.g., `.component`) and use the base class as a prefix for modifier and sub-components (e.g., `.component-lg`).
-- Avoid inheritance and over nesting—use single, explicit classes whenever possible.
-- When feasible, default color palettes should comply with [WCAG color contrast guidelines](http://www.w3.org/TR/WCAG20/#visual-audio-contrast).
-
-### JS
-
-- No semicolons
-- Comma first
-- 2 spaces (no tabs)
-- strict mode
-- "Attractive"
-
-
-## 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.
-
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 000000000000..b80761f888f9
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,8 @@
+source 'https://rubygems.org'
+
+group :development, :test do
+ gem 'jekyll', '~> 3.7.0'
+ gem 'jekyll-redirect-from', '~> 0.13.0'
+ gem 'jekyll-sitemap', '~> 1.1.1'
+ gem 'jekyll-toc', '~> 0.5.1'
+end
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 000000000000..a49115b33386
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,80 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ addressable (2.5.2)
+ public_suffix (>= 2.0.2, < 4.0)
+ colorator (1.1.0)
+ concurrent-ruby (1.0.5)
+ em-websocket (0.5.1)
+ eventmachine (>= 0.12.9)
+ http_parser.rb (~> 0.6.0)
+ eventmachine (1.2.5)
+ eventmachine (1.2.5-x64-mingw32)
+ ffi (1.9.18)
+ ffi (1.9.18-x64-mingw32)
+ forwardable-extended (2.6.0)
+ http_parser.rb (0.6.0)
+ i18n (0.9.1)
+ concurrent-ruby (~> 1.0)
+ jekyll (3.7.0)
+ addressable (~> 2.4)
+ colorator (~> 1.0)
+ em-websocket (~> 0.5)
+ i18n (~> 0.7)
+ jekyll-sass-converter (~> 1.0)
+ jekyll-watch (~> 2.0)
+ kramdown (~> 1.14)
+ liquid (~> 4.0)
+ mercenary (~> 0.3.3)
+ pathutil (~> 0.9)
+ rouge (>= 1.7, < 4)
+ safe_yaml (~> 1.0)
+ jekyll-redirect-from (0.13.0)
+ jekyll (~> 3.3)
+ jekyll-sass-converter (1.5.1)
+ sass (~> 3.4)
+ jekyll-sitemap (1.1.1)
+ jekyll (~> 3.3)
+ jekyll-toc (0.5.1)
+ nokogiri (~> 1.6)
+ jekyll-watch (2.0.0)
+ listen (~> 3.0)
+ kramdown (1.16.2)
+ liquid (4.0.0)
+ listen (3.1.5)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
+ ruby_dep (~> 1.2)
+ mercenary (0.3.6)
+ mini_portile2 (2.3.0)
+ nokogiri (1.8.1)
+ mini_portile2 (~> 2.3.0)
+ nokogiri (1.8.1-x64-mingw32)
+ mini_portile2 (~> 2.3.0)
+ pathutil (0.16.1)
+ forwardable-extended (~> 2.6)
+ public_suffix (3.0.1)
+ rb-fsevent (0.10.2)
+ rb-inotify (0.9.10)
+ ffi (>= 0.5.0, < 2)
+ rouge (3.1.0)
+ ruby_dep (1.5.0)
+ safe_yaml (1.0.4)
+ sass (3.5.5)
+ sass-listen (~> 4.0.0)
+ sass-listen (4.0.0)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
+
+PLATFORMS
+ ruby
+ x64-mingw32
+
+DEPENDENCIES
+ jekyll (~> 3.7.0)
+ jekyll-redirect-from (~> 0.13.0)
+ jekyll-sitemap (~> 1.1.1)
+ jekyll-toc (~> 0.5.1)
+
+BUNDLED WITH
+ 1.16.1
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index ec9fb594e731..000000000000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,418 +0,0 @@
-/*!
- * Bootstrap's Gruntfile
- * http://getbootstrap.com
- * Copyright 2013-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
-module.exports = function (grunt) {
- 'use strict';
-
- // Force use of Unix newlines
- grunt.util.linefeed = '\n';
-
- RegExp.quote = function (string) {
- return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
- };
-
- var fs = require('fs');
- var path = require('path');
- var generateGlyphiconsData = require('./docs/grunt/bs-glyphicons-data-generator.js');
- var BsLessdocParser = require('./docs/grunt/bs-lessdoc-parser.js');
- var generateRawFilesJs = require('./docs/grunt/bs-raw-files-generator.js');
- var updateShrinkwrap = require('./test-infra/shrinkwrap.js');
-
- // Project configuration.
- grunt.initConfig({
-
- // Metadata.
- pkg: grunt.file.readJSON('package.json'),
- banner: '/*!\n' +
- ' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
- ' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
- ' * Licensed under <%= _.pluck(pkg.licenses, "type") %> (<%= _.pluck(pkg.licenses, "url") %>)\n' +
- ' */\n',
- jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap requires jQuery\') }\n\n',
-
- // Task configuration.
- clean: {
- dist: 'dist'
- },
-
- jshint: {
- options: {
- jshintrc: 'js/.jshintrc'
- },
- grunt: {
- src: ['Gruntfile.js', 'docs/grunt/*.js', 'test-infra/shrinkwrap.js']
- },
- src: {
- src: 'js/*.js'
- },
- test: {
- src: 'js/tests/unit/*.js'
- },
- assets: {
- src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
- }
- },
-
- jscs: {
- options: {
- config: 'js/.jscs.json',
- },
- grunt: {
- src: ['Gruntfile.js', 'docs/grunt/*.js', 'test-infra/shrinkwrap.js']
- },
- src: {
- src: 'js/*.js'
- },
- test: {
- src: 'js/tests/unit/*.js'
- },
- assets: {
- src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
- }
- },
-
- csslint: {
- options: {
- csslintrc: 'less/.csslintrc'
- },
- src: [
- 'dist/css/bootstrap.css',
- 'dist/css/bootstrap-theme.css',
- 'docs/assets/css/docs.css'
- ]
- },
-
- concat: {
- options: {
- banner: '<%= banner %>\n<%= jqueryCheck %>',
- stripBanners: false
- },
- bootstrap: {
- src: [
- 'js/transition.js',
- 'js/alert.js',
- 'js/button.js',
- 'js/carousel.js',
- 'js/collapse.js',
- 'js/dropdown.js',
- 'js/modal.js',
- 'js/tooltip.js',
- 'js/popover.js',
- 'js/scrollspy.js',
- 'js/tab.js',
- 'js/affix.js'
- ],
- dest: 'dist/js/<%= pkg.name %>.js'
- }
- },
-
- uglify: {
- bootstrap: {
- options: {
- banner: '<%= banner %>',
- report: 'min'
- },
- src: '<%= concat.bootstrap.dest %>',
- dest: 'dist/js/<%= pkg.name %>.min.js'
- },
- customize: {
- options: {
- preserveComments: 'some',
- report: 'min'
- },
- src: [
- 'docs/assets/js/vendor/less.min.js',
- 'docs/assets/js/vendor/jszip.js',
- 'docs/assets/js/vendor/uglify.min.js',
- 'docs/assets/js/vendor/blob.js',
- 'docs/assets/js/vendor/filesaver.js',
- 'docs/assets/js/raw-files.min.js',
- 'docs/assets/js/customizer.js'
- ],
- dest: 'docs/assets/js/customize.min.js'
- },
- docsJs: {
- options: {
- preserveComments: 'some',
- report: 'min'
- },
- src: [
- 'docs/assets/js/vendor/holder.js',
- 'docs/assets/js/application.js'
- ],
- dest: 'docs/assets/js/docs.min.js'
- }
- },
-
- less: {
- compileCore: {
- options: {
- strictMath: true,
- sourceMap: true,
- outputSourceFiles: true,
- sourceMapURL: '<%= pkg.name %>.css.map',
- sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
- },
- files: {
- 'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less'
- }
- },
- compileTheme: {
- options: {
- strictMath: true,
- sourceMap: true,
- outputSourceFiles: true,
- sourceMapURL: '<%= pkg.name %>-theme.css.map',
- sourceMapFilename: 'dist/css/<%= pkg.name %>-theme.css.map'
- },
- files: {
- 'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less'
- }
- },
- minify: {
- options: {
- cleancss: true,
- report: 'min'
- },
- files: {
- 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css',
- 'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css'
- }
- }
- },
-
- cssmin: {
- compress: {
- options: {
- keepSpecialComments: '*',
- noAdvanced: true, // turn advanced optimizations off until the issue is fixed in clean-css
- report: 'min',
- selectorsMergeMode: 'ie8'
- },
- src: [
- 'docs/assets/css/docs.css',
- 'docs/assets/css/pygments-manni.css'
- ],
- dest: 'docs/assets/css/docs.min.css'
- }
- },
-
- usebanner: {
- dist: {
- options: {
- position: 'top',
- banner: '<%= banner %>'
- },
- files: {
- src: [
- 'dist/css/<%= pkg.name %>.css',
- 'dist/css/<%= pkg.name %>.min.css',
- 'dist/css/<%= pkg.name %>-theme.css',
- 'dist/css/<%= pkg.name %>-theme.min.css'
- ]
- }
- }
- },
-
- csscomb: {
- sort: {
- options: {
- config: 'less/.csscomb.json'
- },
- files: {
- 'dist/css/<%= pkg.name %>.css': 'dist/css/<%= pkg.name %>.css',
- 'dist/css/<%= pkg.name %>-theme.css': 'dist/css/<%= pkg.name %>-theme.css'
- }
- }
- },
-
- copy: {
- fonts: {
- expand: true,
- src: 'fonts/*',
- dest: 'dist/'
- },
- docs: {
- expand: true,
- cwd: './dist',
- src: [
- '{css,js}/*.min.*',
- 'css/*.map',
- 'fonts/*'
- ],
- dest: 'docs/dist'
- }
- },
-
- qunit: {
- options: {
- inject: 'js/tests/unit/phantom.js'
- },
- files: 'js/tests/*.html'
- },
-
- connect: {
- server: {
- options: {
- port: 3000,
- base: '.'
- }
- }
- },
-
- jekyll: {
- docs: {}
- },
-
- jade: {
- compile: {
- options: {
- pretty: true,
- data: function () {
- var filePath = path.join(__dirname, 'less/variables.less');
- var fileContent = fs.readFileSync(filePath, {encoding: 'utf8'});
- var parser = new BsLessdocParser(fileContent);
- return {sections: parser.parseFile()};
- }
- },
- files: {
- 'docs/_includes/customizer-variables.html': 'docs/customizer-variables.jade',
- 'docs/_includes/nav-customize.html': 'docs/customizer-nav.jade'
- }
- }
- },
-
- validation: {
- options: {
- charset: 'utf-8',
- doctype: 'HTML5',
- failHard: true,
- reset: true,
- relaxerror: [
- 'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
- 'Element img is missing required attribute src.'
- ]
- },
- files: {
- src: '_gh_pages/**/*.html'
- }
- },
-
- watch: {
- src: {
- files: '<%= jshint.src.src %>',
- tasks: ['jshint:src', 'qunit']
- },
- test: {
- files: '<%= jshint.test.src %>',
- tasks: ['jshint:test', 'qunit']
- },
- less: {
- files: 'less/*.less',
- tasks: 'less'
- }
- },
-
- sed: {
- versionNumber: {
- pattern: (function () {
- var old = grunt.option('oldver');
- return old ? RegExp.quote(old) : old;
- })(),
- replacement: grunt.option('newver'),
- recursive: true
- }
- },
-
- 'saucelabs-qunit': {
- all: {
- options: {
- build: process.env.TRAVIS_JOB_ID,
- concurrency: 10,
- urls: ['http://127.0.0.1:3000/js/tests/index.html'],
- browsers: grunt.file.readYAML('test-infra/sauce_browsers.yml')
- }
- }
- },
-
- exec: {
- npmUpdate: {
- command: 'npm update'
- },
- npmShrinkWrap: {
- command: 'npm shrinkwrap --dev'
- }
- }
- });
-
-
- // These plugins provide necessary tasks.
- require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
- grunt.loadNpmTasks('browserstack-runner');
-
- // Docs HTML validation task
- grunt.registerTask('validate-html', ['jekyll', 'validation']);
-
- // Test task.
- var testSubtasks = [];
- // Skip core tests if running a different subset of the test suite
- if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'core') {
- testSubtasks = testSubtasks.concat(['dist-css', 'csslint', 'jshint', 'jscs', 'qunit', 'build-customizer-html']);
- }
- // Skip HTML validation if running a different subset of the test suite
- if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'validate-html') {
- testSubtasks.push('validate-html');
- }
- // Only run Sauce Labs tests if there's a Sauce access key
- if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
- // Skip Sauce if running a different subset of the test suite
- (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'sauce-js-unit')) {
- testSubtasks.push('connect');
- testSubtasks.push('saucelabs-qunit');
- }
- // Only run BrowserStack tests if there's a BrowserStack access key
- if (typeof process.env.BROWSERSTACK_KEY !== 'undefined' &&
- // Skip BrowserStack if running a different subset of the test suite
- (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'browserstack-js-unit')) {
- testSubtasks.push('browserstack_runner');
- }
- grunt.registerTask('test', testSubtasks);
-
- // JS distribution task.
- grunt.registerTask('dist-js', ['concat', 'uglify']);
-
- // CSS distribution task.
- grunt.registerTask('dist-css', ['less', 'cssmin', 'csscomb', 'usebanner']);
-
- // Docs distribution task.
- grunt.registerTask('dist-docs', 'copy:docs');
-
- // Full distribution task.
- grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-docs', 'dist-js']);
-
- // Default task.
- grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer', 'update-shrinkwrap']);
-
- // 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', generateGlyphiconsData);
-
- // task for building customizer
- grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
- grunt.registerTask('build-customizer-html', 'jade');
- grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
- var banner = grunt.template.process('<%= banner %>');
- generateRawFilesJs(banner);
- });
-
- // Task for updating the npm packages used by the Travis build.
- grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', 'exec:npmShrinkWrap', '_update-shrinkwrap']);
- grunt.registerTask('_update-shrinkwrap', function () { updateShrinkwrap.call(this, grunt); });
-};
diff --git a/LICENSE b/LICENSE
index 8d94aa9ac9fc..1381cb2be454 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,7 @@
The MIT License (MIT)
-Copyright (c) 2011-2014 Twitter, Inc
+Copyright (c) 2011-2017 Twitter, Inc.
+Copyright (c) 2011-2017 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index da5dfe223e0d..84f55adf09e6 100644
--- a/README.md
+++ b/README.md
@@ -1,33 +1,69 @@
-# [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?theme=shields.io)](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 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 !
+
+
+
## 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](#quick-start)
+- [Status](#status)
+- [What's included](#whats-included)
+- [Bugs and feature requests](#bugs-and-feature-requests)
+- [Documentation](#documentation)
+- [Contributing](#contributing)
+- [Community](#community)
+- [Versioning](#versioning)
+- [Creators](#creators)
+- [Copyright and license](#copyright-and-license)
## Quick start
-Three quick start options are available:
+Several quick start options are available:
+
+- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-beta.3.zip)
+- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
+- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@4.0.0-beta.3`
+- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.0.0-beta.3`
+- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.0.0-beta.3`
+- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap -Pre` Sass: `Install-Package bootstrap.sass -Pre` (`-Pre` is only required until Bootstrap v4 has a stable release).
+
+Read the [Getting started page](https://getbootstrap.com/docs/4.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
+
+## Status
-- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.1.0.zip).
-- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
-- Install with [Bower](http://bower.io): `bower install bootstrap`.
+[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/)
+[![Build Status](https://img.shields.io/travis/twbs/bootstrap/v4-dev.svg)](https://travis-ci.org/twbs/bootstrap)
+[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
+[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
+[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap)
+[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap.svg)](https://packagist.org/packages/twbs/bootstrap)
+[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/absoluteLatest)
+[![peerDependencies Status](https://img.shields.io/david/peer/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=peer)
+[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev)
+[![CSS gzip size](http://img.badgesize.io/twbs/bootstrap/v4-dev/dist/css/bootstrap.min.css?compression=gzip&label=CSS+gzip+size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/css/bootstrap.min.css)
+[![JS gzip size](http://img.badgesize.io/twbs/bootstrap/v4-dev/dist/js/bootstrap.min.js?compression=gzip&label=JS+gzip+size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/js/bootstrap.min.js)
-Read the [Getting Started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
+[![Sauce Labs Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
-### What's included
+## What's included
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
@@ -35,21 +71,25 @@ Within the download you'll find the following directories and files, logically g
bootstrap/
├── css/
│ ├── bootstrap.css
+│ ├── bootstrap.css.map
│ ├── bootstrap.min.css
-│ ├── bootstrap-theme.css
-│ └── bootstrap-theme.min.css
-├── js/
-│ ├── bootstrap.js
-│ └── bootstrap.min.js
-└── fonts/
- ├── glyphicons-halflings-regular.eot
- ├── glyphicons-halflings-regular.svg
- ├── glyphicons-halflings-regular.ttf
- └── glyphicons-halflings-regular.woff
+│ ├── bootstrap.min.css.map
+│ ├── bootstrap-grid.css
+│ ├── bootstrap-grid.css.map
+│ ├── bootstrap-grid.min.css
+│ ├── bootstrap-grid.min.css.map
+│ ├── bootstrap-reboot.css
+│ ├── bootstrap-reboot.css.map
+│ ├── bootstrap-reboot.min.css
+│ └── bootstrap-reboot.min.css.map
+└── js/
+ ├── bootstrap.bundle.js
+ ├── bootstrap.bundle.min.js
+ ├── bootstrap.js
+ └── bootstrap.min.js
```
-We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). Fonts from Glyphicons are included, as is the optional Bootstrap theme.
-
+We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developers.google.com/web/tools/chrome-devtools/debug/readability/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/).
## Bugs and feature requests
@@ -59,115 +99,69 @@ Have a bug or a feature request? Please first read the [issue guidelines](https:
## Documentation
-Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at . The docs may also be run locally.
+Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages at . The docs may also be run locally.
+
+Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in the `_scripts.html` include.
### Running documentation locally
-1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.x).
- - **Windows users:** Read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems. We use Pygments for syntax highlighting, so make sure to read the sections on installing Python and Pygments.
-2. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
- - **Windows users:** While we use Jekyll's `encoding` setting, you might still need to change the command prompt's character encoding ([code page](http://en.wikipedia.org/wiki/Windows_code_page)) to UTF-8 so Jekyll runs without errors. For Ruby 2.0.0, run `chcp 65001` first. For Ruby 1.9.3, you can alternatively do `SET LANG=en_EN.UTF-8`.
-3. Open in your browser, and voilà.
+1. Run through the [tooling setup](https://getbootstrap.com/docs/4.0/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
+2. Run `npm install` to install Node.js dependencies.
+3. Run `npm run test` (or a specific NPM script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
+4. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line.
+5. Open `http://localhost:9001` in your browser, and voilà.
-Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).
+Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/home/).
### Documentation for previous releases
-Documentation for v2.3.2 has been made available for the time being at while folks transition to Bootstrap 3.
+- For v2.3.2:
+- For v3.3.x:
[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
-
-## Compiling CSS and JavaScript
-
-Bootstrap uses [Grunt](http://gruntjs.com/) with convenient methods for working with the framework. It's how we compile our code, run tests, and more. To use it, install the required dependencies as directed and then run some Grunt commands.
-
-### Install Grunt
-
-From the command line:
-
-1. Install `grunt-cli` globally with `npm install -g grunt-cli`.
-2. Navigate to the root `/bootstrap` directory, then run `npm install`. npm will look at [package.json](https://github.com/twbs/bootstrap/blob/master/package.json) and automatically install the necessary local dependencies listed there.
-
-When completed, you'll be able to run the various Grunt commands provided from the command line.
-
-**Unfamiliar with `npm`? Don't have node installed?** That's a-okay. npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js. [Download and install node.js](http://nodejs.org/download/) before proceeding.
-
-### Available Grunt commands
-
-#### Build - `grunt`
-Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
-
-#### Only compile CSS and JavaScript - `grunt dist`
-`grunt dist` creates the `/dist` directory with compiled files. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
-
-#### Tests - `grunt test`
-Runs [JSHint](http://jshint.com) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI).
-
-#### Watch - `grunt watch`
-This is a convenience method for watching just Less files and automatically building them whenever you save.
-
-### Troubleshooting dependencies
-
-Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`.
-
-
-
## Contributing
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](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://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 .
+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 .
## Community
-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-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
-
+Get updates on Bootstrap's development and chat with the project maintainers and community members.
+- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
+- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
+- Join [the official Slack room](https://bootstrap-slack.herokuapp.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 [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
+- 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.
## Versioning
-For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under the Semantic Versioning guidelines. Sometimes we screw up, but we'll adhere to these rules whenever possible.
-
-Releases will be numbered with the following format:
-
-`..`
+For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.
-And constructed with the following guidelines:
+See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release.
-- Breaking backward compatibility **bumps the major** while resetting minor and patch
-- New additions without breaking backward compatibility **bumps the minor** while resetting the patch
-- Bug fixes and misc changes **bumps only the patch**
-For more information on SemVer, please visit .
-
-
-
-## Authors
+## Creators
**Mark Otto**
--
--
+-
+-
**Jacob Thornton**
--
--
-
+-
+-
## Copyright and license
-Code and documentation copyright 2011-2014 Twitter, Inc. Code released under [the MIT license](LICENSE). Docs released under [Creative Commons](docs/LICENSE).
+Code and documentation copyright 2011-2017 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).
diff --git a/_config.yml b/_config.yml
index 6d7ac99f38c7..7d7069eafc65 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,35 +1,81 @@
# Dependencies
-markdown: rdiscount
-pygments: true
+markdown: kramdown
+highlighter: rouge
+
+kramdown:
+ auto_ids: true
# Permalinks
-permalink: pretty
+permalink: pretty
# Server
-source: ./docs
-destination: ./_gh_pages
-host: 0.0.0.0
-port: 9001
-baseurl: /
-url: http://localhost:9001
-encoding: UTF-8
+source: "."
+destination: ./_gh_pages
+host: 0.0.0.0
+port: 9001
+baseurl: ""
+url: "https://getbootstrap.com"
+encoding: UTF-8
+exclude:
+ - .git/
+ - .github/
+ - assets/scss/
+ - build/
+ - js/
+ - node_modules/
+ - nuget/
+ - scss/
+ - vendor/
+ - CODE_OF_CONDUCT.md
+ - composer.json
+ - Gemfile
+ - Gemfile.lock
+ - package.js
+ - package.json
+ - package-lock.json
+ - README.md
+ - sache.json
+ - twbsconfig.yml
-exclude: ["vendor"]
+plugins:
+ - jekyll-redirect-from
+ - jekyll-sitemap
+ - jekyll-toc
-# Custom vars
-current_version: 3.1.0
-repo: https://github.com/twbs/bootstrap
-sass_repo: https://github.com/twbs/bootstrap-sass
+# Social
+title: Bootstrap
+description: "The most popular HTML, CSS, and JS library in the world."
+twitter: getbootstrap
+authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors"
+social_image_path: /assets/brand/bootstrap-social.png
+social_logo_path: /assets/brand/bootstrap-social-logo.png
-download:
- source: https://github.com/twbs/bootstrap/archive/v3.1.0.zip
- dist: https://github.com/twbs/bootstrap/releases/download/v3.1.0/bootstrap-3.1.0-dist.zip
- sass: https://github.com/twbs/bootstrap-sass/archive/v3.1.0.0.tar.gz
+# Custom variables
+current_version: 4.0.0-beta.3
+current_ruby_version: 4.0.0.beta3
+docs_version: 4.0
+repo: "https://github.com/twbs/bootstrap"
+slack: "https://bootstrap-slack.herokuapp.com"
+blog: "https://blog.getbootstrap.com"
+expo: "https://expo.getbootstrap.com"
+jobs: "https://jobs.getbootstrap.com"
+themes: "https://themes.getbootstrap.com"
-blog: http://blog.getbootstrap.com
-expo: http://expo.getbootstrap.com
+download:
+ source: "https://github.com/twbs/bootstrap/archive/v4.0.0-beta.3.zip"
+ dist: "https://github.com/twbs/bootstrap/releases/download/v4.0.0-beta.3/bootstrap-4.0.0-beta.3-dist.zip"
cdn:
- css: //netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css
- css_theme: //netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css
- js: //netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js
+ # See https://www.srihash.org for info on how to generate the hashes
+ css: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css"
+ css_hash: "sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy"
+ js: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js"
+ js_hash: "sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4"
+ jquery: "https://code.jquery.com/jquery-3.2.1.slim.min.js"
+ jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
+ popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
+ popper_hash: "sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
+
+toc:
+ min_level: 2
+ max_level: 4
diff --git a/_data/breakpoints.yml b/_data/breakpoints.yml
new file mode 100644
index 000000000000..3c8cfe293c09
--- /dev/null
+++ b/_data/breakpoints.yml
@@ -0,0 +1,29 @@
+- breakpoint: xs
+ abbr: ""
+ name: Extra small
+ min-width: 0px
+ container: ""
+
+- breakpoint: sm
+ abbr: -sm
+ name: Small
+ min-width: 576px
+ container: 540px
+
+- breakpoint: md
+ abbr: -md
+ name: Medium
+ min-width: 768px
+ container: 720px
+
+- breakpoint: lg
+ abbr: -lg
+ name: Large
+ min-width: 992px
+ container: 960px
+
+- breakpoint: xl
+ abbr: -xl
+ name: Extra large
+ min-width: 1200px
+ container: 1140px
diff --git a/_data/browser-bugs.yml b/_data/browser-bugs.yml
new file mode 100644
index 000000000000..1ef63f26cd51
--- /dev/null
+++ b/_data/browser-bugs.yml
@@ -0,0 +1,451 @@
+-
+ browser: >
+ Edge
+ summary: >
+ Visual artifacts in scrollable modal dialogs
+ upstream_bug: >
+ Edge#9011176
+ origin: >
+ Bootstrap#20755
+
+-
+ browser: >
+ Edge
+ summary: >
+ Native browser tooltip for `title` shows on first keyboard focus (in addition to custom tooltip component)
+ upstream_bug: >
+ Edge#6793560
+ origin: >
+ Bootstrap#18692
+
+-
+ browser: >
+ Edge
+ summary: >
+ Hovered element still remains in `:hover` state after scrolling away.
+ upstream_bug: >
+ Edge#5381673
+ origin: >
+ Bootstrap#14211
+
+-
+ browser: >
+ Edge
+ summary: >
+ CSS `border-radius` sometimes causes lines of bleed-through of the `background-color` of the parent element.
+ upstream_bug: >
+ Edge#3342037
+ origin: >
+ Bootstrap#16671
+
+-
+ browser: >
+ Edge
+ summary: >
+ `background` of `
` is only applied to first child cell instead of all cells in the row
+ upstream_bug: >
+ Edge#5865620
+ origin: >
+ Bootstrap#18504
+
+-
+ browser: >
+ Edge
+ summary: >
+ `@-ms-viewport{width: device-width;}` has side-effect of making scrollbars auto-hide
+ upstream_bug: >
+ Edge#7165383
+ origin: >
+ Bootstrap#18543
+
+-
+ browser: >
+ Edge
+ summary: >
+ Background color from lower layer bleeds through transparent border in some cases
+ upstream_bug: >
+ Edge#6274505
+ origin: >
+ Bootstrap#18228
+
+-
+ browser: >
+ Edge
+ summary: >
+ Hovering over descendant SVG element fires `mouseleave` event at ancestor
+ upstream_bug: >
+ Edge#7787318
+ origin: >
+ Bootstrap#19670
+
+-
+ browser: >
+ Edge
+ summary: >
+ Active `position: fixed;` `