1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/layout/sidebar-item.scss
Roman be8fd7ed45 - refactoring: usages of renderer/utils/createStorage
- refactoring: Sidebar, SidebarItem and MainLayout
- ux-fix: expanding sidebar by clicking to the arrow-icon (for consistency with compact mode where no sub-menus)

Signed-off-by: Roman <ixrock@gmail.com>
2021-03-04 19:00:19 +02:00

70 lines
1.3 KiB
SCSS

.SidebarItem {
$itemSpacing: floor($unit / 2.6) floor($unit / 1.6);
display: flex;
flex-direction: column;
flex-shrink: 0;
width: 100%;
user-select: none;
.nav-item {
padding: $itemSpacing;
border: none;
cursor: pointer;
a {
overflow: hidden;
text-overflow: ellipsis;
text-decoration: none;
vertical-align: middle;
flex-grow: 1;
min-width: 100px;
}
&.active, &:hover {
background: $lensBlue;
color: $sidebarActiveColor;
}
.expand-icon {
--size: 20px;
}
}
.sub-menu {
border-left: 4px solid transparent;
&:empty, .compact & {
display: none;
}
&.active {
border-left-color: $lensBlue;
}
a, .SidebarItem {
display: block;
border: none;
text-decoration: none;
color: $textColorPrimary;
font-weight: normal;
padding-left: 40px; // parent icon width
overflow: hidden;
text-overflow: ellipsis;
line-height: 0px; // hidden by default
height: 0px;
opacity: 0;
transition: 125ms line-height ease-out, 200ms 100ms opacity;
&.visible {
line-height: 28px;
height: auto;
opacity: 1;
}
&.active, &:hover {
color: $sidebarSubmenuActiveColor;
}
}
}
}