Skip to content

Commit

Permalink
Update the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bartaz committed Feb 1, 2024
1 parent eba9392 commit c0c356e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion releases.yml
@@ -1,6 +1,6 @@
- version: 4.7.0
features:
- component: Navigation\
- component: Navigation / 25/75 split
url: /docs/patterns/navigation
status: Updated
notes: We've introduced a new variant of top navigation that aligns with 25/75 grid split using <code>p-navigation__row--25-75</code>.
Expand Down
19 changes: 7 additions & 12 deletions templates/docs/patterns/navigation/index.md
Expand Up @@ -12,25 +12,20 @@ sites.
The navigation items are collapsed behind a "Menu" link in small screens and
displayed horizontally on larger screens.

<div class="p-notification--information">
<p class="p-notification__content">
<span class="p-notification__title">Note:</span>
<span class="p-notification__message">By default, the width of the navigation is constrained to <code>$grid-max-width</code>. To make the navigation full width, replace <code>.p-navigation__row</code> with <code>.p-navigation__row--full-width</code>.</span>
</p>
</div>

The navigation pattern is one of the first patterns to implement the new theming architecture in Vanilla. The default is light. But, to switch to a dark navigation, you can either:

- Override the value of the `$theme-default-nav` in `_settings_themes.scss` to `dark`
- Add a state class to the `p-navigation` class: `is-dark` when the default navigation is light, or `is-light` when the default has been changed to dark

You can change the breakpoint at which the menu changes to a small screen menu
by adjusting the `$breakpoint-navigation-threshold` variable from `_settings_breakpoints.scss`.

<div class="embedded-example"><a href="/docs/examples/patterns/navigation/default/" class="js-example">
View example of the navigation pattern
</a></div>

<div class="p-notification--information">
<p class="p-notification__content">
<span class="p-notification__title">New in Vanilla 4.7.0:</span>
<span class="p-notification__message">Starting with Vanilla 4.7.0 we recommend using new <code>p-navigation__row--25-75</code> in place of <code>p-navigation__row</code> on brochure websites to better align with the grid.</span>
</p>
</div>

## Dropdown

Drop-down menus can be added to the navigation by including one or more `p-navigation__item--dropdown-toggle` components.
Expand Down

0 comments on commit c0c356e

Please sign in to comment.