/// @type Color
$menu-item-background-hover: $light-gray !default;
+/// Backward compatibility for menu state. If true, this duplicate `active` with `is-active`.
+/// But please note that `active` will be removed in upcoming versions.
+/// @type Boolean
+$menu-state-back-compat: true !default;
+
/// Creates the base styles for a Menu.
@mixin menu-base {
padding: 0;
color: inherit;
}
+@mixin menu-state-active {
+ background: $menu-item-background-active;
+ color: $menu-item-color-active;
+}
+
@mixin foundation-menu {
.menu {
@include menu-base;
// Active state
.is-active > a {
- background: $menu-item-background-active;
- color: $menu-item-color-active;
+ @include menu-state-active;
+ }
+
+ // Backward Compatibility for active state
+ @if $menu-state-back-compat {
+ .active > a {
+ @include menu-state-active;
+ }
}
// Align left