Skip to content

Commit

Permalink
Merge pull request #6 from PanJiaChen/master
Browse files Browse the repository at this point in the history
perf[Navbar]: add scroll bar when the subMenu is too long (PanJiaChen#1619)
  • Loading branch information
chengdu0839 committed Feb 24, 2019
2 parents 5e16084 + 2e89ef4 commit 33dbd78
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/styles/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,27 @@
.nest-menu .el-submenu>.el-submenu__title,
.el-menu-item {
&:hover {
// You can use $subMenuHover
// you can use $subMenuHover
background-color: $menuHover !important;
}
}

// the scroll bar appears when the subMenu is too long
>.el-menu--popup {
max-height: 100vh;
overflow-y: auto;

&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}

&::-webkit-scrollbar {
width: 6px;
}

&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
}

0 comments on commit 33dbd78

Please sign in to comment.