Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync with twbs #1

Merged
merged 40 commits into from
Dec 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9e8a3c0
Make styling of grouped option buttons class-based
Nov 9, 2017
3a060bc
Merge branch 'v4-dev' into btn-group-styling
picapixa Nov 9, 2017
615c995
Fix installing deps in our webpack docs
Johann-S Nov 16, 2017
8e4ba11
Fix nested cards on card group (#24766)
andresgalante Nov 16, 2017
0ff7231
Update popper.js to v1.12.9. (#24797)
XhmikosR Nov 16, 2017
81cf6c4
Don't run postcss for `dist/css/*.min.css` files. (#24676)
XhmikosR Nov 16, 2017
8df34b0
Change the text color to dark on bg color warning examples (#24805)
andresgalante Nov 17, 2017
e29398e
Remove unused file and bundle ie-emulation-modes-warning.js with docs…
XhmikosR Nov 19, 2017
1449ec0
Typos in grid.md (#24828)
Rychu-Pawel Nov 19, 2017
eeb3ce0
Fix dropup example code
ysds Nov 20, 2017
0f17d53
Update devDependencies. (#24829)
XhmikosR Nov 20, 2017
dcb7613
Add support for fractional viewport widths (zoom/high-dpi displays) (…
patrickhlauke Nov 20, 2017
cdab56d
Add a simple script to generate SRI hashes for our assets. (#24814)
XhmikosR Nov 23, 2017
e8ba371
Allow us to run our unit test on differents jquery version
Johann-S Nov 10, 2017
68ca294
Run karma tests in parallel.
XhmikosR Nov 17, 2017
3506ae9
Update typography docs (#24863)
ysds Nov 24, 2017
fff0116
closes #24450
mdo Nov 24, 2017
4829350
Rewrite custom form check backgrounds (#24697)
mdo Nov 24, 2017
b29e3f2
lets the centered modal have any height (#24803)
andresgalante Nov 24, 2017
2ec1606
Custom select updates (#24699)
mdo Nov 24, 2017
3de4628
Update package.json. (#24582)
XhmikosR Nov 25, 2017
02e4f6e
Use Jekyll's `smartify` filter when possible. (#24866)
XhmikosR Nov 25, 2017
7c10068
Darken outline hover color to match default button hover (#24150)
afholderman Nov 25, 2017
725f5fb
Merge branch 'btn-group-styling' of https://github.com/picapixa/boots…
mdo Nov 25, 2017
ccb201b
rename it
mdo Nov 25, 2017
79cfd56
document it
mdo Nov 25, 2017
643f548
add migration note
mdo Nov 25, 2017
babdf36
Merge branch 'v4-dev' of https://github.com/twbs/bootstrap into v4-dev
mdo Nov 25, 2017
8750952
fixes #24728
mdo Nov 25, 2017
544b3ee
Remove unused CSS. (#24872)
XhmikosR Nov 25, 2017
80d4a51
tab.js: do not remove fade class if there's no initial active pane
alekitto Nov 25, 2017
671bb27
Restore currently unused variables (#24891)
mdo Nov 27, 2017
7629567
Replace lint-vars.sh with a Node.js script. (#24860)
XhmikosR Nov 27, 2017
05d88ca
Fix docs horizontal scrollbar (#24878)
patrickhlauke Nov 27, 2017
6050d72
Combine path and remove variable used in one place. (#24873)
XhmikosR Nov 28, 2017
c2c0eeb
Update devDependencies and gems. (#24876)
XhmikosR Nov 28, 2017
a649c7f
Override padding on radio input label (#24899)
mdo Nov 29, 2017
a07bc5d
Update README.md (#24912)
Johann-S Nov 29, 2017
636dcf1
Work around Travis failures.
XhmikosR Nov 30, 2017
0230150
Revert the Travis workaround. (#24926)
XhmikosR Dec 1, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ GEM
nokogiri (~> 1.6)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.15.0)
kramdown (1.16.1)
liquid (4.0.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ cdn:
js_hash: "sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ"
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.7/umd/popper.min.js"
popper_hash: "sha384-TUSpaPr16YQQOdRqTlO+JgktHTijOcvPtWvOyfo7F6Usp/LtNvvmKLpZ+NSgVdjA"
popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
popper_hash: "sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
3 changes: 3 additions & 0 deletions _includes/callout-info-mediaqueries-breakpoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% callout info %}
Note that since browsers do not currently support [range context queries](https://www.w3.org/TR/mediaqueries-4/#range-context), we work around the limitations of [`min-` and `max-` prefixes](https://www.w3.org/TR/mediaqueries-4/#mq-min-max) and viewports with fractional widths (which can occur under certain conditions on high-dpi devices, for instance) by using values with higher precision for these comparisons.
{% endcallout %}
6 changes: 3 additions & 3 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{{ page.description | default: site.description }}">
<meta name="description" content="{{ page.description | default: site.description | smartify }}">
<meta name="author" content="{{ site.authors }}">
<meta name="generator" content="Jekyll v{{ jekyll.version }}">

<title>
{%- if page.title -%}
{{ page.title }} · {{ site.title }}
{{ page.title | smartify }} · {{ site.title | smartify }}
{%- else -%}
{{ site.title }} · {{ site.description }}
{{ site.title | smartify }} · {{ site.description | smartify }}
{%- endif -%}
</title>

Expand Down
3 changes: 1 addition & 2 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
<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/ie-emulation-modes-warning.js"></script>
<script src="{{ site.baseurl }}/assets/js/src/pwa.js"></script>
{%- endif -%}

<script src="{{ site.baseurl }}/assets/js/ie-emulation-modes-warning.js"></script>

{%- if page.layout == "docs" -%}
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script>
Expand Down
8 changes: 4 additions & 4 deletions _includes/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<meta name="twitter:card" content="{% if page.title %}summary{% else %}summary_large_image{% endif %}">
<meta name="twitter:site" content="@{{ site.twitter }}">
<meta name="twitter:creator" content="@{{ site.twitter }}">
<meta name="twitter:title" content="{{ page.title | default: site.title }}">
<meta name="twitter:description" content="{{ page.description | default: site.description }}">
<meta name="twitter:title" content="{{ page.title | default: site.title | smartify }}">
<meta name="twitter:description" content="{{ page.description | default: site.description | smartify }}">
<meta name="twitter:image" content="{% if page.title %}{{ site.url | append: site.social_logo_path }}{% else %}{{ site.url | append: site.social_image_path }}{% endif %}">

<!-- Facebook -->
<meta property="og:url" content="{{ site.url | append: page.url }}">
<meta property="og:title" content="{{ page.title | default: site.title }}">
<meta property="og:description" content="{{ page.description | default: site.description }}">
<meta property="og:title" content="{{ page.title | default: site.title | smartify }}">
<meta property="og:description" content="{{ page.description | default: site.description | smartify }}">
<meta property="og:type" content="website">
<meta property="og:image" content="{{ site.url | replace: 'https://', 'http://' | append: site.social_image_path }}">
<meta property="og:image:secure_url" content="{{ site.url | append: site.social_image_path }}">
Expand Down
4 changes: 2 additions & 2 deletions _layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
{% endif %}

<main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content" role="main">
<h1 class="bd-title" id="content">{{ page.title }}</h1>
<p class="bd-lead">{{ page.description }}</p>
<h1 class="bd-title" id="content">{{ page.title | smartify }}</h1>
<p class="bd-lead">{{ page.description | smartify }}</p>
{% include ads.html %}
{{ content }}
</main>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

<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>
<h1 class="bd-title" id="content">{{ page.title | smartify }}</h1>
<p class="bd-lead">{{ page.description | smartify }}</p>
{% include ads.html %}
{{ content }}
</main>
Expand Down
4 changes: 2 additions & 2 deletions assets/js/docs.min.js

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions assets/js/ie10-viewport-bug-workaround.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
// IT'S JUST JUNK FOR OUR DOCS!
// ++++++++++++++++++++++++++++++++++++++++++
/*!
* Copyright 2014-2015 The Bootstrap Authors
* Copyright 2014-2015 Twitter, Inc.
*
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see https://creativecommons.org/licenses/by/3.0/.
*/

// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes.
(function () {
'use strict'
Expand Down
2 changes: 1 addition & 1 deletion assets/js/vendor/popper.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/scss/_component-examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
position: relative;
padding: 1rem;
margin: 1rem (-$grid-gutter-width / 2);
overflow: auto;
border: solid #f7f7f9;
border-width: .2rem 0 0;
@include clearfix();
Expand Down
21 changes: 0 additions & 21 deletions assets/scss/_featured-sites.scss

This file was deleted.

5 changes: 0 additions & 5 deletions assets/scss/_masthead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
}
}

.bd-pretext {
overflow: hidden;
resize: none;
}

.half-rule {
width: 6rem;
margin: 2.5rem 0;
Expand Down
60 changes: 0 additions & 60 deletions assets/scss/_page-header.scss

This file was deleted.

15 changes: 0 additions & 15 deletions assets/scss/_responsive-tests.scss

This file was deleted.

3 changes: 0 additions & 3 deletions assets/scss/docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,12 @@
@import "variables";
@import "nav";
@import "masthead";
@import "featured-sites";
@import "ads";
@import "content";
@import "page-header";
@import "skiplink";
@import "sidebar";
@import "footer";
@import "component-examples";
@import "responsive-tests";
@import "buttons";
@import "callouts";
@import "examples";
Expand Down
4 changes: 2 additions & 2 deletions build/change-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
const fs = require('fs')
const path = require('path')
const sh = require('shelljs')

sh.config.fatal = true
const sed = sh.sed

// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
RegExp.quote = (string) => string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
Expand Down Expand Up @@ -58,7 +58,7 @@ function replaceRecursively(directory, excludedDirectories, allowedExtensions, o
replacement = RegExp.quoteReplacement(replacement)
const updateFile = !DRY_RUN ? (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
sed('-i', original, replacement, filepath)
sh.sed('-i', original, replacement, filepath)
}
} : (filepath) => {
if (allowedExtensions.has(path.parse(filepath).ext)) {
Expand Down
60 changes: 60 additions & 0 deletions build/generate-sri.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env node

/*!
* Script to generate SRI hashes for use in our docs.
* Remember to use the same vendor files as the CDN ones,
* otherwise the hashes won't match!
*
* Copyright 2017 The Bootstrap Authors
* Copyright 2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

'use strict'

const fs = require('fs')
const path = require('path')
const sriToolbox = require('sri-toolbox')
const sh = require('shelljs')

sh.config.fatal = true

const configFile = path.join(__dirname, '../_config.yml')

// Array of objects which holds the files to generate SRI hashes for.
// `file` is the path from the root folder
// `configPropertyName` is the _config.yml variable's name of the file
const files = [
{
file: 'dist/css/bootstrap.min.css',
configPropertyName: 'css_hash'
},
{
file: 'dist/js/bootstrap.min.js',
configPropertyName: 'js_hash'
},
{
file: 'assets/js/vendor/jquery-slim.min.js',
configPropertyName: 'jquery_hash'
},
{
file: 'assets/js/vendor/popper.min.js',
configPropertyName: 'popper_hash'
}
]

files.forEach((file) => {
fs.readFile(file.file, 'utf8', (err, data) => {
if (err) {
throw err
}

const integrity = sriToolbox.generate({
algorithms: ['sha384']
}, data)

console.log(`${file.configPropertyName}: ${integrity}`)

sh.sed('-i', new RegExp(`(\\s${file.configPropertyName}:\\s+"|')(\\S+)("|')`), '$1' + integrity + '$3', configFile)
})
})
Loading