Nicolas Coden [Wed, 19 Sep 2018 21:58:12 +0000 (23:58 +0200)]
fix: use given value if no breakpoint value is found in mixin "-zf-breakpoint-value()"
Use the original value if no breakpoint value can be found in `$map` in the `-zf-breakpoint-value()` mixin. With this commit, `$name` can safely be a String value without being considered as a breakpoint name.
When using deepLink options, the handleTabChange will fail if using a non-standard markup (if there are DOM levels between the `.tabs-title` and the `a`).
Nicolas Coden [Mon, 20 Aug 2018 20:54:18 +0000 (22:54 +0200)]
fix: fix DropdownMenu body handler check to ignore the element itself
> `andSelf()` is deprecated and should be replaced with `addBack()`
> -- @SassNinja
Also, `andSelf` cannot be used that way. This commit replace it with the opposite approach: checking if the target is the child of the element or the element itself using `closest()`.
Nicolas Coden [Sun, 19 Aug 2018 21:50:03 +0000 (23:50 +0200)]
fix: avoid stopping event propagation when not necessary
Stopping the event propagation prevent the user to watch for the event at an higher level. If it was needed to prevent a duplicate behavior in a component, others methods should be used like debouncing the event.
Changes:
- Remove `stopPropagation` and `stopImmediatePropagation` from everywhere we do not want to cancel the event (AccordionMenu, Drilldown, DropdownMenu, Tabs, Tooltip).
- Update `DropdownMenu._removeBodyHandler` to also ignore click events on the element itself.
Others changes:
- Clean up `DropdownMenu._events` a bit.
- Add explainaitions where `stopPropagation` is still used (Triggers).
See https://github.com/zurb/foundation-sites/issues/11457
Nicolas Coden [Sun, 19 Aug 2018 21:41:23 +0000 (23:41 +0200)]
fix: prevent double Keyboard events handling without stopping propagation
Stopping the event propagation prevent the user to watch for the event at an higher level. If it was needed to prevent a duplicate behavior in a component, others methods should be used like debouncing the event.
Changes:
- Save and check for `event.zfIsKeyHandled` in Keyboard utility to prevent to handle twice the same event in different components.
- Remove `event.stopPropagation` from components' keyboard handlers (Accordion, DropdownMenu, OffCanvas and Tabs).
See https://github.com/zurb/foundation-sites/issues/11457
Nicolas Coden [Sun, 19 Aug 2018 21:33:22 +0000 (23:33 +0200)]
docs: add docs about "mobile scroll" bug #9707 in OffCanvas
Add documentation for the OffCanvas private methods `_recordScrollable` and `_stopScrollPropagation` to explicitely justify the need for `stopPropagation`.
Nicolas Coden [Sun, 19 Aug 2018 15:43:46 +0000 (17:43 +0200)]
docs: remove mentions of unsupported Y Grid from block grids section
Block Grid is not supported for Y Grid and will not be implemented. It would add too much code for a feature that is will not be used in most projects.
Plus, Block Grid classes are not namespaced for the horizontal or vertical grid. Adding block grid classes for the vertical grid would lead of inconstencies or backward incompatibility and increased specificity.
Nicolas Coden [Sat, 18 Aug 2018 21:45:12 +0000 (23:45 +0200)]
fix: avoid viewport height for fullscreen Reveal as it may be incorrect #10879
The CSS viewport is the larger possible view height and does not change with the visible area height. This is an intended behavior for optimization reason. See this article:
Nicolas Coden [Wed, 15 Aug 2018 20:42:05 +0000 (22:42 +0200)]
refactor: move the customizer ZIPing to `customizer:zip` and `customizer:clean`
The `finish` gulp event is an stream internal event and is not suitable to chain tasks.
Changes:
- Move the custom ZIP file generation to the `customizer:zip` task
- Move the cleaning of the customizer build directory to `customizer:clean` task
Nicolas Coden [Wed, 15 Aug 2018 20:35:39 +0000 (22:35 +0200)]
fix: remove broken Sass linting from Sass compilation task and move it to build task
Changes:
- Remove broken Sass linting from the `sass:foundation` task. The `finish` gulp event is an stream internal event and is not suitable to chain tasks.
- Add `lint:graceful`, `lint:graceful:sass` and `lint:graceful:javascript` to check for linting errors without throwing errors and breaking the chain of tasks.
- Call `lint:graceful` on the build task. For now, there is too much linting issues to display them at each Sass/Javascript compilation.
Nicolas Coden [Sat, 4 Aug 2018 17:59:32 +0000 (19:59 +0200)]
feat: add Orbit element "data-slide-active-label" to target the bullet span to move
Add the Orbit element `[data-slide-active-label]` to explicitely set which Orbit bullet children describe the active slide and should be moved to the new active slide.
Nicolas Coden [Thu, 2 Aug 2018 22:34:27 +0000 (00:34 +0200)]
fix: fix Dropdown Menu top level item properties #11412
Changes:
- Only apply top-level styles to top-level items. This increase specificity but this markup structure is alreaddy assumed elsewhere in the component.
- Remove the default `$white` background on top-level items: it was never applied before #11377 and could now cause visual changes.
Nicolas Coden [Mon, 30 Jul 2018 22:13:00 +0000 (00:13 +0200)]
fix: set the Drilldown height for on the currently opened (sub)menu #11416
Changes:
- Save the currently opened sub-menu as `$currentMenu`
- When calculating the Drilldown wrapper height, use the currently opened menu height instead of the primary menu.
Nicolas Coden [Wed, 18 Jul 2018 22:48:00 +0000 (00:48 +0200)]
feat: add support of fractions in "xy-cell-base()" function and mixin.
Make the `xy-cell-base()` function and mixin support values representing a fraction (`6`, `50%`, `1 of 2` or `1/2`...) and treating them like "shrink".
**BREAKING CHANGE**: The `xy-cell()` and `xy-cell-base()` mixins now generate the XY cell base CSS when `$size` represents a fraction.
Nicolas Coden [Wed, 18 Jul 2018 21:31:51 +0000 (23:31 +0200)]
feat: refactor `xy-cell-base()` mixin and add corresponding function
Changes:
- Add function `xy-cell-base()`: Returns the appropriate CSS flex value for a cell base.
- Refactor mixin `xy-cell-base()` to use its corresponding function.
Nicolas Coden [Tue, 17 Jul 2018 21:41:34 +0000 (23:41 +0200)]
feat: refactor mixin "xy-cell-offset()" and add corresponding function
Changes:
- Add function `xy-cell-offset()`: Returns the appropriate CSS value to offset a cell.
- Refactor mixin `xy-cell-offset()` to use its corresponding function.
**BREAKING CHANGE**: The `$breakpoint` argument in the `xy-cell-offset()` mixin does not support raw value anymore. Use `$gutters` instead.
Nicolas Coden [Tue, 17 Jul 2018 21:30:42 +0000 (23:30 +0200)]
feat: add functions/mixins for XY Grid cell base/size/gutters
Move all the `xy-cell()` mixin logics to dedicated functions and mixins.
Changes:
- Add function `xy-cell-gutters()`: Calculate the size of a cell gutters.
- Add function `xy-cell-size-css()`: Returns the appropriate CSS value for a cell size.
- Add mixin `xy-cell-size()`: ets sizing properties for cells.
- Add mixin `xy-cell-gutters()`: Sets gutters properties for cells.
- Refactor mixin `xy-cell()` to move all the logics to these new mixins.
All these functions/mixins now have the same interface. They do not always expect all the XY cell arguments, but they name and process the argument they expect the same way.
**BREAKING CHANGE**: When no gutter can be found to generate a cell, an error is now thrown
Nicolas Coden [Tue, 17 Jul 2018 20:45:41 +0000 (22:45 +0200)]
refactor: move "-zf-each-breakpoint()" mixin iteration logics to "-zf-each-breakpoint()"
Changes:
* Add mixin `-zf-each-breakpoint-in()`
* Add function `-zf-bool()` to convert values to Booleans
* Refactor mixin `-zf-each-breakpoint()` to rely on `-zf-each-breakpoint-in()`
There should be no change in the `-zf-each-breakpoint` API