Skip to content

Commit

Permalink
fix(menu): menu items should be flex column not row
Browse files Browse the repository at this point in the history
  • Loading branch information
joneff committed Jan 3, 2022
1 parent c5c628f commit ce981fc
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions packages/default/scss/menu/_layout.scss
Expand Up @@ -21,10 +21,12 @@

// Menu item
.k-menu-item {
box-sizing: border-box;
border-width: 0;
outline: 0;
display: flex;
flex: 0 0 auto;
flex-flow: column nowrap;
flex: none;
position: relative;
user-select: none;
}
Expand All @@ -36,7 +38,7 @@
outline: 0;
color: inherit;
display: flex;
flex-direction: row;
flex-flow: row nowrap;
flex: 1 1 auto;
align-items: center;
position: relative;
Expand All @@ -51,6 +53,14 @@
}


// Menu item text
.k-menu-link-text {
flex: 1 1 auto;
overflow: hidden;
text-overflow: ellipsis;
}


// Expand arrow
.k-menu-expand-arrow {
margin-left: $icon-spacing;
Expand Down Expand Up @@ -101,6 +111,14 @@
> .k-menu-item > .k-menu-link {
padding: $menu-popup-item-padding-y $menu-popup-item-padding-x;
padding-right: $menu-popup-item-padding-end;

.k-menu-expand-arrow {
margin: 0;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: $icon-spacing;
}
}

> .k-separator {
Expand Down Expand Up @@ -153,6 +171,14 @@
.k-menu-link {
padding: $menu-popup-item-padding-y $menu-popup-item-padding-x;
padding-right: $menu-popup-item-padding-end;

.k-menu-expand-arrow {
margin: 0;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: $icon-spacing;
}
}

.k-separator {
Expand Down Expand Up @@ -282,6 +308,11 @@
> .k-menu-item > .k-menu-link {
padding-right: $menu-popup-item-padding-x;
padding-left: $menu-popup-item-padding-end;

.k-menu-expand-arrow {
right: auto;
left: $icon-spacing;
}
}
}

Expand All @@ -292,6 +323,11 @@
.k-menu-link {
padding-right: $menu-popup-item-padding-x;
padding-left: $menu-popup-item-padding-end;

.k-menu-expand-arrow {
right: auto;
left: $icon-spacing;
}
}

}
Expand Down

0 comments on commit ce981fc

Please sign in to comment.