From db4e636985e70fce4e517f0368a68e63663c4e0a Mon Sep 17 00:00:00 2001 From: harry Date: Fri, 27 Jan 2017 21:35:36 +0530 Subject: [PATCH] Add menu-centered to flexbox mode. --- docs/pages/menu.md | 2 +- scss/components/_menu.scss | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/pages/menu.md b/docs/pages/menu.md index cbe0748f4..1fa5f515b 100644 --- a/docs/pages/menu.md +++ b/docs/pages/menu.md @@ -52,7 +52,7 @@ By default, each item in the menu aligns to the left. They can also be aligned t To align items in the middle, add a wrapping element with the class `.menu-centered`.
-

If you're using Flexbox mode, you don't need the wrapper class. Instead, you can just add the class .align-center to the menu.

+

If you're using Flexbox mode, you have the option of either using .align-center to the menu like this codepen or instead you can use the default wrapper class below.

```html_example diff --git a/scss/components/_menu.scss b/scss/components/_menu.scss index 13cb2c501..b13e2d599 100644 --- a/scss/components/_menu.scss +++ b/scss/components/_menu.scss @@ -359,8 +359,13 @@ $menu-border: $light-gray !default; text-align: center; > .menu { - display: inline-block; - vertical-align: top; + @if $global-flexbox { + @include flex-align($x: center, $y: top); + } + @else { + display: inline-block; + vertical-align: top; + } } } -- 2.47.2