}
/// Creates a simple Menu, which has no padding or hover state.
-@mixin menu-simple {
+/// @param {Keyword} $dir [$global-left] - Direction of the menu. Set to `null` to do not generate styles for direction.
+@mixin menu-simple($dir: $global-left) {
li {
display: inline-block;
- margin-#{$global-right}: get-side($menu-item-padding, $global-right);
line-height: 1;
}
a {
padding: 0;
}
+
+ @if $dir != null {
+ @include menu-simple-direction($dir);
+ }
+}
+
+/// Direction modifier for a simple Menu
+/// @param {Keyword} $dir [$global-left] - Direction of the menu
+@mixin menu-simple-direction($dir: $global-left) {
+ $no-margin-dir: $dir;
+ $margin-dir: direction-opposite($dir);
+
+ li {
+ margin-#{$no-margin-dir}: 0;
+ margin-#{$margin-dir}: get-side($menu-item-padding, $margin-dir);
+ }
}
/// Adds styles for a nested Menu, by adding `margin-left` to the menu.