feat: further sidebar enhancements

- add nav-indent & nav-compact
- add text truncate to nav-link > p
- replace calculated width with correct auto sizing
pull/5194/head
REJack 1 year ago
parent 7179530af9
commit 914b1e77e8

@ -84,9 +84,19 @@
@include scrollbar-color-gray(); @include scrollbar-color-gray();
@include scrollbar-width-thin(); @include scrollbar-width-thin();
.nav-item {
max-width: 100%;
}
.nav-link { .nav-link {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
p {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
} }
.nav-icon { .nav-icon {
display: flex; display: flex;
@ -209,7 +219,6 @@
.nav-link { .nav-link {
position: relative; position: relative;
width: subtract(var(--#{$lte-prefix}sidebar-width), $lte-sidebar-padding-x * 2);
@include transition(width $lte-transition-fn $lte-transition-speed); @include transition(width $lte-transition-fn $lte-transition-speed);
@include border-radius($border-radius); @include border-radius($border-radius);
@ -230,6 +239,10 @@
display: none; display: none;
padding: 0; padding: 0;
list-style: none; list-style: none;
.nav-indent & {
padding-left: $lte-sidebar-padding-x;
}
} }
.menu-open { .menu-open {
@ -245,6 +258,43 @@
} }
} }
.nav-compact.nav-indent {
.nav-treeview {
padding-left: 0;
.nav-item {
padding-left: $lte-sidebar-padding-x;
}
}
}
.sidebar-mini.sidebar-collapse.nav-indent {
.app-sidebar:hover {
.nav-treeview {
padding-left: 0;
.nav-item {
padding-left: $lte-sidebar-padding-x;
}
}
}
}
.sidebar-collapse {
&.nav-compact.nav-indent {
.nav-treeview {
.nav-item {
padding-left: 0;
}
}
}
}
.nav-compact .nav-link {
@include border-radius(0);
margin-bottom: 0 !important;
}
// A fix for text overflow while transitioning from sidebar mini to full sidebar // A fix for text overflow while transitioning from sidebar mini to full sidebar
.sidebar-menu, .sidebar-menu,
.sidebar-menu > .nav-header, .sidebar-menu > .nav-header,
@ -352,12 +402,13 @@
} }
.sidebar-menu .nav-link { .sidebar-menu .nav-link {
width: subtract(var(--#{$lte-prefix}sidebar-width), $lte-sidebar-padding-x * 2); width: auto;
} }
.sidebar-menu .nav-link p, .sidebar-menu .nav-link p,
.brand-text, .brand-text,
.logo-xl { .logo-xl {
width: auto;
margin-left: 0; margin-left: 0;
visibility: visible; visibility: visible;
animation-name: fadeIn; animation-name: fadeIn;

@ -272,11 +272,11 @@ html.maximized-card {
--#{$prefix}btn-padding-y: .25rem; --#{$prefix}btn-padding-y: .25rem;
&:not(.btn-tool-custom) { &:not(.btn-tool-custom) {
--#{$prefix}btn-color: var(--#{$prefix}tertiary-color); --#{$prefix}btn-color: var(--#{$prefix}tertiary-color);
--#{$prefix}btn-bg: transparent; --#{$prefix}btn-bg: transparent;
--#{$prefix}btn-box-shadow: none; --#{$prefix}btn-box-shadow: none;
--#{$prefix}btn-hover-color: var(--#{$prefix}secondary-color); --#{$prefix}btn-hover-color: var(--#{$prefix}secondary-color);
--#{$prefix}btn-active-border-color: transparent; --#{$prefix}btn-active-border-color: transparent;
} }
margin: -$card-spacer-y 0; margin: -$card-spacer-y 0;

Loading…
Cancel
Save