diff --git a/js/.babelrc b/.babelrc
similarity index 72%
rename from js/.babelrc
rename to .babelrc
index ffc5e3b799..eb52c30ac1 100644
--- a/js/.babelrc
+++ b/.babelrc
@@ -3,8 +3,8 @@
[
"es2015",
{
- "modules": false,
- "loose": true
+ "loose": true,
+ "modules": false
}
]
],
diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md
similarity index 96%
rename from CONTRIBUTING.md
rename to .github/CONTRIBUTING.md
index c85be72903..6fc088d6bd 100644
--- a/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -25,13 +25,9 @@ restrictions:
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)
+ 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 or pull requests regarding the code in
- [`Normalize`](https://github.com/necolas/normalize.css) (open them in
- its repository).
-
* 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`.
@@ -46,7 +42,7 @@ Our bug tracker utilizes several labels to help organize and identify issues. He
- `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`).
-- `grunt` - Issues with our included JavaScript-based Gruntfile, which is used to run all our tests, concatenate and compile source files, and more.
+- `grunt` - 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.
@@ -73,7 +69,7 @@ Guidelines for bug reports:
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/qusafa/edit?html,output) is a helpful template.
+ [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
@@ -245,7 +241,7 @@ includes code changes) and under the terms of the
### Checking coding style
-Run `grunt test` before committing to ensure your changes follow our coding standards.
+Run `npm run test` before committing to ensure your changes follow our coding standards.
## License
diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
similarity index 100%
rename from ISSUE_TEMPLATE.md
rename to .github/ISSUE_TEMPLATE.md
diff --git a/.hound.yml b/.hound.yml
index 934a9a1307..7449ea3f95 100644
--- a/.hound.yml
+++ b/.hound.yml
@@ -1,19 +1,14 @@
fail_on_violations: true
scss:
- config_file: scss/.scss-lint.yml
- enabled: true
+ config_file: .scss-lint.yml
-javascript:
+jshint:
enabled: false
eslint:
- enabled: true
config_file: js/.eslintrc.json
-
-jscs:
- enabled: true
- config_file: js/.jscsrc
+ ignore_file: .houndignore
ruby:
enabled: false
diff --git a/.houndignore b/.houndignore
new file mode 100644
index 0000000000..7814652fb3
--- /dev/null
+++ b/.houndignore
@@ -0,0 +1,4 @@
+**/*.min.js
+**/vendor/*
+**/dist/*
+js/tests/*
diff --git a/scss/.scss-lint.yml b/.scss-lint.yml
similarity index 97%
rename from scss/.scss-lint.yml
rename to .scss-lint.yml
index 2f5dc20e12..eabc8a358c 100644
--- a/scss/.scss-lint.yml
+++ b/.scss-lint.yml
@@ -1,11 +1,8 @@
# Default application configuration that all configurations inherit from.
scss_files:
- - "**/*.scss"
+ - "scss/**/*.scss"
- "docs/assets/scss/**/*.scss"
-exclude:
- - "scss/_normalize.scss"
-
plugin_directories: ['.scss-linters']
# List of gem names to load custom linters from (make sure they are already
@@ -28,8 +25,6 @@ linters:
BorderZero:
enabled: true
convention: zero # or `none`
- exclude:
- - _normalize.scss
ChainedClasses:
enabled: false
@@ -43,8 +38,7 @@ linters:
Comment:
enabled: true
exclude:
- - _normalize.scss
- - bootstrap.scss
+ - scss/bootstrap.scss
style: silent
DebugStatement:
@@ -108,8 +102,6 @@ linters:
LeadingZero:
enabled: true
style: exclude_zero # or 'include_zero'
- exclude:
- - _normalize.scss
MergeableSelector:
enabled: false
@@ -122,7 +114,7 @@ linters:
NestingDepth:
enabled: true
- max_depth: 4
+ max_depth: 5
ignore_parent_selectors: false
PlaceholderInExtend:
@@ -138,8 +130,6 @@ linters:
ignore_unspecified: false
min_properties: 2
separate_groups: false
- exclude:
- - _normalize.scss
order:
- position
- top
@@ -160,6 +150,10 @@ linters:
- flex-grow
- flex-order
- flex-pack
+ - align-items
+ - align-self
+ - justify-content
+ - order
- float
- width
- min-width
@@ -535,8 +529,6 @@ linters:
identifier_list: base
additional_identifiers: []
excluded_identifiers: []
- exclude:
- - _normalize.scss
ZeroUnit:
enabled: true
diff --git a/.travis.yml b/.travis.yml
index dee6062c12..8be9f03dde 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,44 +1,34 @@
-sudo: required
+sudo: false
dist: trusty
language: node_js
git:
- depth: 10
+ depth: 3
node_js:
- "4"
- - "6"
+ - "8"
before_install:
- # Remove ./node_modules/.bin from PATH so node-which doesn't replace Unix which and cause RVM to barf. See https://github.com/travis-ci/travis-ci/issues/5092
- - export PATH=$(python -c 'from sys import argv;from collections import OrderedDict as od;print(":".join(od((p,None) for p in argv[1].split(":") if p.startswith("/")).keys()))' "$PATH")
- - rvm install 2.2
- - rvm use 2.2 --fuzzy
- - npm install -g npm@3
- - "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- - echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export TWBS_DO_VALIDATOR=$?; true
- - echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true
- - if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then export TWBS_DO_VALIDATOR=0; fi
+ - if [[ `npm -v` != 5* ]]; then npm install -g npm@5; fi
+ - "export TRAVIS_COMMIT_MSG=\"`git log --format=%B --no-merges -n 1`\""
+ - echo "$TRAVIS_COMMIT_MSG" | grep '\[skip browser\]'; export TWBS_DO_BROWSER=$?; true
install:
- - bundle install --deployment --jobs=3
- - cp grunt/npm-shrinkwrap.json ./
+ - bundle install --deployment --jobs=3 --retry=3
- npm install
+script:
+ - npm test
+ - if [ "$TWBS_TEST" = browser -a "$SAUCE_ACCESS_KEY" ]; then npm run js-test-cloud; fi
+after_success:
+ - if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then npm run docs-upload-preview; fi
cache:
directories:
- node_modules
- vendor/bundle
- - "$HOME/google-cloud-sdk"
env:
- global:
- - NPM_CONFIG_PROGRESS="false"
- matrix:
- - TWBS_TEST=core
- - TWBS_TEST=validate-html
- - TWBS_TEST=sauce-js-unit
+ - TWBS_TEST=core
+ - TWBS_TEST=browser
matrix:
- fast_finish: true
exclude:
- node_js: "4"
- env: TWBS_TEST=validate-html
- - node_js: "4"
- env: TWBS_TEST=sauce-js-unit
+ env: TWBS_TEST=browser
notifications:
slack: heybb:iz4wwosL0N0EdaX1gvgkU0NH
webhooks:
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 7b60d7c9a6..0000000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs.
-
-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.
diff --git a/Gemfile b/Gemfile
index a82dd93b03..801d198d59 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,8 +1,9 @@
source 'https://rubygems.org'
group :development, :test do
- gem 'jekyll', '~> 3.3.0'
- gem 'jekyll-redirect-from', '~> 0.11.0'
- gem 'jekyll-sitemap', '~> 0.11.0'
- gem 'scss_lint', '~> 0.50.2'
+ gem 'jekyll', '~> 3.5.1'
+ gem 'jekyll-redirect-from', '~> 0.12.1'
+ gem 'jekyll-sitemap', '~> 1.1.1'
+ gem 'jekyll-toc', '~> 0.3.0.pre1'
+ gem 'scss_lint', '~> 0.54.0'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index c19955c72b..271e485f8d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,56 +1,68 @@
GEM
remote: https://rubygems.org/
specs:
- addressable (2.4.0)
+ addressable (2.5.1)
+ public_suffix (~> 2.0, >= 2.0.2)
colorator (1.1.0)
- ffi (1.9.14)
+ ffi (1.9.18)
+ ffi (1.9.18-x64-mingw32)
forwardable-extended (2.6.0)
- jekyll (3.3.0)
+ jekyll (3.5.2)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
- liquid (~> 3.0)
+ liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
- jekyll-redirect-from (0.11.0)
- jekyll (>= 2.0)
- jekyll-sass-converter (1.4.0)
+ jekyll-redirect-from (0.12.1)
+ jekyll (~> 3.3)
+ jekyll-sass-converter (1.5.0)
sass (~> 3.4)
- jekyll-sitemap (0.11.0)
- addressable (~> 2.4.0)
+ jekyll-sitemap (1.1.1)
+ jekyll (~> 3.3)
+ jekyll-toc (0.3.0)
+ nokogiri (~> 1.6)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
- kramdown (1.12.0)
- liquid (3.0.6)
+ kramdown (1.14.0)
+ liquid (4.0.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
+ mini_portile2 (2.2.0)
+ nokogiri (1.8.0)
+ mini_portile2 (~> 2.2.0)
+ nokogiri (1.8.0-x64-mingw32)
+ mini_portile2 (~> 2.2.0)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
- rake (11.3.0)
- rb-fsevent (0.9.7)
- rb-inotify (0.9.7)
- ffi (>= 0.5.0)
+ public_suffix (2.0.5)
+ rake (12.0.0)
+ rb-fsevent (0.10.2)
+ rb-inotify (0.9.10)
+ ffi (>= 0.5.0, < 2)
rouge (1.11.1)
safe_yaml (1.0.4)
- sass (3.4.22)
- scss_lint (0.50.2)
- rake (>= 0.9, < 12)
+ sass (3.4.25)
+ scss_lint (0.54.0)
+ rake (>= 0.9, < 13)
sass (~> 3.4.20)
PLATFORMS
ruby
+ x64-mingw32
DEPENDENCIES
- jekyll (~> 3.3.0)
- jekyll-redirect-from (~> 0.11.0)
- jekyll-sitemap (~> 0.11.0)
- scss_lint (~> 0.50.2)
+ jekyll (~> 3.5.1)
+ jekyll-redirect-from (~> 0.12.1)
+ jekyll-sitemap (~> 1.1.1)
+ jekyll-toc (~> 0.3.0.pre1)
+ scss_lint (~> 0.54.0)
BUNDLED WITH
- 1.13.2
+ 1.15.3
diff --git a/Gruntfile.js b/Gruntfile.js
index cb1f0ff5a2..351802b94f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,266 +1,16 @@
/*!
* Bootstrap's Gruntfile
* https://getbootstrap.com
- * Copyright 2013-2016 The Bootstrap Authors
- * Copyright 2013-2016 Twitter, Inc.
+ * Copyright 2013-2017 The Bootstrap Authors
+ * Copyright 2013-2017 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 isTravis = require('is-travis');
-
- var configBridge = grunt.file.readJSON('./grunt/configBridge.json', { encoding: 'utf8' });
-
- Object.keys(configBridge.paths).forEach(function (key) {
- configBridge.paths[key].forEach(function (val, i, arr) {
- arr[i] = path.join('./docs', val);
- });
- });
+ 'use strict'
// 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 MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
- ' */\n',
- jqueryCheck: 'if (typeof jQuery === \'undefined\') {\n' +
- ' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\\'s JavaScript.\')\n' +
- '}\n',
- jqueryVersionCheck: '+function ($) {\n' +
- ' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' +
- ' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {\n' +
- ' throw new Error(\'Bootstrap\\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0\')\n' +
- ' }\n' +
- '}(jQuery);\n\n',
-
- // Task configuration.
- clean: {
- dist: 'dist',
- docs: 'docs/dist'
- },
-
- // JS build configuration
- babel: {
- dev: {
- options: {
- sourceMap: true
- },
- files: {
- 'js/dist/util.js' : 'js/src/util.js',
- 'js/dist/alert.js' : 'js/src/alert.js',
- 'js/dist/button.js' : 'js/src/button.js',
- 'js/dist/carousel.js' : 'js/src/carousel.js',
- 'js/dist/collapse.js' : 'js/src/collapse.js',
- 'js/dist/dropdown.js' : 'js/src/dropdown.js',
- 'js/dist/modal.js' : 'js/src/modal.js',
- 'js/dist/scrollspy.js' : 'js/src/scrollspy.js',
- 'js/dist/tab.js' : 'js/src/tab.js',
- 'js/dist/tooltip.js' : 'js/src/tooltip.js',
- 'js/dist/popover.js' : 'js/src/popover.js'
- }
- },
- dist: {
- options: {
- extends: '../../js/.babelrc'
- },
- files: {
- '<%= concat.bootstrap.dest %>' : '<%= concat.bootstrap.dest %>'
- }
- }
- },
-
- stamp: {
- options: {
- banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function () {\n',
- footer: '\n}();'
- },
- bootstrap: {
- files: {
- src: '<%= concat.bootstrap.dest %>'
- }
- }
- },
-
- concat: {
- options: {
- // Custom function to remove all export and import statements
- process: function (src) {
- return src.replace(/^(export|import).*/gm, '');
- }
- },
- bootstrap: {
- src: [
- 'js/src/util.js',
- 'js/src/alert.js',
- 'js/src/button.js',
- 'js/src/carousel.js',
- 'js/src/collapse.js',
- 'js/src/dropdown.js',
- 'js/src/modal.js',
- 'js/src/scrollspy.js',
- 'js/src/tab.js',
- 'js/src/tooltip.js',
- 'js/src/popover.js'
- ],
- dest: 'dist/js/<%= pkg.name %>.js'
- }
- },
-
- uglify: {
- options: {
- compress: {
- warnings: false
- },
- mangle: true,
- preserveComments: /^!|@preserve|@license|@cc_on/i
- },
- core: {
- src: '<%= concat.bootstrap.dest %>',
- dest: 'dist/js/<%= pkg.name %>.min.js'
- },
- docsJs: {
- src: configBridge.paths.docsJs,
- dest: 'docs/assets/js/docs.min.js'
- }
- },
-
- qunit: {
- options: {
- inject: 'js/tests/unit/phantom.js'
- },
- files: 'js/tests/index.html'
- },
-
- // CSS build configuration
- scsslint: {
- options: {
- bundleExec: true,
- config: 'scss/.scss-lint.yml',
- reporterOutput: null
- },
- core: {
- src: ['scss/*.scss', '!scss/_normalize.scss']
- },
- docs: {
- src: ['docs/assets/scss/*.scss', '!docs/assets/scss/docs.scss']
- }
- },
-
- cssmin: {
- options: {
- compatibility: 'ie9,-properties.zeroUnits',
- sourceMap: true,
- // sourceMapInlineSources: true,
- advanced: false
- },
- core: {
- files: [
- {
- expand: true,
- cwd: 'dist/css',
- src: ['*.css', '!*.min.css'],
- dest: 'dist/css',
- ext: '.min.css'
- }
- ]
- },
- docs: {
- files: [
- {
- expand: true,
- cwd: 'docs/assets/css',
- src: ['*.css', '!*.min.css'],
- dest: 'docs/assets/css',
- ext: '.min.css'
- }
- ]
- }
- },
-
- copy: {
- docs: {
- expand: true,
- cwd: 'dist/',
- src: [
- '**/*'
- ],
- dest: 'docs/dist/'
- }
- },
-
- connect: {
- server: {
- options: {
- port: 3000,
- base: '.'
- }
- }
- },
-
- jekyll: {
- options: {
- bundleExec: true,
- config: '_config.yml',
- incremental: false
- },
- docs: {},
- github: {
- options: {
- raw: 'github: true'
- }
- }
- },
-
- htmllint: {
- options: {
- ignore: [
- 'Attribute “autocomplete” is only allowed when the input type is “color”, “date”, “datetime”, “datetime-local”, “email”, “hidden”, “month”, “number”, “password”, “range”, “search”, “tel”, “text”, “time”, “url”, or “week”.',
- 'Attribute “autocomplete” not allowed on element “button” at this point.',
- 'Consider using the “h1” element as a top-level heading only (all “h1” elements are treated as top-level headings by many screen readers and other tools).',
- 'Element “div” not allowed as child of element “progress” in this context. (Suppressing further errors from this subtree.)',
- 'Element “img” is missing required attribute “src”.',
- 'The “color” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
- 'The “date” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
- 'The “datetime” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
- 'The “datetime-local” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
- 'The “month” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
- 'The “time” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.',
- 'The “week” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.'
- ]
- },
- src: ['_gh_pages/**/*.html', 'js/tests/visual/*.html']
- },
-
- watch: {
- src: {
- files: '<%= concat.bootstrap.src %>',
- tasks: ['babel:dev']
- },
- sass: {
- files: 'scss/**/*.scss',
- tasks: ['dist-css', 'docs']
- },
- docs: {
- files: 'docs/assets/scss/**/*.scss',
- tasks: ['dist-css', 'docs']
- }
- },
-
'saucelabs-qunit': {
all: {
options: {
@@ -268,138 +18,12 @@ module.exports = function (grunt) {
concurrency: 10,
maxRetries: 3,
maxPollRetries: 4,
- urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'],
- browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
+ urls: ['http://localhost:3000/js/tests/index.html?hidepassed'],
+ browsers: grunt.file.readYAML('build/sauce_browsers.yml')
}
}
- },
-
- exec: {
- postcss: {
- command: 'npm run postcss'
- },
- 'postcss-docs': {
- command: 'npm run postcss-docs'
- },
- htmlhint: {
- command: 'npm run htmlhint'
- },
- 'upload-preview': {
- command: './grunt/upload-preview.sh'
- }
- },
-
- buildcontrol: {
- options: {
- dir: '_gh_pages',
- commit: true,
- push: true,
- message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
- },
- pages: {
- options: {
- remote: 'git@github.com:twbs/derpstrap.git',
- branch: 'gh-pages'
- }
- }
- },
-
- compress: {
- main: {
- options: {
- archive: 'bootstrap-<%= pkg.version %>-dist.zip',
- mode: 'zip',
- level: 9,
- pretty: true
- },
- files: [
- {
- expand: true,
- cwd: 'dist/',
- src: ['**'],
- dest: 'bootstrap-<%= pkg.version %>-dist'
- }
- ]
- }
}
+ })
- });
-
-
- // These plugins provide necessary tasks.
- require('load-grunt-tasks')(grunt, { scope: 'devDependencies',
- // Exclude Sass compilers. We choose the one to load later on.
- pattern: ['grunt-*', '!grunt-sass', '!grunt-contrib-sass'] });
- require('time-grunt')(grunt);
-
- // Docs HTML validation task
- grunt.registerTask('validate-html', ['jekyll:docs', 'htmllint', 'exec:htmlhint']);
-
- var runSubset = function (subset) {
- return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset;
- };
- var isUndefOrNonZero = function (val) {
- return val === undefined || val !== '0';
- };
-
- // Test task.
- var testSubtasks = [];
- // Skip core tests if running a different subset of the test suite
- if (runSubset('core') &&
- // Skip core tests if this is a Savage build
- process.env.TRAVIS_REPO_SLUG !== 'twbs-savage/bootstrap') {
- testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-scss', 'qunit', 'docs']);
- }
- // Skip HTML validation if running a different subset of the test suite
- if (runSubset('validate-html') &&
- isTravis &&
- // Skip HTML5 validator when [skip validator] is in the commit message
- isUndefOrNonZero(process.env.TWBS_DO_VALIDATOR)) {
- 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
- runSubset('sauce-js-unit')) {
- testSubtasks = testSubtasks.concat(['dist', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs', 'exec:upload-preview']);
- // Skip Sauce on Travis when [skip sauce] is in the commit message
- if (isUndefOrNonZero(process.env.TWBS_DO_SAUCE)) {
- testSubtasks.push('connect');
- testSubtasks.push('saucelabs-qunit');
- }
- }
- grunt.registerTask('test', testSubtasks);
-
- // JS distribution task.
- grunt.registerTask('dist-js', ['babel:dev', 'concat', 'babel:dist', 'stamp', 'uglify:core']);
-
- grunt.registerTask('test-scss', ['scsslint:core']);
-
- // CSS distribution task.
- // Supported Compilers: sass (Ruby) and libsass.
- (function (sassCompilerName) {
- require('./grunt/bs-sass-compile/' + sassCompilerName + '.js')(grunt);
- })(process.env.TWBS_SASS || 'libsass');
- // grunt.registerTask('sass-compile', ['sass:core', 'sass:extras', 'sass:docs']);
- grunt.registerTask('sass-compile', ['sass:core', 'sass:extras', 'sass:docs']);
-
- grunt.registerTask('dist-css', ['sass-compile', 'exec:postcss', 'cssmin:core', 'cssmin:docs']);
-
- // Full distribution task.
- grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js']);
-
- // Default task.
- grunt.registerTask('default', ['clean:dist', 'test']);
-
- // Docs task.
- grunt.registerTask('docs-css', ['cssmin:docs', 'exec:postcss-docs']);
- grunt.registerTask('lint-docs-css', ['scsslint:docs']);
- grunt.registerTask('docs-js', ['uglify:docsJs']);
- grunt.registerTask('docs', ['lint-docs-css', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs']);
- grunt.registerTask('docs-github', ['jekyll:github']);
-
- grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress']);
-
- // Publish to GitHub
- grunt.registerTask('publish', ['buildcontrol:pages']);
-};
+ grunt.loadNpmTasks('grunt-saucelabs')
+}
diff --git a/LICENSE b/LICENSE
index 4e32163c07..1381cb2be4 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
The MIT License (MIT)
-Copyright (c) 2011-2016 Twitter, Inc.
-Copyright (c) 2011-2016 The Bootstrap Authors
+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 9635d759f8..3f988e1960 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,31 @@
-# [Bootstrap](https://getbootstrap.com)
+
+
+
+
-[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
-![Bower version](https://img.shields.io/bower/v/bootstrap.svg)
-[![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)
-[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap)
-[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev)
-[![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/4.0.0-alpha5)
+
Bootstrap
-[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
+
+ Sleek, intuitive, and powerful front-end framework for faster and easier web development.
+
+ Explore Bootstrap docs »
+
+
+ Bootstrap Themes
+ ·
+ Job Board
+ ·
+ Blog
+
+
-Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/orgs/twbs/people) with the massive support and involvement of the community.
-
-To get started, check out !
+
## Table of contents
- [Quick start](#quick-start)
+- [Status](#status)
+- [What's included](#whats-included)
- [Bugs and feature requests](#bugs-and-feature-requests)
- [Documentation](#documentation)
- [Contributing](#contributing)
@@ -31,18 +38,32 @@ To get started, check out !
Several quick start options are available:
-- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.5.zip)
+- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-beta.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-alpha.5`
-- Install with [yarn](https://github.com/yarnpkg/yarn): `yarn add bootstrap@4.0.0-alpha.5`
-- Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap@=4.0.0-alpha.5`
-- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap`
-- Install with [Bower](https://bower.io): `bower install bootstrap#v4.0.0-alpha.5`
+- Install with [npm](https://www.npmjs.com): `npm install bootstrap@4.0.0-beta`
+- Install with [yarn](https://github.com/yarnpkg/yarn): `yarn add bootstrap@4.0.0-beta`
+- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap:4.0.0-beta`
+- Install with [Bower](https://bower.io): `bower install bootstrap#v4.0.0-beta`
- 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/getting-started/) for information on the framework contents, templates and examples, and more.
-### What's included
+## Status
+
+[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
+[![Bower](https://img.shields.io/bower/v/bootstrap.svg)](https://bower.io/search/?q=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)
+[![Build Status](https://img.shields.io/travis/twbs/bootstrap/v4-dev.svg)](https://travis-ci.org/twbs/bootstrap)
+[![peerDependencies Status](https://david-dm.org/twbs/bootstrap/peer-status.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)
+[![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)
+
+[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
+
+## 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:
@@ -58,7 +79,7 @@ bootstrap/
└── bootstrap.min.js
```
-We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developer.chrome.com/devtools/docs/css-preprocessors) (`bootstrap.*.map`) are available for use with certain browsers' developer tools.
+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.
## Bugs and feature requests
@@ -70,12 +91,15 @@ Have a bug or a feature request? Please first read the [issue guidelines](https:
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. Run through the [tooling setup](https://github.com/twbs/bootstrap/blob/v4-dev/docs/getting-started/build-tools.md#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
-2. Run `grunt` (or a specific set of Grunt tasks) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
-3. From the root `/bootstrap` directory, run `bundle exec jekyll serve` in the command line.
-4. Open in your browser, and voilà.
+1. Run through the [tooling setup](https://github.com/twbs/bootstrap/blob/v4-dev/docs/4.0/getting-started/build-tools.md#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 `bundle exec jekyll serve` in the command line.
+5. Open in your browser, and voilà.
Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/home/).
@@ -133,4 +157,4 @@ See [the Releases section of our GitHub project](https://github.com/twbs/bootstr
## Copyright and license
-Code and documentation copyright 2011-2016 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).
+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 c323343340..c40fc8841b 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,55 +1,74 @@
# Dependencies
-markdown: kramdown
-highlighter: rouge
+markdown: kramdown
+highlighter: rouge
kramdown:
- auto_ids: true
+ auto_ids: true
# Permalinks
-permalink: pretty
+permalink: pretty
# Server
-source: docs
-destination: _gh_pages
-host: 0.0.0.0
-port: 9001
-baseurl: ""
-url: https://v4-alpha.getbootstrap.com
-encoding: UTF-8
-exclude: [assets/scss/]
+source: "."
+destination: ./_gh_pages
+port: 9001
+baseurl: ""
+url: "https://getbootstrap.com"
+encoding: UTF-8
+exclude:
+ - .git
+ - .github
+ - assets/scss/
+ - build
+ - js
+ - node_modules
+ - nuget
+ - scss
+ - vendor
+ - bower.json
+ - composer.json
+ - Gemfile
+ - Gemfile.lock
+ - Gruntfile.js
+ - package.js
+ - package.json
+ - package-lock.json
+ - sache.json
-gems:
+plugins:
- jekyll-redirect-from
- jekyll-sitemap
+ - jekyll-toc
# Social
-title: Bootstrap
-description: The most popular HTML, CSS, and JS framework in the world.
-twitter: getbootstrap
-authors: Mark Otto, Jacob Thornton, and Bootstrap contributors
-social_logo_path: /assets/brand/bootstrap-social-logo.png
-social_image_path: /assets/brand/bootstrap-social.png
-
-# Custom vars
-current_version: 4.0.0-alpha.5
-repo: https://github.com/twbs/bootstrap
-slack: https://bootstrap-slack.herokuapp.com
+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
+# Custom variables
+current_version: 4.0.0-beta
+docs_version: 4.0
+repo: "https://github.com/twbs/bootstrap"
+slack: "https://bootstrap-slack.herokuapp.com"
download:
- source: https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.5.zip
- dist: https://github.com/twbs/bootstrap/releases/download/v4.0.0-alpha.5/bootstrap-4.0.0-alpha.5-dist.zip
+ source: "https://github.com/twbs/bootstrap/archive/v4.0.0-beta.zip"
+ dist: "https://github.com/twbs/bootstrap/releases/download/v4.0.0-beta/bootstrap-4.0.0-beta-dist.zip"
-blog: https://blog.getbootstrap.com
-expo: https://expo.getbootstrap.com
-themes: https://themes.getbootstrap.com
+blog: "https://blog.getbootstrap.com"
+expo: "https://expo.getbootstrap.com"
+jobs: "https://jobs.getbootstrap.com"
+themes: "https://themes.getbootstrap.com"
cdn:
# See https://www.srihash.org for info on how to generate the hashes
- css: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css
- css_hash: "sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi"
- js: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js
- js_hash: "sha384-BLiI7JTZm+JWlgKa0M0kGRpJbF2J8q+qreVrKBC47e3K6BW78kGLrCkeRX6I9RoK"
- jquery: https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
- jquery_hash: "sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7"
- tether: https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js
- tether_hash: "sha384-XTs3FgkjiBgo8qjEjBk0tGmf3wPrWtA6coPfQDfFEY8AnYJwjalXCiosYRBIBZX8"
+ css: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
+ css_hash: "sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
+ js: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"
+ js_hash: "sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
+ 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.11.0/umd/popper.min.js"
+ popper_hash: "sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
diff --git a/_data/breakpoints.yml b/_data/breakpoints.yml
new file mode 100644
index 0000000000..3c8cfe293c
--- /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/docs/_data/browser-bugs.yml b/_data/browser-bugs.yml
similarity index 88%
rename from docs/_data/browser-bugs.yml
rename to _data/browser-bugs.yml
index 0e3d1dc657..d3f133354b 100644
--- a/docs/_data/browser-bugs.yml
+++ b/_data/browser-bugs.yml
@@ -28,16 +28,6 @@
origin: >
Bootstrap#14211
--
- browser: >
- Edge
- summary: >
- When hovering over a `` menu item, the cursor for the element underneath the menu is displayed.
- upstream_bug: >
- Edge#817822
- origin: >
- Bootstrap#14528
-
-
browser: >
Edge
@@ -148,16 +138,6 @@
origin: >
Bootstrap#19670
--
- browser: >
- Firefox
- summary: >
- `position: absolute` element that's wider than its column renders differently than other browsers
- upstream_bug: >
- Mozilla#1282363
- origin: >
- Bootstrap#20161
-
-
browser: >
Firefox
@@ -218,23 +198,13 @@
origin: >
Bootstrap#14409
--
- browser: >
- Chrome
- summary: >
- `:focus` `outline` style causes cursor to not be displayed when toggling a `readonly` ` ` to read-write.
- upstream_bug: >
- Chromium#465274
- origin: >
- Bootstrap#16022
-
-
browser: >
Chrome
summary: >
`table-cell` borders not overlapping despite `margin-right: -1px`
upstream_bug: >
- Chromium#534750
+ Chromium#568691
origin: >
Bootstrap#17438, Bootstrap#14237
@@ -258,6 +228,16 @@
origin: >
Bootstrap#12832
+-
+ browser: >
+ Chrome
+ summary: >
+ `position: absolute` element that's wider than its column is incorrectly clipped to column boundary
+ upstream_bug: >
+ Chromium#269061
+ origin: >
+ Bootstrap#20161
+
-
browser: >
Chrome (Windows & Linux)
@@ -268,16 +248,6 @@
origin: >
Bootstrap#15298
--
- browser: >
- Chrome (Linux)
- summary: >
- ``'s pop-up menu is blank on some systems.
- upstream_bug: >
- Chromium#510079
- origin: >
- Bootstrap#21120
-
-
browser: >
Safari
@@ -330,16 +300,6 @@
origin: >
Bootstrap#14868
--
- browser: >
- Safari (iPad)
- summary: >
- `` menu on iPad causes shifting of hit-testing areas
- upstream_bug: >
- WebKit#150079, Safari#23082521
- origin: >
- Bootstrap#14975
-
-
browser: >
Safari (iOS)
@@ -430,16 +390,6 @@
origin: >
Bootstrap#14839
--
- browser: >
- Safari (iOS)
- summary: >
- Tapping from one ` ` to another in an overlay can cause shaking/jiggling effect
- upstream_bug: >
- WebKit#158276
- origin: >
- Bootstrap#19927
-
-
browser: >
Safari (iOS)
diff --git a/docs/_data/browser-features.yml b/_data/browser-features.yml
similarity index 87%
rename from docs/_data/browser-features.yml
rename to _data/browser-features.yml
index 0d25698412..f19a460e66 100644
--- a/docs/_data/browser-features.yml
+++ b/_data/browser-features.yml
@@ -7,7 +7,7 @@
A11yUserVoice#16717318
origin: >
Bootstrap#20732
-
+
-
browser: >
Edge
@@ -58,16 +58,6 @@
origin: >
Bootstrap#20143
--
- browser: >
- Firefox
- summary: >
- Fire a [`transitioncancel` event](https://developer.mozilla.org/en-US/docs/Web/Events/transitioncancel) when a CSS transition is canceled
- upstream_bug: >
- Mozilla#1264125
- origin: >
- Mozilla#1182856
-
-
browser: >
Firefox
@@ -128,16 +118,6 @@
origin: >
Bootstrap#19984
--
- browser: >
- Chrome
- summary: >
- Implement [sticky positioning](http://html5please.com/#position:sticky) from CSS Positioned Layout Level 3
- upstream_bug: >
- Chromium#231752
- origin: >
- Bootstrap#17021
-
-
browser: >
Safari
diff --git a/_data/colors.yml b/_data/colors.yml
new file mode 100644
index 0000000000..4208ec75ac
--- /dev/null
+++ b/_data/colors.yml
@@ -0,0 +1,26 @@
+- name: blue
+ hex: "#007aff"
+- name: indigo
+ hex: "#2b29bb"
+- name: purple
+ hex: "#882ae0"
+- name: pink
+ hex: "#f14095"
+- name: red
+ hex: "#ea0242"
+- name: orange
+ hex: "#ff8d00"
+- name: yellow
+ hex: "#ffec00"
+- name: green
+ hex: "#34da36"
+- name: teal
+ hex: "#1dde8e"
+- name: cyan
+ hex: "#08eff3"
+- name: white
+ hex: "#fff"
+- name: gray
+ hex: "#464a4c"
+- name: gray-dark
+ hex: "#292b2c"
diff --git a/docs/_data/core-team.yml b/_data/core-team.yml
similarity index 90%
rename from docs/_data/core-team.yml
rename to _data/core-team.yml
index 2b3fd9ac68..7528bdc11b 100644
--- a/docs/_data/core-team.yml
+++ b/_data/core-team.yml
@@ -33,3 +33,7 @@
- name: Gleb Mazovetskiy
user: glebm
gravatar: 729f685b8e8d7e9feed18c177c82e59b
+
+- name: Johann-S
+ user: johann-s
+ gravatar: d90d49733a4fe1aa461e45cb4a4fd9e3
diff --git a/_data/grays.yml b/_data/grays.yml
new file mode 100644
index 0000000000..bf9750ee9c
--- /dev/null
+++ b/_data/grays.yml
@@ -0,0 +1,18 @@
+- name: 100
+ hex: "#f8f9fa"
+- name: 200
+ hex: "#ebedef"
+- name: 300
+ hex: "#ced3d8"
+- name: 400
+ hex: "#abb3bd"
+- name: 500
+ hex: "#7c8a99"
+- name: 600
+ hex: "#55626f"
+- name: 700
+ hex: "#4a5560"
+- name: 800
+ hex: "#384048"
+- name: 900
+ hex: "#131619"
diff --git a/docs/_data/nav.yml b/_data/nav.yml
similarity index 79%
rename from docs/_data/nav.yml
rename to _data/nav.yml
index 8473754226..784ec9a733 100644
--- a/docs/_data/nav.yml
+++ b/_data/nav.yml
@@ -6,18 +6,17 @@
- title: Browsers & devices
- title: JavaScript
- title: Options
- - title: Flexbox
- title: Build tools
- - title: Best practices
+ # - title: Best practices # TODO: Write this content
+ - title: Webpack
- title: Accessibility
- title: Layout
pages:
- title: Overview
- title: Grid
- - title: Flexbox grid
- title: Media object
- - title: Responsive utilities
+ - title: Utilities for layout
- title: Content
pages:
@@ -58,20 +57,25 @@
- title: Clearfix
- title: Close icon
- title: Colors
- - title: Display property
+ - title: Display
+ - title: Embed
+ - title: Flex
+ - title: Float
- title: Image replacement
- - title: Invisible content
- - title: Responsive helpers
+ - title: Position
- title: Screenreaders
- - title: Sizing and positioning
+ - title: Sizing
- title: Spacing
- - title: Typography
+ - title: Text
- title: Vertical align
+ - title: Visibility
-# - title: Extend
-# pages:
-# - title: Approach
-# - title: Icon fonts
+- title: Extend
+ pages:
+ # - title: Approach
+ - title: Icons
+
+- title: Migration
- title: About
pages:
@@ -80,5 +84,3 @@
- title: Brand
- title: License
- title: Translations
-
-- title: Migration
diff --git a/docs/_data/showcase.yml b/_data/showcase.yml
similarity index 100%
rename from docs/_data/showcase.yml
rename to _data/showcase.yml
diff --git a/_data/theme-colors.yml b/_data/theme-colors.yml
new file mode 100644
index 0000000000..92ea288384
--- /dev/null
+++ b/_data/theme-colors.yml
@@ -0,0 +1,16 @@
+- name: primary
+ hex: "#007aff"
+- name: secondary
+ hex: "#868e96"
+- name: success
+ hex: "#28a745"
+- name: danger
+ hex: "#dc3545"
+- name: warning
+ hex: "#ffc107"
+- name: info
+ hex: "#17a2b8"
+- name: light
+ hex: "#f8f9fa"
+- name: dark
+ hex: "#343a40"
diff --git a/_data/translations.yml b/_data/translations.yml
new file mode 100644
index 0000000000..3681ddf560
--- /dev/null
+++ b/_data/translations.yml
@@ -0,0 +1,14 @@
+- name: 中文(繁體)
+ code: zh-tw
+ description: Bootstrap 4 繁體中文手冊
+ url: http://bootstrap.hexschool.com/
+
+- name: Chinese
+ code: zh
+ description: Bootstrap 4 中文文档教程
+ url: http://wiki.jikexueyuan.com/project/bootstrap4/
+
+- name: Brazilian Portuguese
+ code: pt-BR
+ description: Bootstrap 4 Português do Brasil
+ url: https://bootstrapbrasil.github.io/v4/
diff --git a/_includes/ads.html b/_includes/ads.html
new file mode 100644
index 0000000000..10df1344d7
--- /dev/null
+++ b/_includes/ads.html
@@ -0,0 +1 @@
+
diff --git a/_includes/callout-danger-async-methods.md b/_includes/callout-danger-async-methods.md
new file mode 100644
index 0000000000..89d2e2cabb
--- /dev/null
+++ b/_includes/callout-danger-async-methods.md
@@ -0,0 +1,7 @@
+{% callout danger %}
+#### Asynchronous methods and transitions
+
+All API methods are **asynchronous** and start a **transition**. They return to the caller as soon as the transition is started but **before it ends**. In addition, a method call on a **transitioning component will be ignored**.
+
+[See our JavaScript documentation for more information.]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/)
+{% endcallout %}
diff --git a/docs/_includes/callout-warning-color-assistive-technologies.md b/_includes/callout-warning-color-assistive-technologies.md
similarity index 96%
rename from docs/_includes/callout-warning-color-assistive-technologies.md
rename to _includes/callout-warning-color-assistive-technologies.md
index b92a1c3418..0b929e16d2 100644
--- a/docs/_includes/callout-warning-color-assistive-technologies.md
+++ b/_includes/callout-warning-color-assistive-technologies.md
@@ -2,4 +2,4 @@
#### Conveying meaning to assistive technologies
Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the `.sr-only` class.
-{% endcallout %}
\ No newline at end of file
+{% endcallout %}
diff --git a/_includes/docs-navbar.html b/_includes/docs-navbar.html
new file mode 100644
index 0000000000..34a1a0102c
--- /dev/null
+++ b/_includes/docs-navbar.html
@@ -0,0 +1,63 @@
+
diff --git a/_includes/docs-sidebar.html b/_includes/docs-sidebar.html
new file mode 100644
index 0000000000..00eaf47a60
--- /dev/null
+++ b/_includes/docs-sidebar.html
@@ -0,0 +1,57 @@
+
+
+
+ {%- assign page_slug = page.url | split: '/' | last -%}
+ {%- for group in site.data.nav -%}
+ {%- assign link = group.pages | first -%}
+ {%- assign link_slug = link.title | slugify -%}
+ {%- assign group_slug = group.title | slugify -%}
+ {%- assign active = nil -%}
+
+ {%- if page.group == group_slug -%}
+ {%- assign active = 'active' -%}
+ {%- endif -%}
+
+
+
+ {{ group.title }}
+
+
+
+ {%- for doc in group.pages -%}
+ {%- assign doc_slug = doc.title | slugify -%}
+ {%- assign active = nil -%}
+
+ {%- if page.group == group_slug and page_slug == doc_slug -%}
+ {%- assign active = 'active bd-sidenav-active' -%}
+ {%- endif -%}
+
+
+
+ {{ doc.title }}
+
+
+ {% comment %}
+ {% unless doc.sections == nil %}
+
+ {% endunless %}
+ {% endcomment %}
+
+ {%- endfor -%}
+
+
+ {%- endfor -%}
+
diff --git a/_includes/favicons.html b/_includes/favicons.html
new file mode 100644
index 0000000000..97dab4ba8f
--- /dev/null
+++ b/_includes/favicons.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/_includes/footer.html b/_includes/footer.html
new file mode 100644
index 0000000000..c41c835788
--- /dev/null
+++ b/_includes/footer.html
@@ -0,0 +1,12 @@
+
diff --git a/docs/_includes/header.html b/_includes/header.html
similarity index 71%
rename from docs/_includes/header.html
rename to _includes/header.html
index 37e27cd07d..b6fad53e98 100644
--- a/docs/_includes/header.html
+++ b/_includes/header.html
@@ -1,33 +1,29 @@
-
+
- {% if page.title %}
+ {%- if page.title -%}
{{ page.title }} · {{ site.title }}
- {% else %}
+ {%- else -%}
{{ site.title }} · {{ site.description }}
- {% endif %}
+ {%- endif -%}
-{% include social.html %}
-
{% if site.github %}
- {% if page.title == "Flexbox grid system" %}
-
- {% endif %}
{% else %}
{% endif %}
+{% if page.layout == "docs" %}
+
+{% endif %}
-
-
-
+{% include social.html %}
+
+
+
+
+{% if site.github %}
+
+{% else %}
+
+{% endif %}
+
+{% if site.github %}
+
+{% else %}
+
+
+
+
+
+{% endif %}
+
+
+
+{% if page.layout == "docs" %}
+
+
+{% endif %}
+
+
diff --git a/docs/_includes/social.html b/_includes/social.html
similarity index 75%
rename from docs/_includes/social.html
rename to _includes/social.html
index c488ea6108..977142b19a 100644
--- a/docs/_includes/social.html
+++ b/_includes/social.html
@@ -1,3 +1,7 @@
+
+
+
+
@@ -19,13 +23,14 @@
+
{% else %}
{% endif %}
-
-
-
-
-
+
+
+
+
+
diff --git a/docs/_layouts/default.html b/_layouts/default.html
similarity index 65%
rename from docs/_layouts/default.html
rename to _layouts/default.html
index dab3d56655..0b0c214a16 100644
--- a/docs/_layouts/default.html
+++ b/_layouts/default.html
@@ -10,12 +10,17 @@
- {% include nav-home.html %}
+ {% include docs-navbar.html %}
-
+ {% if page.layout == "simple" %}
{{ content }}
-
+ {% else %}
+
+ {{ content }}
+
+ {% endif %}
{% include footer.html %}
+ {% include scripts.html %}