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

Sync v-4dev with twbs #4

Merged
merged 6 commits into from
Dec 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

group :development, :test do
gem 'jekyll', '~> 3.6.2'
gem 'jekyll-redirect-from', '~> 0.12.1'
gem 'jekyll-redirect-from', '~> 0.13.0'
gem 'jekyll-sitemap', '~> 1.1.1'
gem 'jekyll-toc', '~> 0.4.0'
gem 'jekyll-toc', '~> 0.5.0.rc'
end
20 changes: 11 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-redirect-from (0.12.1)
jekyll-redirect-from (0.13.0)
jekyll (~> 3.3)
jekyll-sass-converter (1.5.0)
jekyll-sass-converter (1.5.1)
sass (~> 3.4)
jekyll-sitemap (1.1.1)
jekyll (~> 3.3)
jekyll-toc (0.4.0)
jekyll-toc (0.5.0.rc)
nokogiri (~> 1.6)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.16.1)
jekyll-watch (1.5.1)
listen (~> 3.0)
kramdown (1.16.2)
liquid (4.0.0)
listen (3.0.8)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
mini_portile2 (2.3.0)
nokogiri (1.8.1)
Expand All @@ -46,6 +47,7 @@ GEM
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.2.1)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.5.3)
sass-listen (~> 4.0.0)
Expand All @@ -59,9 +61,9 @@ PLATFORMS

DEPENDENCIES
jekyll (~> 3.6.2)
jekyll-redirect-from (~> 0.12.1)
jekyll-redirect-from (~> 0.13.0)
jekyll-sitemap (~> 1.1.1)
jekyll-toc (~> 0.4.0)
jekyll-toc (~> 0.5.0.rc)

BUNDLED WITH
1.16.0
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ cdn:
jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
popper_hash: "sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"

toc:
min_level: 2
max_level: 4
5 changes: 3 additions & 2 deletions _layouts/redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Bootstrap - Content moved</title>
<title>Bootstrap · Content moved</title>
<link rel="canonical" href="{{ page.redirect.to }}">
<meta http-equiv="refresh" content="0; url={{ page.redirect.to }}">
<meta name="robots" content="noindex">
<style>
html {
display: flex;
Expand All @@ -30,7 +31,7 @@
</style>
</head>
<body>
<h1>Redirecting</h1>
<h1>Redirecting&hellip;</h1>
<a href="{{ page.redirect.to }}">Click here if you are not redirected</a>
<script>window.location="{{ page.redirect.to }}";</script>
</body>
Expand Down
17 changes: 2 additions & 15 deletions assets/js/src/pwa.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,11 @@
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)
})
})
} else {
console.log('Service workers are not supported.')
}
}())
8 changes: 3 additions & 5 deletions docs/4.0/components/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,7 @@ More complex layouts can also be created with the grid system.

#### Horizontal form

Create horizontal forms with the grid by adding the `.row` class to form groups and using the `.col-*-*` classes to specify the width of your labels and controls.

Be sure to add `.col-form-label` to your `<label>`s as well so they're vertically centered with their associated form controls. For `<legend>` elements, you can use `.col-form-legend` to make them appear similar to regular `<label>` elements.
Create horizontal forms with the grid by adding the `.row` class to form groups and using the `.col-*-*` classes to specify the width of your labels and controls. Be sure to add `.col-form-label` to your `<label>`s as well so they're vertically centered with their associated form controls.

At times, you maybe need to use margin or padding utilities to create that perfect alignment you need. For example, we've removed the `padding-top` on our stacked radio inputs label to better align the text baseline.

Expand All @@ -382,7 +380,7 @@ At times, you maybe need to use margin or padding utilities to create that perfe
</div>
<fieldset class="form-group">
<div class="row">
<legend class="col-form-legend col-sm-2 pt-0">Radios</legend>
<legend class="col-form-label col-sm-2 pt-0">Radios</legend>
<div class="col-sm-10">
<div class="form-check">
<label class="form-check-label">
Expand Down Expand Up @@ -425,7 +423,7 @@ At times, you maybe need to use margin or padding utilities to create that perfe

##### Horizontal form label sizing

Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s to correctly follow the size of `.form-control-lg` and `.form-control-sm`.
Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `<label>`s or `<legend>`s to correctly follow the size of `.form-control-lg` and `.form-control-sm`.

{% example html %}
<form>
Expand Down
3 changes: 2 additions & 1 deletion docs/4.0/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ While Beta 2 saw the bulk of our breaking changes during the beta phase, but we
- Changed the CSS for managing multiple `background-image`s on custom form checkboxes and radios. Previously, the `.custom-control-indicator` element had the background color, gradient, and SVG icon. Customizing the background gradient meant replacing all of those every time you needed to change just one. Now, we have `.custom-control-indicator` for the fill and gradient and `.custom-control-indicator::before` handles the icon.
- The npm package no longer includes any files other than our source and dist files; if you relied on them and were running our scripts via the `node_modules` folder, you should adapt your workflow.
- Updated selector for input-based button groups. Instead of `[data-toggle="buttons"] { }` for style and behavior, we use the `data` attribute just for JS behaviors and rely on a new `.btn-group-toggle` class for styling.
- Removed `.col-form-legend` in favor of a slightly improved `.col-form-label`. This way `.col-form-label-sm` and `.col-form-label-lg` can be used on `<legend>` elements with ease.

## Beta 2 changes

Expand Down Expand Up @@ -78,7 +79,7 @@ Here are the big ticket items you'll want to be aware of when moving from v3 to
- **Dropped the Glyphicons icon font.** If you need icons, some options are:
- the upstream version of [Glyphicons](https://glyphicons.com/)
- [Octicons](https://octicons.github.com/)
- [Font Awesome](http://fontawesome.io/)
- [Font Awesome](https://fontawesome.com/)
- See the [Extend page]({{ site.baseurl }}/docs/{{ site.docs_version }}/extend/icons/) for a list of alternatives. Have additional suggestions? Please open an issue or PR.
- **Dropped the Affix jQuery plugin.**
- We recommend using `position: sticky` instead. [See the HTML5 Please entry](http://html5please.com/#sticky) for details and specific polyfill recommendations. One suggestion is to use an `@supports` rule for implementing it (e.g., `@supports (position: sticky) { ... }`)/
Expand Down
17 changes: 2 additions & 15 deletions js/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ const Util = (($) => {

const MAX_UID = 1000000

const TransitionEndEvent = {
WebkitTransition : 'webkitTransitionEnd',
transition : 'transitionend'
}

// shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
Expand All @@ -48,17 +43,9 @@ const Util = (($) => {
return false
}

const el = document.createElement('bootstrap')

for (const name in TransitionEndEvent) {
if (typeof el.style[name] !== 'undefined') {
return {
end: TransitionEndEvent[name]
}
}
return {
end: 'transitionend'
}

return false
}

function transitionEndEmulator(duration) {
Expand Down
Loading