picking text color by contrast instead of hardcoded white for easier color scheme customisation
/// @type Color
$menu-item-color-active: $white !default;
+/// Alternative text color of an active menu item..
+/// @type Color
+$menu-item-color-alt-active: $black !default;
+
/// Background color of an active menu item.
/// @type Color
$menu-item-background-active: get-color(primary) !default;
@mixin menu-state-active {
background: $menu-item-background-active;
- color: $menu-item-color-active;
+ color: color-pick-contrast($menu-item-background-active, ($menu-item-color-active, $menu-item-color-alt-active));
}
@mixin foundation-menu {
$menu-items-padding: $global-menu-padding;
$menu-simple-margin: 1rem;
$menu-item-color-active: $white;
+$menu-item-color-alt-active: $black;
$menu-item-background-active: get-color(primary);
$menu-icon-spacing: 0.25rem;
$menu-item-background-hover: $light-gray;