Skip to content

Commit

Permalink
fix(dropdown): nested dropdown positioning
Browse files Browse the repository at this point in the history
When the dropdown is used as simple dropdown without JavaScript,
it doesn't support more than two nested level of sub menus. It
always exposes only two levels of sub menus.

And despite the sub menu declares the value 'left' for the class
name, it always apear rightward. It should respect the value
'left' from the class name and should be appeared leftward.

When the dropdown menu is invoked with JavaScript, the last dropdown
in the right menu doesn't behave properly and the sub menu inside
the dropdown are overlapping each others. They should appear in the
correct location like other dropdown menus.
  • Loading branch information
ko2in authored May 26, 2020
1 parent defb29e commit 8621c99
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/definitions/modules/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,9 @@
}

/* Automatically float dropdown menu right on last menu item */
.ui.menu .right.menu .dropdown:last-child .menu,
.ui.menu .right.dropdown.item .menu,
.ui.buttons > .ui.dropdown:last-child .menu {
left: auto;
.ui.menu .right.menu .dropdown:last-child .menu:not(.left),
.ui.menu .right.dropdown.item .menu:not(.left),
.ui.buttons > .ui.dropdown:last-child .menu:not(.left) {
right: 0;
}

Expand Down Expand Up @@ -1097,7 +1096,7 @@ select.ui.dropdown {

.ui.dropdown > .left.menu .menu,
.ui.dropdown .menu .left.menu {
left: auto;
left: auto !important;
right: 100%;
margin: @leftSubMenuMargin !important;
border-radius: @leftSubMenuBorderRadius !important;
Expand Down Expand Up @@ -1318,12 +1317,12 @@ select.ui.dropdown {
opacity: 1;
}
.ui.simple.dropdown > .menu > .item:active > .menu,
.ui.simple.dropdown:hover > .menu > .item:hover > .menu {
.ui.simple.dropdown .menu .item:hover > .menu {
overflow: visible;
width: auto;
height: auto;
top: 0 !important;
left: 100% !important;
left: 100%;
opacity: 1;
}
& when (@variationDropdownDisabled) {
Expand Down

0 comments on commit 8621c99

Please sign in to comment.