diff --git a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.html b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.html index 4ffb690651..d47032c0fb 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.html +++ b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.html @@ -1,10 +1,19 @@ diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.html b/src/app/admin/admin-sidebar/admin-sidebar.component.html index d3d8031994..95f9932834 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.html +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.html @@ -9,19 +9,20 @@ role="navigation" [attr.aria-label]="'menu.header.admin.description' |translate"> diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.scss b/src/app/admin/admin-sidebar/admin-sidebar.component.scss index e6eb4a7037..59ee61c323 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.scss +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.scss @@ -25,6 +25,11 @@ .navbar-nav { .admin-menu-header { background-color: var(--ds-admin-sidebar-header-bg); + + .sidebar-section { + background-color: inherit; + } + .logo-wrapper { img { height: 20px; @@ -34,6 +39,10 @@ line-height: 1.5; } + .navbar-brand { + margin-right: 0; + } + } } @@ -44,26 +53,67 @@ display: flex; align-content: stretch; background-color: var(--ds-admin-sidebar-bg); + overflow-x: visible; + .nav-item { padding-top: var(--bs-spacer); padding-bottom: var(--bs-spacer); + background-color: inherit; + + &:focus-visible { + // since links fill the whole sidebar, we _inset_ the outline + outline-offset: -4px; + + // replace padding with margins so it doesn't extend over the :focus-visible outline + // → can't remove the padding altogether; the icon needs to fill out + // the collapsed width of the sidebar for the slide animation to look decent. + .shortcut-icon { + padding-left: 0; + padding-right: 0; + margin-left: var(--ds-icon-padding); + margin-right: var(--ds-icon-padding); + } + .logo-wrapper { + margin-right: var(--bs-navbar-padding-x) !important; + } + .navbar-brand { + padding-top: 0; + padding-bottom: 0; + margin-top: var(--bs-navbar-brand-padding-y); + margin-bottom: var(--bs-navbar-brand-padding-y); + } + } } + .shortcut-icon { + background-color: inherit; padding-left: var(--ds-icon-padding); padding-right: var(--ds-icon-padding); - } - .shortcut-icon, .icon-wrapper { - background-color: inherit; z-index: var(--ds-icon-z-index); + align-self: baseline; } + .sidebar-collapsible { + padding-left: 0; + padding-right: var(--bs-spacer); width: var(--ds-sidebar-items-width); position: relative; - a { - padding-right: var(--bs-spacer); - width: 100%; + .toggle { + width: 100%; + } + + ul { + padding-top: var(--bs-spacer); + + // move nested elements over to the left and pad so their :focus-visible outline + // doesn't get cut off by the parent section's icon + margin-left: calc(-1 * var(--bs-spacer)); + li a { + padding-left: var(--bs-spacer); + } } } + &.active > .sidebar-collapsible > .nav-link { color: var(--bs-navbar-dark-active-color); } diff --git a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.html b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.html index 304220d3c4..a94df21bf7 100644 --- a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.html +++ b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.html @@ -2,26 +2,32 @@ [@bgColor]="{ value: ((expanded | async) ? 'endBackground' : 'startBackground'), params: {endColor: (sidebarActiveBg | async)}}"> -
- - - + +
+
+
diff --git a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.scss b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.scss index 8670cf19aa..802fade8c1 100644 --- a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.scss +++ b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.scss @@ -9,7 +9,7 @@ list-style: disc; color: var(--bs-navbar-dark-color); overflow: hidden; - + margin-bottom: calc(-1 * var(--bs-spacer)); // the bottom-most nav-item is padded, no need for double spacing } .sidebar-collapsible {