Skip to content

Commit 8580687

Browse files
authored
feat: Make Sidebar groups more distinct (#3909)
Co-authored-by: Ari Kornfeld <[email protected]>
1 parent cb03745 commit 8580687

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

webui/src/scss/_layout.scss

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@use 'variables' as *;
22
@use '@coreui/coreui/scss/coreui'; // not strictly necessary, but it allows us to clarify the origin of mixins
3+
@use 'sass:color';
34

45
body {
56
-webkit-text-size-adjust: 100%;
@@ -332,7 +333,7 @@ form.row > * {
332333
}
333334

334335
.nav-link {
335-
background-color: #191919;
336+
--cui-sidebar-nav-link-bg: #191919;
336337

337338
margin-bottom: 0.15rem;
338339
padding-top: 0.7rem;
@@ -383,21 +384,35 @@ form.row > * {
383384
padding: 0;
384385

385386
&::after {
387+
// affects the caret
386388
margin-left: 16px;
387389
margin-right: 16px;
390+
background-color: white;
388391
}
389392

390393
.nav-link {
391394
margin-bottom: 0;
392395
}
393396
}
397+
398+
$group-background-color: #2a2a2a;
394399
.nav-group-toggle-basic::after,
395-
.nav-group-items .nav-link {
396-
margin-right: 8px;
400+
.nav-group-items {
401+
// the box underneath the expanded group
402+
padding-left: 0.5em !important;
403+
padding-right: 0.1em !important;
404+
padding-top: 0px !important;
397405
}
398406

399407
.sidebar-nav .nav-group-items .nav-link {
408+
// the individual buttons in a group
400409
padding-left: var(--cui-sidebar-nav-link-padding-x);
410+
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.2);
411+
--cui-sidebar-nav-link-bg: #{$group-background-color};
412+
413+
&:hover {
414+
background-color: color.adjust($group-background-color, $lightness: -5%) !important;
415+
}
401416
}
402417

403418
.sidebar-header.sidebar-header-toggler {

0 commit comments

Comments
 (0)