UX: sidebar transition and styling adjustments (#17678)

This commit is contained in:
Kris 2022-07-26 23:16:34 -04:00 committed by GitHub
parent 10f200a5d3
commit 126266863d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 36 deletions

View File

@ -17,12 +17,7 @@
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: 100%; height: 100%;
@media (prefers-reduced-motion: no-preference) {
.sidebar-animate & {
transition: padding-left var(--d-sidebar-animation-time)
var(--d-sidebar-animation-ease) !important; // only works with an important... :/
}
}
.contents { .contents {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -572,6 +572,7 @@ div.menu-links-header {
// Sidebar-hamburger hybrid // Sidebar-hamburger hybrid
.hamburger-menu.revamped { .hamburger-menu.revamped {
--d-sidebar-highlight-color: var(--highlight-medium);
width: var(--d-sidebar-width); width: var(--d-sidebar-width);
.panel-body-content { .panel-body-content {
@ -589,19 +590,9 @@ div.menu-links-header {
color: var(--primary-high); color: var(--primary-high);
background: var(--tertiary-low); background: var(--tertiary-low);
} }
.sidebar-section-header-link,
.sidebar-section-header-button,
.sidebar-section-link {
&:hover {
background: var(--highlight-medium);
}
}
} }
.sidebar-footer-actions-button.btn { .sidebar-footer-wrapper {
&:hover { padding: 0.5em 0 0;
background: var(--highlight-medium);
}
} }
} }

View File

@ -1,8 +1,8 @@
.sidebar-wrapper { .sidebar-wrapper {
.sidebar-footer-wrapper { .sidebar-footer-wrapper {
.sidebar-footer-container { .sidebar-footer-container {
margin-left: 1.5em;
margin-right: 0.15em; margin-right: 0.15em;
margin-left: 1em;
} }
} }
} }
@ -13,21 +13,26 @@
.sidebar-footer-container { .sidebar-footer-container {
display: flex; display: flex;
align-items: stretch;
} }
.sidebar-footer-link { .sidebar-footer-link {
display: inline-block; display: inline-flex;
align-items: center;
height: 100%;
font-size: var(--font-down-1); font-size: var(--font-down-1);
color: var(--primary-high); color: var(--primary-high);
padding: 0.25em 0; padding: 0 0.5em;
height: 100%; &:hover,
&:focus {
&:not(:first-child):before { background: var(--d-sidebar-highlight-color);
content: "";
padding: 0 0.25em;
} }
} }
.sidebar-footer-links-separator {
color: var(--primary-low-mid);
}
.sidebar-footer-actions { .sidebar-footer-actions {
margin-left: auto; margin-left: auto;
} }
@ -41,9 +46,9 @@
font-size: var(--font-down-1); font-size: var(--font-down-1);
color: var(--primary-medium); color: var(--primary-medium);
} }
&:focus,
&:hover { &:hover {
background: var(--primary-low); background: var(--d-sidebar-highlight-color);
} }
} }
} }

View File

@ -12,8 +12,9 @@
font-size: var(--font-down-1); font-size: var(--font-down-1);
transition: background-color 0.25s; transition: background-color 0.25s;
&:focus,
&:hover { &:hover {
background: var(--primary-low); background: var(--d-sidebar-highlight-color);
} }
&.active { &.active {

View File

@ -11,8 +11,9 @@
.select-kit { .select-kit {
.btn { .btn {
background: transparent; background: transparent;
&:focus,
&:hover { &:hover {
background: var(--primary-low); background: var(--d-sidebar-highlight-color);
} }
} }
.d-icon { .d-icon {
@ -39,9 +40,9 @@
&:visited { &:visited {
color: var(--primary); color: var(--primary);
} }
&:focus,
&:hover { &:hover {
background: var(--primary-low); background: var(--d-sidebar-highlight-color);
} }
} }
@ -55,8 +56,9 @@
color: var(--primary-medium); color: var(--primary-medium);
} }
&:focus,
&:hover { &:hover {
background: var(--primary-low); background: var(--d-sidebar-highlight-color);
} }
} }
.select-kit-collection { .select-kit-collection {

View File

@ -6,6 +6,8 @@
#main-outlet-wrapper { #main-outlet-wrapper {
.sidebar-wrapper { .sidebar-wrapper {
--d-sidebar-highlight-color: var(--primary-low);
grid-area: sidebar; grid-area: sidebar;
position: sticky; position: sticky;
top: var(--header-offset); top: var(--header-offset);

View File

@ -192,9 +192,7 @@ body.has-sidebar-page {
// increase page max-width to accommodate sidebar width // increase page max-width to accommodate sidebar width
max-width: calc(var(--d-sidebar-width) + var(--d-max-width)); max-width: calc(var(--d-sidebar-width) + var(--d-max-width));
} }
.d-header .wrap {
padding-left: 1.85em;
}
#main-outlet-wrapper { #main-outlet-wrapper {
grid-template-columns: var(--d-sidebar-width) minmax(0, 1fr); grid-template-columns: var(--d-sidebar-width) minmax(0, 1fr);
gap: 0 2em; gap: 0 2em;