Corey Snyder [Tue, 6 Dec 2016 21:57:13 +0000 (16:57 -0500)]
Add Mutation Observers to Sticky
Sticky is receiving a mutation observer. Sticky can now listen to
elements within its DOM scope for mutation changes. This will allow the
sticky element, and it’s anchor container (if applicable) to receive a
notification if any element is changed within it’s respective space
calling setSizes() and calc() in the same manor as a resize would.
Nicolas Coden [Sun, 4 Dec 2016 10:29:16 +0000 (11:29 +0100)]
Fix expanded menu #8325
Fix https://github.com/zurb/foundation-sites/issues/8325.
See also: https://github.com/zurb/foundation-sites/pull/8779. Thanks to
@natewiebe13.
`.expanded` is a modifier for a horizontal menu, and should not be
applied on a vertical one.
Changes:
- Move the `.expanded` modifier after `.horizontal` and before
`.vertical`.
- Add the `.expanded` modifiers for each breakpoint with the
corresponding prefixes.
Other changes:
- Use `-zf-each-breakpoint` to generate responsive modifiers.
Note: The `.expanded` modifier should be applied only when the menu is
horizontal. For example, on a menu which is made horizontal on the
medium breakpoint, `.medium-expanded` should be used :
`.menu.vertical.medium-horizontal.medium-expanded`.
Nicolas Coden [Tue, 6 Dec 2016 06:47:51 +0000 (07:47 +0100)]
Add yarn.lock
Yarn (https://yarnpkg.com) is like npm, but you don’t have do delete
`node_modules` each time you have a bug. It is also faster.
`yarn.lock` store exactly which versions of each dependency were
installed.
From https://yarnpkg.com/en/docs/yarn-lock:
All yarn.lock files should be checked into source control (e.g. git or
mercurial). This allows Yarn to install the same exact dependency tree
across all machines, whether it be your coworker’s laptop or a CI
server.
Framework and library authors should also check yarn.lock into source
control. Don’t worry about publishing the yarn.lock file as it won’t
have any effect on users of the library.
Nicolas Coden [Tue, 6 Dec 2016 05:56:50 +0000 (06:56 +0100)]
Fix -zf-each-breakpoint without small bp
`$breakpoint-classes` is a list, not a map.
Use `sl-remove()` from SassyList
(https://github.com/at-import/SassyLists) instead of `map-remove()` to
remove the small breakpoint from `$breakpoint-classes`.
Other changes:
- Rename `$map` to `$list`.
- Rename `$size` to `$name`. `$breakpoint-classes` contains breakpoint
names, not sizes. Keep `$-zf-size` for compatibility.
Changes:
- Revert https://github.com/zurb/foundation-sites/pull/9430 - Make
`normalize-scss` a dev dependency.
- Copy Sass dependencies to `/_vendor/scss` and import them in Sass
from there.
Why not importing the Sass dependencies as real dependencies and from
`node_modules`: we cannot assume the path to our real dependencies. Old
npm versions store them in our `node_modules` folder, while newer
versions store them in the `node_modules` folder of the root project.
The hide delay of the visible dropdown is replaced by the delays of the
lastly triggered dropdown, so the hide function is never called on the
currently visible dropdown.
Remember and cancel the delay inside each element. So a visible
dropdown remember its hide delay even if several dropdown must be
hidden.
Nicolas Coden [Sat, 3 Dec 2016 12:01:34 +0000 (13:01 +0100)]
Factorize function -zf-breakpoint-value into -zf-get-bp-val
- Allow the `-zf-get-bp-val` function to take a single value as
responsive config `$map` and return it regardless of `$value`.
- Remove useless function `-zf-breakpoint-value`
Nicolas Coden [Sat, 3 Dec 2016 11:54:57 +0000 (12:54 +0100)]
Factorize breakpoint map handling in grid gutters and margins
Factorize breakpoint map handling in `grid-column-gutter` and
`grid-column-margin` mixins.
Changes:
- Add the `-zf-breakpoint-value` mixin which generate its content with
the value `$-zf-bp-value` depending on its parameter, like
`grid-column-gutter` and `grid-column-margin` did (see the `@mixin
-zf-breakpoint-value` doc)
- Use the `-zf-breakpoint-value` mixin in `grid-column-gutter` and
`grid-column-margin` and remove duplicated code.
- Rename the `grid-column-gutter` function to `-zf-breakpoint-value`
and move it to `/scss/util/_breakpoint.scss`. This function had a
generic behaviour.
Leslie Doherty [Fri, 2 Dec 2016 19:51:07 +0000 (11:51 -0800)]
Update to helper mixin for flexbox
The docs read to pass in any horizontal value with an example "bottom", but the function is requiring a vertical alignment (so 'bottom' would work but 'left, center, right' would not.)
Brett Mason [Thu, 1 Dec 2016 19:23:05 +0000 (19:23 +0000)]
Set `fixed` as the default off canvas behaviour. Remove the $offcanvas-position` variable as its no longer needed. Generate a `off-canvas-absolute` class to be used to set a menu as absolute positioned. Add an absolute visual test.
Brett Mason [Thu, 1 Dec 2016 12:38:39 +0000 (12:38 +0000)]
Add warning if using depreciated `$header-sizes` map. Correctly generate settings file variables based on `$header-styles` rather than `$header-sizes`.
Brett Mason [Wed, 30 Nov 2016 21:02:34 +0000 (21:02 +0000)]
Set the default off canvas panel behaviour to use `position: absolute`to match current live behaviour. Added an alternative class of `off-canvas-fixed` to set a menu to be `position: fixed` allowing you to use both types at the same time.