0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge remote-tracking branch 'refs/remotes/twbs/v4-dev' into v4-dev

This commit is contained in:
lucascono 2017-10-04 05:33:17 -03:00
commit 8c04a74c8c
319 changed files with 18315 additions and 8081 deletions

View File

@ -1,14 +0,0 @@
{
"presets": [
[
"es2015",
{
"loose": true,
"modules": false
}
]
],
"plugins": [
"transform-es2015-modules-strip"
]
}

16
.babelrc.js Normal file
View File

@ -0,0 +1,16 @@
module.exports = {
presets: [
[
'env',
{
loose: true,
modules: false,
exclude: ['transform-es2015-typeof-symbol']
}
]
],
plugins: [
process.env.ROLLUP && 'external-helpers',
process.env.PLUGINS && 'transform-es2015-modules-strip'
].filter(Boolean)
};

2
.gitattributes vendored
View File

@ -4,10 +4,10 @@
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.py 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

View File

@ -42,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 build system, which is used to run all our tests, concatenate and compile source files, and more.
- `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.
@ -57,7 +57,7 @@ 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)
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.
@ -151,7 +151,7 @@ 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/fork-a-repo/) the project, clone your fork,
1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork,
and configure the remotes:
```bash
@ -180,7 +180,7 @@ included in the project:
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)
[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:
@ -195,7 +195,7 @@ included in the project:
git push origin <topic-branch-name>
```
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
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
@ -211,7 +211,7 @@ includes code changes) and under the terms of the
* 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.
[@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

View File

@ -1,7 +1,7 @@
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://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
- [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)
@ -14,7 +14,7 @@ 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 [JS Bin](https://jsbin.com)
- Reduced test cases and potential fixes using [JS Bin](https://jsbin.com/)
When suggesting a feature, include:

10
.gitignore vendored
View File

@ -38,15 +38,9 @@ Thumbs.db
.komodotools
*.komodoproject
# SCSS-Lint
scss-lint-report.xml
# grunt-contrib-sass cache
.sass-cache
# Jekyll metadata
# Jekyll metadata and extra config file for `github` script
docs/.jekyll-metadata
twbsconfig.yml
# Folders to ignore
bower_components
node_modules

View File

@ -1,7 +1,10 @@
fail_on_violations: true
stylelint:
config_file: build/.stylelintrc
scss:
config_file: .scss-lint.yml
enabled: false
jshint:
enabled: false

View File

@ -1,537 +0,0 @@
# Default application configuration that all configurations inherit from.
scss_files:
- "scss/**/*.scss"
- "docs/assets/scss/**/*.scss"
plugin_directories: ['.scss-linters']
# List of gem names to load custom linters from (make sure they are already
# installed)
plugin_gems: []
# Default severity of all linters.
severity: warning
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BemDepth:
enabled: false
max_elements: 1
BorderZero:
enabled: true
convention: zero # or `none`
ChainedClasses:
enabled: false
ColorKeyword:
enabled: true
ColorVariable:
enabled: false
Comment:
enabled: true
exclude:
- scss/bootstrap.scss
style: silent
DebugStatement:
enabled: true
DeclarationOrder:
enabled: false
DisableLinterReason:
enabled: false
DuplicateProperty:
enabled: true
ElsePlacement:
enabled: true
style: same_line # or 'new_line'
EmptyLineBetweenBlocks:
enabled: false
ignore_single_line_blocks: true
EmptyRule:
enabled: true
ExtendDirective:
enabled: false
FinalNewline:
enabled: true
present: true
HexLength:
enabled: true
style: short # or 'long'
HexNotation:
enabled: true
style: lowercase # or 'uppercase'
HexValidation:
enabled: true
IdSelector:
enabled: true
ImportantRule:
enabled: false
ImportPath:
enabled: true
leading_underscore: false
filename_extension: false
Indentation:
enabled: true
allow_non_nested_indentation: false
character: space # or 'tab'
width: 2
LeadingZero:
enabled: true
style: exclude_zero # or 'include_zero'
MergeableSelector:
enabled: false
force_nesting: true
NameFormat:
enabled: true
allow_leading_underscore: true
convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern
NestingDepth:
enabled: true
max_depth: 5
ignore_parent_selectors: false
PlaceholderInExtend:
enabled: false
PropertyCount:
enabled: false
include_nested: false
max_properties: 10
PropertySortOrder:
enabled: true
ignore_unspecified: false
min_properties: 2
separate_groups: false
order:
- position
- top
- right
- bottom
- left
- z-index
- -webkit-box-sizing
- -moz-box-sizing
- 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
- max-width
- height
- min-height
- max-height
- padding
- padding-top
- padding-right
- padding-bottom
- padding-left
- margin
- margin-top
- margin-right
- margin-bottom
- margin-left
- overflow
- overflow-x
- overflow-y
- -webkit-overflow-scrolling
- -ms-overflow-x
- -ms-overflow-y
- -ms-overflow-style
- clip
- clear
- font
- font-family
- font-size
- font-style
- font-weight
- font-variant
- font-size-adjust
- font-stretch
- font-effect
- font-emphasize
- font-emphasize-position
- font-emphasize-style
- font-smooth
- -webkit-hyphens
- -moz-hyphens
- hyphens
- line-height
- color
- text-align
- -webkit-text-align-last
- -moz-text-align-last
- -ms-text-align-last
- text-align-last
- text-emphasis
- text-emphasis-color
- text-emphasis-style
- text-emphasis-position
- text-decoration
- text-indent
- text-justify
- text-outline
- -ms-text-overflow
- text-overflow
- text-overflow-ellipsis
- text-overflow-mode
- text-shadow
- text-transform
- text-wrap
- -webkit-text-size-adjust
- -ms-text-size-adjust
- letter-spacing
- -ms-word-break
- word-break
- word-spacing
- -ms-word-wrap
- word-wrap
- overflow-wrap
- -moz-tab-size
- -o-tab-size
- tab-size
- white-space
- vertical-align
- list-style
- list-style-position
- list-style-type
- list-style-image
- pointer-events
- -ms-touch-action
- touch-action
- cursor
- visibility
- zoom
- table-layout
- empty-cells
- caption-side
- border-spacing
- border-collapse
- content
- quotes
- counter-reset
- counter-increment
- resize
- -webkit-user-select
- -moz-user-select
- -ms-user-select
- -o-user-select
- user-select
- nav-index
- nav-up
- nav-right
- nav-down
- nav-left
- 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
- border-style
- border-width
- border-top
- border-top-color
- border-top-style
- border-top-width
- border-right
- border-right-color
- border-right-style
- border-right-width
- border-bottom
- border-bottom-color
- border-bottom-style
- border-bottom-width
- border-left
- border-left-color
- border-left-style
- border-left-width
- border-radius
- border-top-left-radius
- border-top-right-radius
- border-bottom-right-radius
- border-bottom-left-radius
- -webkit-border-image
- -moz-border-image
- -o-border-image
- border-image
- -webkit-border-image-source
- -moz-border-image-source
- -o-border-image-source
- border-image-source
- -webkit-border-image-slice
- -moz-border-image-slice
- -o-border-image-slice
- border-image-slice
- -webkit-border-image-width
- -moz-border-image-width
- -o-border-image-width
- border-image-width
- -webkit-border-image-outset
- -moz-border-image-outset
- -o-border-image-outset
- border-image-outset
- -webkit-border-image-repeat
- -moz-border-image-repeat
- -o-border-image-repeat
- border-image-repeat
- outline
- outline-width
- outline-style
- outline-color
- outline-offset
- -webkit-box-shadow
- -moz-box-shadow
- box-shadow
- filter:progid:DXImageTransform.Microsoft.Alpha(Opacity
- -ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha
- opacity
- -ms-interpolation-mode
- -webkit-transition
- -moz-transition
- -ms-transition
- -o-transition
- transition
- -webkit-transition-delay
- -moz-transition-delay
- -ms-transition-delay
- -o-transition-delay
- transition-delay
- -webkit-transition-timing-function
- -moz-transition-timing-function
- -ms-transition-timing-function
- -o-transition-timing-function
- transition-timing-function
- -webkit-transition-duration
- -moz-transition-duration
- -ms-transition-duration
- -o-transition-duration
- transition-duration
- -webkit-transition-property
- -moz-transition-property
- -ms-transition-property
- -o-transition-property
- transition-property
- -webkit-transform
- -moz-transform
- -ms-transform
- -o-transform
- transform
- -webkit-transform-origin
- -moz-transform-origin
- -ms-transform-origin
- -o-transform-origin
- transform-origin
- -webkit-animation
- -moz-animation
- -ms-animation
- -o-animation
- animation
- -webkit-animation-name
- -moz-animation-name
- -ms-animation-name
- -o-animation-name
- animation-name
- -webkit-animation-duration
- -moz-animation-duration
- -ms-animation-duration
- -o-animation-duration
- animation-duration
- -webkit-animation-play-state
- -moz-animation-play-state
- -ms-animation-play-state
- -o-animation-play-state
- animation-play-state
- -webkit-animation-timing-function
- -moz-animation-timing-function
- -ms-animation-timing-function
- -o-animation-timing-function
- animation-timing-function
- -webkit-animation-delay
- -moz-animation-delay
- -ms-animation-delay
- -o-animation-delay
- animation-delay
- -webkit-animation-iteration-count
- -moz-animation-iteration-count
- -ms-animation-iteration-count
- -o-animation-iteration-count
- animation-iteration-count
- -webkit-animation-direction
- -moz-animation-direction
- -ms-animation-direction
- -o-animation-direction
PropertySpelling:
enabled: true
extra_properties: []
disabled_properties: []
PropertyUnits:
enabled: true
global: [
'ch', 'em', 'ex', 'rem', # Font-relative lengths
'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths
'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths
'deg', 'grad', 'rad', 'turn', # Angle
'ms', 's', # Duration
'Hz', 'kHz', # Frequency
'dpi', 'dpcm', 'dppx', # Resolution
'%'] # Other
properties: {}
PseudoElement:
enabled: true
QualifyingElement:
enabled: true
allow_element_with_attribute: false
allow_element_with_class: false
allow_element_with_id: false
SelectorDepth:
enabled: true
max_depth: 4
SelectorFormat:
enabled: false
convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern
Shorthand:
enabled: true
allowed_shorthands: [1, 2, 3, 4]
SingleLinePerProperty:
enabled: false
allow_single_line_rule_sets: true
SingleLinePerSelector:
enabled: false
SpaceAfterComma:
enabled: false
style: one_space # or 'no_space', or 'at_least_one_space'
SpaceAfterPropertyColon:
enabled: true
style: at_least_one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
SpaceAfterPropertyName:
enabled: true
SpaceAfterVariableName:
enabled: true
SpaceAroundOperator:
enabled: true
style: one_space # or 'at_least_one_space', or 'no_space'
SpaceBeforeBrace:
enabled: true
style: space # or 'new_line'
allow_single_line_padding: true
SpaceBetweenParens:
enabled: true
spaces: 0
StringQuotes:
enabled: true
style: double_quotes # or double_quotes
TrailingSemicolon:
enabled: true
TrailingWhitespace:
enabled: true
TrailingZero:
enabled: false
TransitionAll:
enabled: false
UnnecessaryMantissa:
enabled: true
UnnecessaryParentReference:
enabled: true
UrlFormat:
enabled: true
UrlQuotes:
enabled: true
VariableForProperty:
enabled: false
properties: []
VendorPrefix:
enabled: true
identifier_list: base
additional_identifiers: []
excluded_identifiers: []
ZeroUnit:
enabled: true
Compass::*:
enabled: false

View File

@ -4,31 +4,28 @@ language: node_js
git:
depth: 3
node_js:
- "4"
- "6"
- "8"
before_install:
- 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 --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
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
env:
- TWBS_TEST=core
- TWBS_TEST=browser
matrix:
exclude:
- node_js: "4"
env: TWBS_TEST=browser
notifications:
slack: heybb:iz4wwosL0N0EdaX1gvgkU0NH
webhooks:

View File

@ -1,9 +1,8 @@
source 'https://rubygems.org'
group :development, :test do
gem 'jekyll', '~> 3.4.5'
gem 'jekyll', '~> 3.6.0'
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'
gem 'jekyll-toc', '~> 0.3.0'
end

View File

@ -1,22 +1,22 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
ffi (1.9.18)
ffi (1.9.18-x64-mingw32)
forwardable-extended (2.6.0)
jekyll (3.4.5)
jekyll (3.6.0)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-redirect-from (0.12.1)
jekyll (~> 3.3)
@ -24,45 +24,44 @@ GEM
sass (~> 3.4)
jekyll-sitemap (1.1.1)
jekyll (~> 3.3)
jekyll-toc (0.3.0.pre1)
jekyll-toc (0.3.0)
nokogiri (~> 1.6)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.14.0)
liquid (3.0.6)
kramdown (1.15.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)
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.14.0)
forwardable-extended (~> 2.6)
public_suffix (2.0.5)
rake (12.0.0)
public_suffix (3.0.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (1.11.1)
rouge (2.2.1)
safe_yaml (1.0.4)
sass (3.4.25)
scss_lint (0.54.0)
rake (>= 0.9, < 13)
sass (~> 3.4.20)
sass (3.5.1)
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.4.5)
jekyll (~> 3.6.0)
jekyll-redirect-from (~> 0.12.1)
jekyll-sitemap (~> 1.1.1)
jekyll-toc (~> 0.3.0.pre1)
scss_lint (~> 0.54.0)
jekyll-toc (~> 0.3.0)
BUNDLED WITH
1.15.1
1.15.4

View File

@ -1,29 +0,0 @@
/*!
* Bootstrap's Gruntfile
* https://getbootstrap.com
* 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'
// Project configuration.
grunt.initConfig({
'saucelabs-qunit': {
all: {
options: {
build: process.env.TRAVIS_JOB_ID,
concurrency: 10,
maxRetries: 3,
maxPollRetries: 4,
urls: ['http://localhost:3000/js/tests/index.html?hidepassed'],
browsers: grunt.file.readYAML('build/sauce_browsers.yml')
}
}
}
})
grunt.loadNpmTasks('grunt-saucelabs')
}

View File

@ -1,6 +1,6 @@
<p align="center">
<a href="https://v4-alpha.getbootstrap.com">
<img src="http://v4-alpha.getbootstrap.com/assets/brand/bootstrap-solid.svg" width=72 height=72>
<a href="https://getbootstrap.com/">
<img src="https://getbootstrap.com/assets/brand/bootstrap-solid.svg" width=72 height=72>
</a>
<h3 align="center">Bootstrap</h3>
@ -8,14 +8,14 @@
<p align="center">
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
<br>
<a href="https://v4-alpha.getbootstrap.com"><strong>Explore Bootstrap docs &raquo;</strong></a>
<a href="https://getbootstrap.com/docs/4.0/"><strong>Explore Bootstrap docs &raquo;</strong></a>
<br>
<br>
<a href="https://themes.getbootstrap.com">Bootstrap Themes</a>
<a href="https://themes.getbootstrap.com/">Bootstrap Themes</a>
&middot;
<a href="https://jobs.getbootstrap.com">Job Board</a>
<a href="https://jobs.getbootstrap.com/">Job Board</a>
&middot;
<a href="https://blog.getbootstrap.com">Blog</a>
<a href="https://blog.getbootstrap.com/">Blog</a>
</p>
</p>
@ -38,23 +38,22 @@
Several quick start options are available:
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.6.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.6`
- Install with [yarn](https://github.com/yarnpkg/yarn): `yarn add bootstrap@4.0.0-alpha.6`
- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap:4.0.0-alpha.6`
- Install with [Bower](https://bower.io): `bower install bootstrap#v4.0.0-alpha.6`
- 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).
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@4.0.0-beta`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.0.0-beta`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.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.
## 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)
[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/)
[![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)
@ -95,15 +94,17 @@ Documentation search is powered by [Algolia's DocSearch](https://community.algol
### Running documentation locally
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 run test` (or a specific NPM script) 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 <http://localhost:9001> in your browser, and voilà.
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](https://jekyllrb.com/docs/home/).
### Documentation for previous releases
Documentation for v2.3.2 has been made available for the time being at <https://getbootstrap.com/2.3.2/> while folks transition to Bootstrap 3.
- For v2.3.2: <https://getbootstrap.com/2.3.2/>
- For v3.3.x: <https://getbootstrap.com/docs/3.3/>
[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
@ -124,8 +125,8 @@ Editor preferences are available in the [editor config](https://github.com/twbs/
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).
- 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.
@ -136,7 +137,7 @@ Get updates on Bootstrap's development and chat with the project maintainers and
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.
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.
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.
## Creators

View File

@ -1,57 +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: .
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]
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
- package.js
- package.json
- package-lock.json
- sache.json
- twbsconfig.yml
gems:
plugins:
- jekyll-redirect-from
- jekyll-sitemap
- jekyll-toc
# 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_logo_path: /assets/brand/bootstrap-social-logo.png
social_image_path: /assets/brand/bootstrap-social.png
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 vars
current_version: 4.0.0-alpha.6
docs_version: 4.0
repo: https://github.com/twbs/bootstrap
slack: https://bootstrap-slack.herokuapp.com
# Custom variables
current_version: 4.0.0-beta
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"
download:
source: https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.6.zip
dist: https://github.com/twbs/bootstrap/releases/download/v4.0.0-alpha.6/bootstrap-4.0.0-alpha.6-dist.zip
blog: https://blog.getbootstrap.com
expo: https://expo.getbootstrap.com
themes: https://themes.getbootstrap.com
jobs: https://jobs.getbootstrap.com
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"
cdn:
# See https://www.srihash.org for info on how to generate the hashes
css: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css
css_hash: "sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ"
js: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js
js_hash: "sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn"
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"
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.12.3/umd/popper.min.js"
popper_hash: "sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh"

View File

@ -204,7 +204,7 @@
summary: >
`table-cell` borders not overlapping despite `margin-right: -1px`
upstream_bug: >
Chromium#568691
Chromium#749848
origin: >
Bootstrap#17438, Bootstrap#14237

View File

@ -52,7 +52,7 @@
browser: >
Edge
summary: >
Implement the [`of <selector-list>` clause](http://caniuse.com/#feat=css-nth-child-of) of the `:nth-child()` pseudo-class
Implement the [`of <selector-list>` clause](https://caniuse.com/#feat=css-nth-child-of) of the `:nth-child()` pseudo-class
upstream_bug: >
UserVoice#15944476
origin: >
@ -62,7 +62,7 @@
browser: >
Firefox
summary: >
Implement the [`of <selector-list>` clause](http://caniuse.com/#feat=css-nth-child-of) of the `:nth-child()` pseudo-class
Implement the [`of <selector-list>` clause](https://caniuse.com/#feat=css-nth-child-of) of the `:nth-child()` pseudo-class
upstream_bug: >
Mozilla#854148
origin: >
@ -102,7 +102,7 @@
browser: >
Chrome
summary: >
Implement the [`of <selector-list>` clause](http://caniuse.com/#feat=css-nth-child-of) of the `:nth-child()` pseudo-class
Implement the [`of <selector-list>` clause](https://caniuse.com/#feat=css-nth-child-of) of the `:nth-child()` pseudo-class
upstream_bug: >
Chromium#304163
origin: >

View File

@ -37,3 +37,8 @@
- name: Johann-S
user: johann-s
gravatar: d90d49733a4fe1aa461e45cb4a4fd9e3
- name: Andres Galante
user: andresgalante
gravatar: 03dc4f2e26e476958c952505c8d8f563

View File

@ -5,7 +5,7 @@
- title: Contents
- title: Browsers & devices
- title: JavaScript
- title: Options
- title: Theming
- title: Build tools
# - title: Best practices # TODO: Write this content
- title: Webpack
@ -75,12 +75,12 @@
# - title: Approach
- title: Icons
# - title: About
# pages:
# - title: History
# - title: Team
# - title: Brand
# - title: License
# - title: Translations
- title: Migration
- title: About
pages:
- title: History
- title: Team
- title: Brand
- title: License
- title: Translations

View File

@ -9,7 +9,7 @@
img: vogue
- name: Riot Design
url: http://riotdesign.eu/en/
url: https://riot.design/en/
expo_url: https://expo.getbootstrap.com/2014/03/13/riot-design/
img: riot

View File

@ -1,3 +1,8 @@
- name: 中文(繁體)
code: zh-tw
description: Bootstrap 4 繁體中文手冊
url: http://bootstrap.hexschool.com/
- name: Chinese
code: zh
description: Bootstrap 4 中文文档教程

View File

@ -1 +1 @@
<script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=getbootstrapcom" id="_carbonads_js"></script>
<script async src="https://cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=getbootstrapcom" id="_carbonads_js"></script>

View File

@ -1,7 +1,7 @@
{% callout danger %}
#### Asynchronous methods and transitions
All API methods are **asynchronous** and start a **transition**. They returns 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**.
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 informations.]({{ site.baseurl }}/getting-started/javascript/)
[See our JavaScript documentation for more information.]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/)
{% endcallout %}

View File

@ -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 %}
{% endcallout %}

View File

@ -36,8 +36,8 @@
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="bd-versions">
<a class="dropdown-item active" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/">Latest (4.x)</a>
<a class="dropdown-item" href="https://v4-alpha.getbootstrap.com">v4 Alpha 6</a>
<a class="dropdown-item" href="https://getbootstrap.com/3.3.7/">v3.3.7</a>
<a class="dropdown-item" href="https://v4-alpha.getbootstrap.com/">v4 Alpha 6</a>
<a class="dropdown-item" href="https://getbootstrap.com/3.3/">v3.3.7</a>
<a class="dropdown-item" href="https://getbootstrap.com/2.3.2/">v2.3.2</a>
</div>
</li>

View File

@ -1,37 +1,37 @@
<form class="bd-search d-flex align-items-center">
<input type="search" class="form-control" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off">
<button class="btn-link bd-search-docs-toggle d-md-none p-0 ml-3" type="button" data-toggle="collapse" data-target="#bd-docs-nav" aria-controls="bd-docs-nav" aria-expanded="false" aria-label="Toggle docs avigation">
<button class="btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3" type="button" data-toggle="collapse" data-target="#bd-docs-nav" aria-controls="bd-docs-nav" aria-expanded="false" aria-label="Toggle docs navigation">
{% include icons/menu.svg class="" width="30" height="30" %}
</button>
</form>
<nav class="collapse bd-links" id="bd-docs-nav">
{% 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 %}
{%- 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 %}
{%- if page.group == group_slug -%}
{%- assign active = 'active' -%}
{%- endif -%}
<div class="bd-toc-item {{ active }}">
<div class="bd-toc-item{% unless active == nil %} {{ active }}{% endunless %}">
<a class="bd-toc-link" href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ link_slug }}{% if link_slug %}/{% endif %}">
{{ group.title }}
</a>
<ul class="nav bd-sidenav">
{% for doc in group.pages %}
{% assign doc_slug = doc.title | slugify %}
{% assign active = nil %}
{%- 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 %}
{%- if page.group == group_slug and page_slug == doc_slug -%}
{%- assign active = 'active bd-sidenav-active' -%}
{%- endif -%}
<li class="{{ active }}">
<li{% unless active == nil %} class="{{ active }}"{% endunless %}>
<a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/{{ group_slug }}/{{ doc_slug }}/">
{{ doc.title }}
</a>
@ -50,8 +50,8 @@
{% endunless %}
{% endcomment %}
</li>
{% endfor %}
{%- endfor -%}
</ul>
</div>
{% endfor %}
{%- endfor -%}
</nav>

9
_includes/favicons.html Normal file
View File

@ -0,0 +1,9 @@
<!-- Favicons -->
<link rel="apple-touch-icon" href="{{ site.baseurl }}/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="{{ site.baseurl }}/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="{{ site.baseurl }}/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="{{ site.baseurl }}/assets/img/favicons/manifest.json">
<link rel="mask-icon" href="{{ site.baseurl }}/assets/img/favicons/safari-pinned-tab.svg" color="#563d7c">
<link rel="icon" href="{{ site.baseurl }}/favicon.ico">
<meta name="msapplication-config" content="{{ site.baseurl }}/assets/img/favicons/browserconfig.xml">
<meta name="theme-color" content="#563d7c">

View File

@ -1,10 +1,10 @@
<footer class="bd-footer text-muted">
<div class="container">
<div class="container-fluid p-3 p-md-5">
<ul class="bd-footer-links">
<li><a href="{{ site.repo }}">GitHub</a></li>
<li><a href="https://twitter.com/getbootstrap">Twitter</a></li>
<li><a href="{{ site.baseurl }}/examples/">Examples</a></li>
<li><a href="{{ site.baseurl }}/about/history/">About</a></li>
<li><a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/examples/">Examples</a></li>
<li><a href="{{ site.baseurl }}/docs/{{ site.docs_version }}/about/">About</a></li>
</ul>
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank" rel="noopener">@mdo</a> and <a href="https://twitter.com/fat" target="_blank" rel="noopener">@fat</a>. Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
<p>Currently v{{ site.current_version }}. Code licensed <a rel="license noopener" href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, docs <a rel="license noopener" href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.</p>

View File

@ -1,16 +1,15 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Jekyll v{{ jekyll.version }}">
<title>
{% if page.title %}
{%- if page.title -%}
{{ page.title }} &middot; {{ site.title }}
{% else %}
{%- else -%}
{{ site.title }} &middot; {{ site.description }}
{% endif %}
{%- endif -%}
</title>
{% include social.html %}
<!-- Bootstrap core CSS -->
{% if site.github %}
<link href="{{ site.baseurl }}/dist/css/bootstrap.min.css" rel="stylesheet">
@ -20,13 +19,13 @@
<!-- Documentation extras -->
{% if page.layout == "docs" %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" />
<link href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" rel="stylesheet">
{% endif %}
<link href="{{ site.baseurl }}/assets/css/docs.min.css" rel="stylesheet">
<!-- Favicons -->
<link rel="apple-touch-icon" href="{{ site.baseurl }}/apple-touch-icon.png">
<link rel="icon" href="{{ site.baseurl }}/favicon.ico">
{% include favicons.html %}
{% include social.html %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

View File

@ -1 +1 @@
<svg {% if include.class %} class="{{ include.class }}"{% endif %}{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} viewbox="0 0 612 612" xmlns="http://www.w3.org/2000/svg" focusable="false"><title>Bootstrap</title><path fill="currentColor" d="M510 8a94.3 94.3 0 0 1 94 94v408a94.3 94.3 0 0 1-94 94H102a94.3 94.3 0 0 1-94-94V102a94.3 94.3 0 0 1 94-94h408m0-8H102C45.9 0 0 45.9 0 102v408c0 56.1 45.9 102 102 102h408c56.1 0 102-45.9 102-102V102C612 45.9 566.1 0 510 0z"/><path fill="currentColor" d="M196.77 471.5V154.43h124.15c54.27 0 91 31.64 91 79.1 0 33-24.17 63.72-54.71 69.21v1.76c43.07 5.49 70.75 35.82 70.75 78 0 55.81-40 89-107.45 89zm39.55-180.4h63.28c46.8 0 72.29-18.68 72.29-53 0-31.42-21.53-48.78-60-48.78h-75.57zm78.22 145.46c47.68 0 72.73-19.34 72.73-56s-25.93-55.37-76.46-55.37h-74.49v111.4z"/></svg>
<svg{% if include.class %} class="{{ include.class }}"{% endif %}{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} viewbox="0 0 612 612" xmlns="http://www.w3.org/2000/svg" focusable="false"><title>Bootstrap</title><path fill="currentColor" d="M510 8a94.3 94.3 0 0 1 94 94v408a94.3 94.3 0 0 1-94 94H102a94.3 94.3 0 0 1-94-94V102a94.3 94.3 0 0 1 94-94h408m0-8H102C45.9 0 0 45.9 0 102v408c0 56.1 45.9 102 102 102h408c56.1 0 102-45.9 102-102V102C612 45.9 566.1 0 510 0z"/><path fill="currentColor" d="M196.77 471.5V154.43h124.15c54.27 0 91 31.64 91 79.1 0 33-24.17 63.72-54.71 69.21v1.76c43.07 5.49 70.75 35.82 70.75 78 0 55.81-40 89-107.45 89zm39.55-180.4h63.28c46.8 0 72.29-18.68 72.29-53 0-31.42-21.53-48.78-60-48.78h-75.57zm78.22 145.46c47.68 0 72.73-19.34 72.73-56s-25.93-55.37-76.46-55.37h-74.49v111.4z"/></svg>

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 890 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" focusable="false"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} fill="none" stroke="currentcolor" stroke-width="2"{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 32 32" stroke-linecap="round" stroke-linejoin="round"><title>Download icon</title><path d="M9 22c-9 1-8-10 0-9C6 2 23 2 22 10c10-3 10 13 1 12m-12 4l5 4 5-4m-5-10v14"/></svg>

After

Width:  |  Height:  |  Size: 482 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" focusable="false"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} fill="none" stroke="currentcolor" stroke-width="2"{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 32 32" stroke-linecap="round" stroke-linejoin="round"><title>Import icon</title><path d="M18 13l8-11L8 13l6 6-8 11 18-11z"/></svg>

After

Width:  |  Height:  |  Size: 439 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" focusable="false"{% if include.width %} width="{{ include.width }}"{% endif %}{% if include.height %} height="{{ include.height }}"{% endif %} fill="none" stroke="currentcolor" stroke-width="2"{% if include.class %} class="{{ include.class }}"{% endif %} viewBox="0 0 32 32" stroke-linecap="round" stroke-linejoin="round"><title>Lightning icon</title><path d="M18 13l8-11L8 13l6 6-8 11 18-11z"/></svg>

After

Width:  |  Height:  |  Size: 442 B

View File

@ -16,16 +16,15 @@
<script src="{{ site.baseurl }}/assets/js/vendor/clipboard.min.js"></script>
<script src="{{ site.baseurl }}/assets/js/vendor/holder.min.js"></script>
<script src="{{ site.baseurl }}/assets/js/src/application.js"></script>
<script src="{{ site.baseurl }}/assets/js/src/pwa.js"></script>
{% endif %}
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="{{ site.baseurl }}/assets/js/ie10-viewport-bug-workaround.js"></script>
<script src="{{ site.baseurl }}/assets/js/ie-emulation-modes-warning.js"></script>
{% if page.layout == "docs" %}
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<script type="text/javascript">
var docsearch = docsearch({
<script src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
<script>
docsearch({
apiKey: '48cb48b22351bc71ea5f12f4d1ede198',
indexName: 'bootstrap-v4',
inputSelector: '#search-input',
@ -47,10 +46,10 @@
{% endif %}
<script>
Holder.addTheme('gray', {
bg: '#777',
fg: 'rgba(255,255,255,.75)',
font: 'Helvetica',
fontweight: 'normal'
})
Holder.addTheme('gray', {
bg: '#777',
fg: 'rgba(255,255,255,.75)',
font: 'Helvetica',
fontweight: 'normal'
});
</script>

View File

@ -1,3 +1,7 @@
<!-- Meta -->
<meta name="description" content="{{ site.description }}">
<meta name="author" content="{{ site.authors }}">
<!-- Twitter -->
<meta name="twitter:site" content="@{{ site.twitter }}">
<meta name="twitter:creator" content="@{{ site.twitter }}">
@ -30,7 +34,3 @@
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<!-- Meta -->
<meta name="description" content="{{ site.description }}">
<meta name="author" content="{{ site.authors }}">

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
{% include header.html %}
@ -12,9 +12,13 @@
{% include docs-navbar.html %}
<main id="content" role="main">
{% if page.layout == "simple" %}
{{ content }}
</main>
{% else %}
<main id="content" role="main">
{{ content }}
</main>
{% endif %}
{% include footer.html %}
{% include scripts.html %}

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
{% include header.html %}

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
{% include header.html %}

37
_layouts/redirect.html Normal file
View File

@ -0,0 +1,37 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Bootstrap - Content moved</title>
<link rel="canonical" href="{{ page.redirect.to }}">
<meta http-equiv="refresh" content="0; url={{ page.redirect.to }}">
<style>
html {
display: flex;
align-items: center;
justify-content: center;
margin: 0;
width: 100vw;
height: 100vh;
text-align: center;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
h1 {
margin-top: 0;
margin-bottom: .5rem;
}
a {
color: #007bff;
text-decoration: none;
}
</style>
</head>
<body>
<h1>Redirecting…</h1>
<a href="{{ page.redirect.to }}">Click here if you are not redirected</a>
<script>window.location="{{ page.redirect.to }}";</script>
</body>
</html>

View File

@ -2,16 +2,11 @@
layout: default
---
<div class="bd-pageheader text-center text-sm-left">
<div class="container">
<h1>{{ page.title }}</h1>
<p class="lead">
Quickly get a project started with any of our examples ranging from using parts of the framework to custom components and layouts.
</p>
<div class="container my-5">
<main class="bd-content" role="main">
<h1 class="bd-title" id="content">{{ page.title }}</h1>
<p class="bd-lead">{{ page.description }}</p>
{% include ads.html %}
</div>
</div>
<div class="container bd-content">
{{ content }}
{{ content }}
</main>
</div>

View File

@ -34,7 +34,7 @@ Syntax Error in tag 'example' while parsing the following markup:
#{markup}
Valid syntax: example <lang>
Valid syntax: example <lang> [id=foo]
eos
end
end
@ -55,7 +55,7 @@ eos
end
def example(output)
"<div class=\"bd-example\" data-example-id=\"#{@options[:id]}\">\n#{output}\n</div>"
"<div class=\"bd-example\"" + (@options[:id] ? " data-example-id=\"#{@options[:id]}\"" : "") + ">\n#{output}\n</div>"
end
def remove_holderjs(code)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 226 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,11 @@
---
---
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="{{ site.baseurl }}/assets/img/favicons/mstile-150x150.png"/>
<TileColor>#563d7c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

View File

@ -0,0 +1,22 @@
---
---
{
"name": "Bootstrap",
"short_name": "Bootstrap",
"icons": [
{
"src": "{{ site.baseurl }}/assets/img/favicons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "{{ site.baseurl }}/assets/img/favicons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"start_url": "/",
"theme_color": "#563d7c",
"background_color": "#563d7c",
"display": "standalone"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.11, written by Peter Selinger 2001-2013
</metadata>
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M975 6983 c-494 -88 -870 -467 -959 -965 -13 -72 -15 -404 -14 -2513
0 -1970 3 -2446 13 -2515 46 -295 206 -564 445 -747 60 -46 164 -113 175 -113
3 0 31 -13 62 -28 73 -35 146 -58 260 -82 84 -17 196 -18 2563 -16 2334 1
2479 3 2545 19 39 10 77 20 85 22 74 18 226 87 310 139 92 58 255 209 298 276
9 14 28 41 43 60 36 48 111 200 138 280 12 36 30 106 40 155 18 86 19 188 17
2570 l-1 2480 -27 95 c-52 188 -106 300 -207 434 -170 225 -400 372 -691 442
-71 17 -200 18 -2545 20 -2111 2 -2482 0 -2550 -13z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

12
assets/js/docs.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,7 @@
// IE JavaScript conditional compilation docs: https://msdn.microsoft.com/library/121hztk3%28v=vs.94%29.aspx
// @cc_on docs: https://msdn.microsoft.com/library/8ka90k2e%28v=vs.94%29.aspx
var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // eslint-disable-line no-new-func
if (jscriptVersion === undefined) {
if (typeof jscriptVersion === 'undefined') {
return 11 // IE11+ not in emulation mode
}
if (jscriptVersion < 9) {

View File

@ -96,15 +96,10 @@
.tooltip('_fixTitle')
})
anchors.options = {
icon: '#'
}
anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
$('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5').wrapInner('<div></div>')
})
}(jQuery))
;(function () {
'use strict'
anchors.options = {
icon: '#'
}
anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5')
}())

30
assets/js/src/pwa.js Normal file
View File

@ -0,0 +1,30 @@
/* eslint no-console:off */
(function setupSW() {
'use strict'
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('/sw.js').then(function (registration) { // eslint-disable-line compat/compat
console.log('ServiceWorker registration successful with scope: ', registration.scope)
registration.onupdatefound = function () {
var installingWorker = registration.installing
installingWorker.onstatechange = function () {
switch (installingWorker.state) {
case 'installed':
if (navigator.serviceWorker.controller) { // eslint-disable-line compat/compat
console.log('new update available')
location.reload(true)
}
break
default:
}
}
}
}).catch(function (err) {
console.log('ServiceWorker registration failed: ', err)
})
})
}
}())

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,42 +1,30 @@
// scss-lint:disable ImportantRule, IdSelector
// stylelint-disable declaration-no-important, selector-max-id
//
// Carbon ads
//
#carbonads {
position: static;
display: block;
max-width: 400px;
padding: 15px 15px 15px 160px;
margin: 50px -15px 0;
margin: 2rem 0;
overflow: hidden;
font-size: 13px;
line-height: 1.5;
line-height: 1.4;
text-align: left;
border: solid #866ab3;
border-width: 1px 0 0;
background-color: rgba(0,0,0,.05);
a {
color: #fff;
color: #333;
text-decoration: none;
}
@include media-breakpoint-up(sm) {
max-width: 330px;
margin: 50px auto 0;
border-width: 1px;
border-radius: 4px;
}
@include media-breakpoint-up(lg) {
position: absolute;
top: 0;
right: 15px;
margin-top: 0;
.bd-masthead & {
position: static;
}
}
}
.carbon-img {
@ -46,24 +34,5 @@
.carbon-poweredby {
display: block;
color: #cdbfe3 !important;
}
.bd-content {
#carbonads {
position: static;
max-width: 400px;
margin: 2rem 0;
line-height: 1.4;
background-color: #f5f5f5;
border: 0;
a {
color: #333;
}
.carbon-poweredby {
color: #777 !important;
}
}
color: #777 !important;
}

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-no-important
// Docsearch overrides
//
// `!important` indicates overridden properties.
@ -25,7 +27,7 @@
display: none !important;
}
[class^=ds-dataset-] {
[class^="ds-dataset-"] {
padding: 0 !important;
overflow: visible !important;
background-color: transparent !important;
@ -101,7 +103,7 @@
padding: 0 1rem .5rem !important;
margin-top: -.25rem;
font-size: .875rem !important;
font-weight: normal;
font-weight: 400;
line-height: 1.25 !important;
}

View File

@ -1,7 +1,5 @@
// scss-lint:disable ImportantRule
.anchorjs-link {
font-weight: normal;
font-weight: 400;
color: rgba($link-color, .5);
transition: color .16s linear;

View File

@ -1,4 +1,4 @@
// scss-lint:disable QualifyingElement
// stylelint-disable selector-no-qualifying-type
//
// Grid examples
@ -285,10 +285,11 @@
}
}
.modal.show {
.modal {
z-index: 1072;
.tooltip, .popover {
.tooltip,
.popover {
z-index: 1073;
}
}
@ -392,16 +393,26 @@
.highlight {
padding: 1rem;
margin: 1rem (-$grid-gutter-width / 2);
margin-top: 1rem;
margin-bottom: 1rem;
background-color: #f7f7f9;
-ms-overflow-style: -ms-autohiding-scrollbar;
@include media-breakpoint-up(sm) {
padding: 1.5rem;
}
}
.bd-content .highlight {
margin-right: (-$grid-gutter-width / 2);
margin-left: (-$grid-gutter-width / 2);
@include media-breakpoint-up(sm) {
margin-right: 0;
margin-left: 0;
}
}
.highlight pre {
padding: 0;
margin-top: 0;

View File

@ -1,4 +1,4 @@
// scss-lint:disable IdSelector, NestingDepth, SelectorDepth, QualifyingElement
// stylelint-disable selector-max-combinators, selector-max-compound-selectors, selector-max-type, selector-no-qualifying-type
//
// Automatically style Markdown-based tables like a Bootstrap `.table`.
@ -11,9 +11,14 @@
> h2[id],
> h3[id],
> h4[id] {
pointer-events: none;
> div,
> a {
pointer-events: auto;
}
&::before {
position: relative;
z-index: -1;
display: block;
height: 6rem;
margin-top: -6rem;
@ -105,3 +110,6 @@
font-size: 1.5rem;
}
}
.bd-text-purple { color: $bd-purple; }
.bd-text-purple-bright { color: $bd-purple-bright; }

View File

@ -1,84 +0,0 @@
.bd-featurette {
padding-top: 3rem;
padding-bottom: 3rem;
font-size: 1rem;
line-height: 1.5;
color: #555;
text-align: center;
background-color: #fff;
border-top: 1px solid #eee;
.highlight {
text-align: left;
}
.lead {
margin-right: auto;
margin-bottom: 2rem;
margin-left: auto;
font-size: 1rem;
text-align: center;
}
}
.bd-featurette-title {
margin-bottom: .5rem;
font-size: 2rem;
font-weight: normal;
color: #333;
text-align: center;
}
.half-rule {
width: 6rem;
margin: 2.5rem auto;
@include media-breakpoint-up(sm) {
margin-right: 0;
margin-left: 0;
}
}
.bd-featurette h4 {
margin-top: 1rem;
margin-bottom: .5rem;
font-weight: normal;
color: #333;
}
.bd-featurette-img {
display: block;
margin-bottom: 1.25rem;
color: #333;
}
.bd-featurette-img:hover {
color: $blue;
text-decoration: none;
}
.bd-featurette-img img {
display: block;
margin-bottom: 1rem;
}
@media (min-width: 480px) {
.bd-featurette .img-fluid {
margin-top: 2rem;
}
}
@media (min-width: 768px) {
.bd-featurette {
padding-top: 6rem;
padding-bottom: 6rem;
}
.bd-featurette-title {
font-size: 2.5rem;
+ .lead {
font-size: 1.5rem;
}
}
.bd-featurette .lead {
max-width: 80%;
}
.bd-featurette .img-fluid {
margin-top: 0;
}
}

View File

@ -3,8 +3,6 @@
//
.bd-footer {
padding: 4rem 0;
margin-top: 4rem;
font-size: 85%;
text-align: center;
background-color: #f7f7f7;

View File

@ -1,54 +1,29 @@
// scss-lint:disable ImportantRule
// stylelint-disable declaration-no-important
.bd-masthead {
position: relative;
padding: 3rem ($grid-gutter-width / 2) 2rem;
color: $bd-purple-light;
text-align: center;
background-image: linear-gradient(135deg, darken($bd-purple, 20%), $bd-purple, lighten(saturate($bd-purple, 5%), 15%));
.bd-booticon {
margin: 0 auto 2rem;
color: $bd-purple-light;
border-color: $bd-purple-light;
}
padding: 3rem ($grid-gutter-width / 2);
// background-image: linear-gradient(45deg, #fafafa, #f5f5f5);
h1 {
font-weight: 300;
line-height: 1;
}
.lead {
margin-right: auto;
margin-bottom: 2rem;
margin-left: auto;
font-size: 1.25rem;
color: #fff;
}
.version {
margin-top: -1rem;
margin-bottom: 2rem;
}
.btn {
width: 100%;
padding: 1rem 2rem;
padding: .8rem 2rem;
font-size: 1.25rem;
font-weight: 500;
}
.carbonad {
margin-bottom: -2rem !important;
margin-top: 0 !important;
margin-bottom: -3rem !important;
}
@include media-breakpoint-up(sm) {
padding-top: 8rem;
padding-bottom: 2rem;
.btn {
width: auto;
}
padding-top: 5rem;
padding-bottom: 5rem;
.carbonad {
margin-bottom: 0 !important;
@ -56,29 +31,31 @@
}
@include media-breakpoint-up(md) {
padding-bottom: 4rem;
.bd-header {
margin-bottom: 4rem;
}
h1 {
font-size: 4rem;
}
.lead {
font-size: 1.5rem;
}
.carbonad {
margin-top: 3rem !important;
}
}
}
@include media-breakpoint-up(lg) {
.lead {
width: 85%;
font-size: 2rem;
}
.bd-pretext {
overflow: hidden;
resize: none;
}
.half-rule {
width: 6rem;
margin: 2.5rem 0;
}
.masthead-followup {
.bd-clipboard { display: none; }
.highlight {
padding: .5rem 0;
background-color: transparent;
}
}

View File

@ -1,4 +1,4 @@
// scss-lint:disable ImportantRule
// stylelint-disable declaration-no-important
.bd-pageheader {
padding: 2rem ($grid-gutter-width / 2);
@ -13,7 +13,7 @@
h1 {
font-size: 3rem;
font-weight: normal;
font-weight: 400;
color: #fff;
}

View File

@ -1,5 +1,3 @@
// scss-lint:disable ImportantRule
//
// Responsive tests
//
@ -12,6 +10,6 @@
// Utility classes table
.bd-table th small {
display: block;
font-weight: normal;
font-weight: 400;
color: #999;
}

View File

@ -1,4 +1,4 @@
// scss-lint:disable VendorPrefix
// stylelint-disable declaration-no-important
//
// Right side table of contents
@ -51,7 +51,7 @@
.bd-sidebar {
order: 0;
background-color: #f5f2f9;
// background-color: #f5f2f9;
border-bottom: 1px solid rgba(0,0,0,.1);
@include media-breakpoint-up(md) {

View File

@ -1,4 +1,4 @@
// scss-lint:disable IdSelector
// stylelint-disable selector-max-id
#skippy {
display: block;

View File

@ -1,3 +1,5 @@
// stylelint-disable declaration-block-single-line-max-declarations
.hll { background-color: #ffc; }
.c { color: #999; }
.k { color: #069; }
@ -62,5 +64,15 @@
.css .o + .nt,
.css .nt + .nt { color: #999; }
.language-bash::before { color: #009; content: "$ "; user-select: none; }
.language-powershell::before { color: #009; content: "PM> "; user-select: none; }
.language-bash::before,
.language-sh::before {
color: #009;
content: "$ ";
user-select: none;
}
.language-powershell::before {
color: #009;
content: "PM> ";
user-select: none;
}

View File

@ -32,7 +32,6 @@
@import "variables";
@import "nav";
@import "masthead";
@import "featurettes";
@import "featured-sites";
@import "ads";
@import "content";

View File

@ -1,37 +1 @@
{
"name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"keywords": [
"css",
"js",
"sass",
"mobile-first",
"responsive",
"front-end",
"framework",
"web"
],
"homepage": "https://getbootstrap.com",
"license": "MIT",
"moduleType": "globals",
"main": [
"scss/bootstrap.scss",
"dist/js/bootstrap.js"
],
"ignore": [
"/.*",
"/_*",
"about",
"assets",
"docs",
"js/tests",
"nuget",
"CNAME",
"composer.json",
"Gruntfile.js"
],
"dependencies": {
"jquery": ">=1.9.1",
"popper.js": "^1.11.0"
}
}
@$% Not a Bower package. Use a better package management tool instead. ^&*

View File

@ -1,6 +1,6 @@
{
"attr-bans": ["align", "background", "bgcolor", "border", "frameborder", "longdesc", "marginwidth", "marginheight", "scrolling"],
"attr-name-style": "dash",
"attr-name-style": false,
"attr-no-unsafe-char": false,
"class-style": "dash",
"doctype-first": true,

248
build/.stylelintrc Normal file
View File

@ -0,0 +1,248 @@
{
"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-required",
"font-weight-notation": "numeric",
"function-comma-space-after": null,
"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": null,
"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",
"max-width",
"height",
"min-height",
"max-height",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"margin",
"margin-top",
"margin-right",
"margin-bottom",
"margin-left",
"overflow",
"overflow-x",
"overflow-y",
"-webkit-overflow-scrolling",
"-ms-overflow-x",
"-ms-overflow-y",
"-ms-overflow-style",
"clip",
"clear",
"font",
"font-family",
"font-size",
"font-style",
"font-weight",
"font-variant",
"font-size-adjust",
"font-stretch",
"font-effect",
"font-emphasize",
"font-emphasize-position",
"font-emphasize-style",
"font-smooth",
"hyphens",
"line-height",
"color",
"text-align",
"text-align-last",
"text-emphasis",
"text-emphasis-color",
"text-emphasis-style",
"text-emphasis-position",
"text-decoration",
"text-indent",
"text-justify",
"text-outline",
"-ms-text-overflow",
"text-overflow",
"text-overflow-ellipsis",
"text-overflow-mode",
"text-shadow",
"text-transform",
"text-wrap",
"-webkit-text-size-adjust",
"-ms-text-size-adjust",
"letter-spacing",
"-ms-word-break",
"word-break",
"word-spacing",
"-ms-word-wrap",
"word-wrap",
"overflow-wrap",
"tab-size",
"white-space",
"vertical-align",
"list-style",
"list-style-position",
"list-style-type",
"list-style-image",
"pointer-events",
"-ms-touch-action",
"touch-action",
"cursor",
"visibility",
"zoom",
"table-layout",
"empty-cells",
"caption-side",
"border-spacing",
"border-collapse",
"content",
"quotes",
"counter-reset",
"counter-increment",
"resize",
"user-select",
"nav-index",
"nav-up",
"nav-right",
"nav-down",
"nav-left",
"background",
"background-color",
"background-image",
"filter",
"background-repeat",
"background-attachment",
"background-position",
"background-position-x",
"background-position-y",
"background-clip",
"background-origin",
"background-size",
"border",
"border-color",
"border-style",
"border-width",
"border-top",
"border-top-color",
"border-top-style",
"border-top-width",
"border-right",
"border-right-color",
"border-right-style",
"border-right-width",
"border-bottom",
"border-bottom-color",
"border-bottom-style",
"border-bottom-width",
"border-left",
"border-left-color",
"border-left-style",
"border-left-width",
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"border-image",
"border-image-source",
"border-image-slice",
"border-image-width",
"border-image-outset",
"border-image-repeat",
"outline",
"outline-width",
"outline-style",
"outline-color",
"outline-offset",
"box-shadow",
"opacity",
"-ms-interpolation-mode",
"transition",
"transition-delay",
"transition-timing-function",
"transition-duration",
"transition-property",
"transform",
"transform-origin",
"animation",
"animation-name",
"animation-duration",
"animation-play-state",
"animation-timing-function",
"animation-delay",
"animation-iteration-count",
"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
}
}

View File

@ -11,34 +11,30 @@
/* global Set */
var fs = require('fs')
var path = require('path')
var sh = require('shelljs')
const fs = require('fs')
const path = require('path')
const sh = require('shelljs')
sh.config.fatal = true
var sed = sh.sed
const sed = sh.sed
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
}
RegExp.quoteReplacement = function (string) {
return string.replace(/[$]/g, '$$')
}
RegExp.quote = (string) => string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
RegExp.quoteReplacement = (string) => string.replace(/[$]/g, '$$')
var DRY_RUN = false
const DRY_RUN = false
function walkAsync(directory, excludedDirectories, fileCallback, errback) {
if (excludedDirectories.has(path.parse(directory).base)) {
return
}
fs.readdir(directory, function (err, names) {
fs.readdir(directory, (err, names) => {
if (err) {
errback(err)
return
}
names.forEach(function (name) {
var filepath = path.join(directory, name)
fs.lstat(filepath, function (err, stats) {
names.forEach((name) => {
const filepath = path.join(directory, name)
fs.lstat(filepath, (err, stats) => {
if (err) {
process.nextTick(errback, err)
return
@ -60,19 +56,19 @@ function walkAsync(directory, excludedDirectories, fileCallback, errback) {
function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
original = new RegExp(RegExp.quote(original), 'g')
replacement = RegExp.quoteReplacement(replacement)
var updateFile = !DRY_RUN ? function (filepath) {
const updateFile = !DRY_RUN ? (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
sed('-i', original, replacement, filepath)
}
} : function (filepath) {
} : (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
console.log('FILE: ' + filepath)
console.log(`FILE: ${filepath}`)
}
else {
console.log('EXCLUDED:' + filepath)
console.log(`EXCLUDED:${filepath}`)
}
}
walkAsync(directory, excludedDirectories, updateFile, function (err) {
walkAsync(directory, excludedDirectories, updateFile, (err) => {
console.error('ERROR while traversing directory!:')
console.error(err)
process.exit(1)
@ -85,14 +81,14 @@ function main(args) {
console.error('Got arguments:', args)
process.exit(1)
}
var oldVersion = args[0]
var newVersion = args[1]
var EXCLUDED_DIRS = new Set([
const oldVersion = args[0]
const newVersion = args[1]
const EXCLUDED_DIRS = new Set([
'.git',
'node_modules',
'vendor'
])
var INCLUDED_EXTENSIONS = new Set([
const INCLUDED_EXTENSIONS = new Set([
// This extension whitelist is how we avoid modifying binary files
'',
'.css',

View File

@ -1,3 +1,5 @@
'use strict'
module.exports = (ctx) => ({
map: ctx.file.dirname.startsWith('docs') ? false : {
inline: false,
@ -5,27 +7,6 @@ module.exports = (ctx) => ({
sourcesContent: true
},
plugins: {
autoprefixer: {
browsers: [
//
// Official browser support policy:
// https://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#supported-browsers
//
'Chrome >= 45', // Exact version number here is kinda arbitrary
'Firefox ESR',
// Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version,
// NOT the Edge app version shown in Edge's "About" screen.
// For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12.
// See also https://github.com/Fyrd/caniuse/issues/1928
'Edge >= 12',
'Explorer >= 10',
// Out of leniency, we prefix these 1 version further back than the official policy.
'iOS >= 9',
'Safari >= 9',
// The following remain NOT officially supported, but we're lenient and include their prefixes to avoid severely breaking in them.
'Android >= 4.4',
'Opera >= 30'
]
}
autoprefixer: {}
}
})

50
build/rollup.config.js Normal file
View File

@ -0,0 +1,50 @@
'use strict'
const path = require('path')
const babel = require('rollup-plugin-babel')
const resolve = require('rollup-plugin-node-resolve')
const pkg = require(path.resolve(__dirname, '../package.json'))
const BUNDLE = process.env.BUNDLE === 'true'
const year = new Date().getFullYear()
let fileDest = 'bootstrap.js'
const external = ['jquery', 'popper.js']
const plugins = [
babel({
exclude: 'node_modules/**', // only transpile our source code
externalHelpersWhitelist: [ // include only required helpers
'defineProperties',
'createClass',
'inheritsLoose'
]
})
]
const globals = {
jquery: '$',
'popper.js': 'Popper'
}
if (BUNDLE) {
fileDest = 'bootstrap.bundle.js'
// remove last entry in external array to bundle Popper
external.pop()
delete globals['popper.js']
plugins.push(resolve())
}
module.exports = {
input: path.resolve(__dirname, '../js/src/index.js'),
output: {
file: path.resolve(__dirname, `../dist/js/${fileDest}`),
format: 'iife'
},
name: 'bootstrap',
external: external,
globals: globals,
plugins: plugins,
banner: `/*!
* Bootstrap v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/`
}

65
build/sauce_browsers.json Normal file
View File

@ -0,0 +1,65 @@
[
{
"browserName": "safari",
"platform": "OS X 10.11",
"version": "latest"
},
{
"browserName": "chrome",
"platform": "OS X 10.11",
"version": "latest"
},
{
"browserName": "firefox",
"platform": "OS X 10.11",
"version": "latest"
},
{
"browserName": "MicrosoftEdge",
"platform": "Windows 10",
"version": "latest"
},
{
"browserName": "internet explorer",
"version": "11",
"platform": "Windows 8.1"
},
{
"browserName": "internet explorer",
"version": "10",
"platform": "Windows 8"
},
{
"browserName": "chrome",
"platform": "Windows 10",
"version": "latest"
},
{
"browserName": "firefox",
"platform": "Windows 10",
"version": "latest"
},
{
"browserName": "iphone",
"deviceName": "iPhone Simulator",
"platformName": "OS X 10.11",
"version": "9.3"
},
{
"browserName": "chrome",
"platform": "Linux",
"version": "latest"
},
{
"browserName": "firefox",
"platform": "Linux",
"version": "latest"
},
{
"platform": "Linux",
"browserName": "android",
"deviceName": "Android Emulator",
"version": "latest",
"deviceType": "phone"
}
]

View File

@ -1,79 +0,0 @@
[
# Docs: https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
{
browserName: "safari",
platform: "OS X 10.11"
},
{
browserName: "chrome",
platform: "OS X 10.11",
version: "latest"
},
{
browserName: "firefox",
platform: "OS X 10.11",
version: "latest"
},
# Mac Opera not currently supported by Sauce Labs
{
browserName: "MicrosoftEdge",
platform: "Windows 10",
version: "latest"
},
{
browserName: "internet explorer",
version: "11",
platform: "Windows 8.1"
},
{
browserName: "internet explorer",
version: "10",
platform: "Windows 8"
},
{
browserName: "chrome",
platform: "Windows 10",
version: "latest"
},
{
browserName: "firefox",
platform: "Windows 10",
version: "latest"
},
# Win Opera 15+ not currently supported by Sauce Labs
{
browserName: "iphone",
deviceName: "iPhone Simulator",
platformName: "OS X 10.11",
version: "9.3"
},
# iOS Chrome not currently supported by Sauce Labs
# Linux (unofficial)
{
browserName: "chrome",
platform: "Linux",
version: "latest"
},
{
browserName: "firefox",
platform: "Linux",
version: "latest"
},
# Android
{
platform: "Linux",
browserName: "android",
deviceName: "Android Emulator",
version: "latest",
deviceType: "phone"
}
]

View File

@ -0,0 +1,95 @@
'use strict'
const path = require('path')
const JSUnitSaucelabs = require('jsunitsaucelabs')
// Docs: https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
// Mac Opera is not currently supported by Sauce Labs
// Win Opera 15+ is not currently supported by Sauce Labs
// iOS Chrome is not currently supported by Sauce Labs
const jsUnitSaucelabs = new JSUnitSaucelabs({
username: process.env.SAUCE_USERNAME,
password: process.env.SAUCE_ACCESS_KEY,
build: process.env.TRAVIS_JOB_ID
})
const testURL = 'http://localhost:3000/js/tests/index.html?hidepassed'
const browsersFile = require(path.resolve(__dirname, './sauce_browsers.json'))
let jobsDone = 0
let jobsSucceeded = 0
const waitingCallback = (error, body, id) => {
if (error) {
console.error(error)
process.exit(1)
}
if (typeof body !== 'undefined') {
if (!body.completed) {
setTimeout(() => {
jsUnitSaucelabs.getStatus(id, (error, body) => {
waitingCallback(error, body, id)
})
}, 2000)
} else {
const test = body['js tests'][0]
let passed = false
let errorStr = false
if (test.result !== null) {
if (typeof test.result === 'string' && test.result === 'Test exceeded maximum duration') {
errorStr = test.result
} else {
passed = test.result.total === test.result.passed
}
}
console.log(`Tested ${testURL}`)
console.log(`Platform: ${test.platform.join(',')}`)
console.log(`Passed: ${passed.toString()}`)
console.log(`Url ${test.url} \n`)
if (errorStr) {
console.error(errorStr)
}
if (passed) {
jobsSucceeded++
}
jobsDone++
// Exit
if (jobsDone === browsersFile.length - 1) {
jsUnitSaucelabs.stop()
process.exit(jobsDone === jobsSucceeded ? 0 : 1)
}
}
}
}
jsUnitSaucelabs.on('tunnelCreated', () => {
browsersFile.forEach((tmpBrowser) => {
const browsersPlatform = typeof tmpBrowser.platform === 'undefined' ? tmpBrowser.platformName : tmpBrowser.platform
const browsersArray = [browsersPlatform, tmpBrowser.browserName, tmpBrowser.version]
jsUnitSaucelabs.start([browsersArray], testURL, 'qunit', (error, success) => {
if (typeof success !== 'undefined') {
const taskIds = success['js tests']
if (!taskIds || !taskIds.length) {
throw new Error('Error starting tests through Sauce Labs API')
}
taskIds.forEach((id) => {
jsUnitSaucelabs.getStatus(id, (error, body) => {
waitingCallback(error, body, id)
})
})
} else {
console.error(error)
}
})
})
})
jsUnitSaucelabs.initTunnel()

64
build/ship.sh Executable file
View File

@ -0,0 +1,64 @@
#!/usr/bin/env bash
#
# Usage
# ---------------
# 1. Clone second version of Bootstrap in sibling directory named `bs-docs`.
# 2. Within `bs-docs` copy, switch to `gh-pages` branch.
# 3. Pull latest, re-bundle, re-npm.
# 4. Run script.
red=$'\e[1;31m'
green=$'\e[1;32m'
blue=$'\e[1;34m'
magenta=$'\e[1;35m'
cyan=$'\e[1;36m'
end=$'\e[0m'
# Get current version from package.json
current_version=$(node -p "require('./package.json').version")
if [[ $# -lt 1 ]]; then
printf "\n${red}⚠️ Shipping aborted. You must specify a version.\n${end}"
exit 1
fi
# Pulling latest changes, just to be sure
printf "\n${magenta}=======================================================${end}"
printf "\n${magenta}Pulling latest changes...${end}"
printf "\n${magenta}=======================================================\n\n${end}"
git pull origin v4-dev
# Update version number
printf "\n${magenta}=======================================================${end}"
printf "\n${magenta}Updating version number...${end}"
printf "\n${magenta}=======================================================\n${end}"
npm run release-version $current_version $1
# Compile latest CSS and JS
printf "\n${magenta}=======================================================${end}"
printf "\n${magenta}Compile latest CSS and JS...${end}"
printf "\n${magenta}=======================================================\n${end}"
npm run dist
# Compress the dist files
printf "\n${magenta}=======================================================${end}"
printf "\n${magenta}Compressing the dist files...${end}"
printf "\n${magenta}=======================================================\n${end}"
npm run release-zip
# Compile the docs
printf "\n${magenta}=======================================================${end}"
printf "\n${magenta}Compile hosted documentation...${end}"
printf "\n${magenta}=======================================================\n${end}"
npm run docs-github
# Copy the contents of the built docs site over to `bs-docs` repo
printf "\n${magenta}=======================================================${end}"
printf "\n${magenta}Copy it over...${end}"
printf "\n${magenta}=======================================================\n${end}"
cp -rf _gh_pages/. ../bs-docs/
printf "\nDone!\n"
printf "\n${green}=======================================================${end}"
printf "\n${green}Success, $1 is ready to review and publish.${end}"
printf "\n${green}=======================================================\n\n${end}"

View File

@ -1,41 +0,0 @@
const fs = require('fs')
fs.readFile('package.json', (err, data) => {
if (err) {
throw err
}
const pkg = JSON.parse(data)
const year = new Date().getFullYear()
const stampTop =
`/*!
* Bootstrap v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author}
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')
}
(function ($) {
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
}
})(jQuery);
(function () {
`
const stampEnd = `
})();`
process.stdout.write(stampTop)
process.stdin.on('end', () => {
process.stdout.write(stampEnd)
})
process.stdin.pipe(process.stdout)
})

View File

@ -1,5 +0,0 @@
{
"output" : {
"comments": "/^!/"
}
}

Some files were not shown because too many files have changed in this diff Show More