Skip to content

Commit

Permalink
fix(Nav): disorder when set margin(t, b) of hoz Nav, close #744
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed Jun 5, 2019
1 parent a8c373a commit f6f9625
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/nav/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $nav-icononly-width: $s-15;
}

&.#{$css-prefix}hoz {
height: $nav-hoz-height;
height: $nav-hoz-height + 2 * $nav-hoz-item-margin-tb;

@include nav-size(
'hoz',
Expand Down
22 changes: 15 additions & 7 deletions src/nav/scss/mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@
border-radius: $itemCorner;
}

#{$menu-prefix}-item:not(:first-child),
#{$menu-prefix}-sub-menu-wrapper:not(:first-child) > #{$menu-prefix}-item {
margin-top: $marginTB;
}
@if $direction == 'ver' {
#{$menu-prefix}-item:not(:first-child),
#{$menu-prefix}-sub-menu-wrapper:not(:first-child) > #{$menu-prefix}-item {
margin-top: $marginTB;
}

#{$menu-prefix}-item:not(:last-child),
#{$menu-prefix}-sub-menu-wrapper:not(:last-child) > #{$menu-prefix}-item {
margin-bottom: $marginTB;
#{$menu-prefix}-item:not(:last-child),
#{$menu-prefix}-sub-menu-wrapper:not(:last-child) > #{$menu-prefix}-item {
margin-bottom: $marginTB;
}
} @else {
#{$menu-prefix}-item,
#{$menu-prefix}-sub-menu-wrapper > #{$menu-prefix}-item {
margin-top: $marginTB;
margin-bottom: $marginTB;
}
}

#{$menu-prefix}-item-inner {
Expand Down

0 comments on commit f6f9625

Please sign in to comment.