Nicolas Coden [Sun, 1 Jul 2018 20:00:40 +0000 (22:00 +0200)]
refactor: simplify Input Group border-radius selector
We should assume as little as possible to HTML structure inside our components. People should be able to freely use the classes of components/elements we provide without limited by self-references and dependencies.
This commit simplify the selector used to apply border-radius on Input Group childreens to make all childreens affected, with a single exception for `.input-group-button` where sub-childreens are affected too.
Nicolas Coden [Thu, 28 Jun 2018 17:32:12 +0000 (19:32 +0200)]
fix: remove $-zf-size from non-responsive XY Grid classes generation
`$-zf-size` is only set within breakpoints. Breakpoints are not expected to be used around the `xy-vertical-grid-classes()` mixin.
Note: a more appropriate fix would be to rely on the `xy-cell()` mixin instead of `xy-cell-static()` to fully support explicit/implicit/null breakpoint option. However this may introduce breaking changes, so this will be kept for v6.6.0.
Nicolas Coden [Tue, 26 Jun 2018 20:43:59 +0000 (22:43 +0200)]
chore: resolve jQuery devDependency CVE
Update the internal jQuery version (used for tests) to the latest version to resolve a CVE.
As Foundation supports jQuery `>=2.2.0`, the jQuery peer dependency is not changed. PeerDependencies versions in `package.json` should only reflect the actual compatibility with the package, regardless of promotion or "potential" security issue. It's up to the end developer to choose the package version corresponding to its own needs and to the risks comming with its own usage.
Nicolas Coden [Mon, 25 Jun 2018 22:55:50 +0000 (00:55 +0200)]
fix: add back Bower dependencies
Bower dependencies in `bower.json` were removed in #11073 in the migration from Bower to npm.
These dependencies should not have been removed as the Bower package still require `jquery` and `what-input`. Someone installing `foundation-sites` with bower should still have these packages included. We simply don't use Bower anymore in development mode and don't promote its usage in the documentation.
Removing `bower install` commands was sufficiant for this migration and Bower dependencies in `bower.json` were unrelated.
See https://github.com/zurb/foundation-sites/pull/11073
Nicolas Coden [Sun, 17 Jun 2018 21:52:41 +0000 (23:52 +0200)]
fix: keep a scrollbar on document when Reveal opens #7831
#11065 was intented to avoid double scrollbars from a Reveal modal, but removing all scrollbars when the modal opens changes the page content width and the content shift. This is a regression of #7831.
The current solution is a mix between the two previous fixes:
* Modal may have a scrollbar or not, following its content height
* Body has no scrollbar and prevent any scroll
* Document may have a scrollbar, following its content height (controlled in JS)
Changes:
* add the `zf-has-scroll` global html modifer and toggle it on Reveal opening/closing
* always prevent scroll on body instead of html tag like in #10583
See https://github.com/zurb/foundation-sites/issues/10791#issuecomment-377861523
Closes #7831
Nicolas Coden [Sat, 2 Jun 2018 19:03:50 +0000 (21:03 +0200)]
refactor: move all browserlist configs to ".browserslistrc"
Note: browserlist config is kept in ".babelrc" because browserlist external config is not supported by Babel < 7. See https://github.com/browserslist/browserslist
Nicolas Coden [Thu, 31 May 2018 20:56:19 +0000 (22:56 +0200)]
fix: lower breakpoint max value precision to avoid rounding #11313
As seen in #10978, we need a subpixel precision to handle zoomed browsers. But browsers handle sub-pixel mediaqueries badly and a too high precision causes the issue described above. So we have to find the proper balance for a maximum support.
Changes:
* set breakpoint max values to `0.00125em` (`0.02px`) under the next breakpoint instead of `0.00001`.
Nicolas Coden [Fri, 25 May 2018 21:17:25 +0000 (23:17 +0200)]
fix: use fallback gutter for fallback breakpoint in XY cell #11194
When no breakpoint is passed to `xy-cell` and a fallback "zero" breakpoint is used, use a fallback gutter as well if it is not found. This way, an implicit behavior stay implicit and a warning is thrown only if a breakpoint was explicitely given.
Nicolas Coden [Tue, 22 May 2018 21:15:02 +0000 (23:15 +0200)]
chore: move jQuery & what-input to peerDependencies #11290
peerDependencies is for dependencies that are exposed to (and expected to be used by) the consuming code, as opposed to "private" dependencies that are not exposed, and are only an implementation detail.
* We need `jQuery` and `motion-ui` as peerDependencies instead of dependencies because we actually expect the user to install them. We cannot simply remove them because we still need the package managers to check for versions compatibilities and warn the user if they are missing.
* We need `jQuery` and `motion-ui` as devDependencies too because we use them for tests/build/documentation and peerDependencies are not installed (even in development mode - https://github.com/yarnpkg/yarn/issues/1503).
See https://github.com/zurb/foundation-sites/issues/11290
Nicolas Coden [Mon, 21 May 2018 17:46:25 +0000 (19:46 +0200)]
chore: update foundation-docs
Required because of b323354 that renamed Clipboard to ClipboardJS
Included changes:
* 1489588 style: add newline
* 5184de6 style: remove extraneous space
* aaa25b0 fix: increase z-index of topbar
* 65242d8 chore: update lockfile
* 477baf9 tests: use npm ci
* b323354 fix: migrate to the new ClipboardJS instantiation to resolve conflict with window.Clipboard
* 9331594 fix: add namespace to type class in Sass reference table
Adam Klepacz [Sun, 20 May 2018 19:17:34 +0000 (21:17 +0200)]
Update forms.md
I have changed classes in #### Checkboxes and Radio Buttons cause in yours HTML EXAMPLE third checkbox was collapsing to the next line.
Now it displays proper
Nicolas Coden [Fri, 18 May 2018 20:13:04 +0000 (22:13 +0200)]
test: wait for debounce for slow browsers in Interval debounce test
Timeout delays are most often not respected and the differences between several timeouts running in parrallel can be huge. To prevent race conditions on slower browsers, we run the debounce test several time to wait for the debounced event to be called, which may be finally called way after the expected time.
Nicolas Coden [Wed, 16 May 2018 21:36:12 +0000 (23:36 +0200)]
test: give time to IE to render elements before testing focus
For all the following tests testing the currently focused elements,
IE 9/10/11 may not focus the tested element because is is still
rendering. To prevent this, we wait after the component initialization.
Fixing this IE behavior in components would require to delay the focus
for all browsers then trigger a "ready" event.