Skip to content

Commit

Permalink
Merge pull request #7514 from brettsmason/patch-1
Browse files Browse the repository at this point in the history
Dropdown menu alignment if border is used
  • Loading branch information
Brandon Arnold committed Dec 18, 2015
2 parents 857a820 + adaf2d1 commit dd0be69
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scss/components/_dropdown-menu.scss
Expand Up @@ -22,10 +22,15 @@ $dropdownmenu-min-width: 200px !default;
/// @type Color
$dropdownmenu-background: $white !default;

/// Border for dropdown panes.
/// Border for dropdown sub-menus.
/// @type List
$dropdownmenu-border: 1px solid $medium-gray !default;

// Border width for dropdown sub-menus.
// Used to adjust top margin of a sub-menu if a border is used.
// @type Length
$dropdownmenu-border-width: nth($dropdownmenu-border, 1);

@mixin foundation-dropdown-menu {
.dropdown.menu {
a {
Expand Down Expand Up @@ -89,6 +94,10 @@ $dropdownmenu-border: 1px solid $medium-gray !default;
background: $dropdownmenu-background;
border: $dropdownmenu-border;

@if (type_of($dropdownmenu-border-width) == 'number') {
margin-top: (-$dropdownmenu-border-width);
}

> li {
width: 100%;
}
Expand Down

0 comments on commit dd0be69

Please sign in to comment.