Skip to content

Commit

Permalink
fix: fix Dropdown Menu top level item properties foundation#11412
Browse files Browse the repository at this point in the history
Changes:
- Only apply top-level styles to top-level items. This increase specificity but this markup structure is alreaddy assumed elsewhere in the component.
- Remove the default `$white` background on top-level items: it was never applied before foundation#11377 and could now cause visual changes.

Closes foundation#11412
  • Loading branch information
ncoden committed Aug 2, 2018
1 parent 281681a commit 6a0e324
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scss/components/_dropdown-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ $dropdownmenu-min-width: 200px !default;

/// Background color for top level items.
/// @type Color
$dropdownmenu-background: $white !default;
$dropdownmenu-background: null !default;

/// Background color for dropdowns.
/// @type Color
$dropdownmenu-submenu-background: $dropdownmenu-background !default;
$dropdownmenu-submenu-background: $white !default;

/// Padding for top level items.
/// @type Number
Expand Down Expand Up @@ -148,12 +148,16 @@ $dropdown-menu-item-background-active: transparent !default;

a {
@include disable-mouse-outline;
}

// Top-level item
> li > a {
background: $dropdownmenu-background;
padding: $dropdownmenu-padding;
}

// Active state
.is-active > a {
// Top-level item active state
> li.is-active > a {
background: $dropdown-menu-item-background-active;
color: $dropdown-menu-item-color-active;
}
Expand Down

0 comments on commit 6a0e324

Please sign in to comment.