Skip to content

Commit

Permalink
Sync v-4dev with twbs (#4)
Browse files Browse the repository at this point in the history
* Remove .col-form-legend in favor of .col-form-label (twbs#24932)

* chore: sync with twbs (#1)

* Make styling of grouped option buttons class-based

Referencing twbs#23728, styling grouped radio and checkbox buttons should not require the data-toggle attribute.

* Fix installing deps in our webpack docs

* Fix nested cards on card group (twbs#24766)

* Update popper.js to v1.12.9. (twbs#24797)

* Don't run postcss for `dist/css/*.min.css` files. (twbs#24676)

* Change the text color to dark on bg color warning examples (twbs#24805)

* Remove unused file and bundle ie-emulation-modes-warning.js with docs.min.js (twbs#24825)

* Remove the unused assets/js/ie10-viewport-bug-workaround.js.

* Combine ie-emulation-modes-warning.js with docs.min.js.

* Typos in grid.md (twbs#24828)

Fixed typos in offsetting section of grid.md

* Fix dropup example code

* Update devDependencies. (twbs#24829)

* Add support for fractional viewport widths (zoom/high-dpi displays) (twbs#24299)

* Change breakpoint  max- calculation to fractional values
* Update docs to reflect fractional max-width breakpoint values
* Add fractional max-width to offcanvas example
* Add documentation and SCSS comment for fractional viewport support

* Add a simple script to generate SRI hashes for our assets. (twbs#24814)

* Allow us to run our unit test on differents jquery version

* Run karma tests in parallel.

* Update typography docs (twbs#24863)

* closes twbs#24450

* Rewrite custom form check backgrounds (twbs#24697)

* Rewrite custom form check backgrounds

Previously, this was all just a background-color and background-image. When we restored the gradients though, we had two background-images competing on the same element, causing rendering glitches. This refactors that code, creating a mixin to simplify things, so we can we easily use two background-images (SVG icon and gradient) when -gradients is set to true.

Fixes twbs#24598

* restore default vars

* Revamp custom check and radio backgrounds

Instead of applying multiple background-image's to the same element, we're adding a new ::before pseudo-element to layer the background-images. Gradients go on the .custom-control-indicator while their icons go on the ::before element. This allows us to shave some bytes from when we compile and we previously needed to redeclare the background-image for the icon if you changed the gradient.

* remove now unused mixin

* mention change in migration docs

* lets the centered modal have any height (twbs#24803)

* Custom select updates (twbs#24699)

* Add support for size attribute on custom selects

* Add large custom select, document it and the small variant

* fix custom select focus state

* fix custom file input focus styles

* remove empty line

* Update package.json. (twbs#24582)

1. Use the same jQuery version in jspm
2. Update the files to only include the source and dist folders

* Use Jekyll's `smartify` filter when possible. (twbs#24866)

* Darken outline hover color to match default button hover (twbs#24150)

* Fix Issue twbs#24144

Alter button-outline-variant mixin to darken hover and active background in same fashion as filled button.

* Fix Issue twbs#24144

Filled button on hover should utilize the same color-yiq mixin so that theme buttons match

* default values, fix mixin

* rename it

* document it

* add migration note

* fixes twbs#24728

* Remove unused CSS. (twbs#24872)

* tab.js: do not remove fade class if there's no initial active pane

* Restore currently unused variables (twbs#24891)

* Replace lint-vars.sh with a Node.js script. (twbs#24860)

Also, include it in the `css` npm script since it's instant.

* Fix docs horizontal scrollbar (twbs#24878)

* Fix docs horizontal scrollbar in Components > Modal

* Add overflow to docs example class

* Drop the handleUpdate() variant

While I understand the variant covers the "get a particular plugin instance" case from http://getbootstrap.com/docs/4.0/getting-started/javascript/#programmatic-api it seems weird that we do it here but not everywhere else in the docs (randomly checking other pages, we seem to stick to the documented methods as written on those pages). As this isn't properly explained as is, and as it adds nothing (more of a preference for authors), it would be easier to just drop the variant and stick with the documented method as outlined later on in the same page (avoids having to go off on a "why should you use this instead of that" tangent here).

* Combine path and remove variable used in one place. (twbs#24873)

* Update devDependencies and gems. (twbs#24876)

* Override padding on radio input label (twbs#24899)

We could tell folks to nix the class, we could tell them to override it, or we could add another modifier of some kind to address this. None of them seem particularly useful, but the padding override feels the most approachable and clearly documentable. Added this here to close twbs#24844.

* Update README.md (twbs#24912)

* Work around Travis failures.

Note that we should revert this when the issue is fixed.

* Revert the Travis workaround. (twbs#24926)

The issue has been fixed.

* add .col-form-legend-lg and .col-form-legend-sm classes

* document .col-form-legend-{size}

* trash .col-form-legend completely

One class fits all

* Update forms.md

* consolidate copy

* property order

* Document breaking change from twbs#24932

* Update devDependencies and gems. (twbs#24940)

* Remove page reload in pwa.js. (twbs#24923)

* Use only transitionend event (twbs#24962)

* Update link to Font Awesome 

They have a shiny new site for v5 - https://fontawesome.com/
  • Loading branch information
tmorehouse committed Dec 8, 2017
1 parent 8d6b3c1 commit 278a4bc
Show file tree
Hide file tree
Showing 9 changed files with 489 additions and 488 deletions.
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.')
}
}())
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

0 comments on commit 278a4bc

Please sign in to comment.