From: harry Date: Fri, 27 Jan 2017 16:05:36 +0000 (+0530) Subject: Add menu-centered to flexbox mode. X-Git-Tag: 6.3.1~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9712%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Add menu-centered to flexbox mode. --- 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; + } } }