2022-06-28 22:49:01 -04:00
|
|
|
:root {
|
2022-07-19 22:56:41 -04:00
|
|
|
--d-sidebar-width: #{$d-sidebar-width};
|
2022-07-06 13:31:06 -04:00
|
|
|
--d-sidebar-animation-time: 0.25s;
|
|
|
|
--d-sidebar-animation-ease: ease-in-out;
|
2022-06-28 22:49:01 -04:00
|
|
|
}
|
|
|
|
|
2022-08-18 03:03:28 -04:00
|
|
|
.sidebar-wrapper {
|
|
|
|
--d-sidebar-highlight-color: var(--primary-low);
|
2022-08-23 21:33:15 -04:00
|
|
|
// 1.25rem gets text left-aligned with the hamburger icon
|
|
|
|
--d-sidebar-row-horizontal-padding: 1.25rem;
|
2022-07-26 23:16:34 -04:00
|
|
|
|
2022-08-18 03:03:28 -04:00
|
|
|
grid-area: sidebar;
|
|
|
|
position: sticky;
|
|
|
|
top: var(--header-offset);
|
2022-08-23 21:33:15 -04:00
|
|
|
|
2022-08-18 03:03:28 -04:00
|
|
|
.footer-nav-ipad & {
|
|
|
|
top: calc(var(--header-offset) + var(--footer-nav-height));
|
|
|
|
}
|
|
|
|
height: calc(100vh - var(--header-offset));
|
|
|
|
align-self: start;
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
|
|
.sidebar-row {
|
2022-08-23 21:33:15 -04:00
|
|
|
padding: 0.33rem var(--d-sidebar-row-horizontal-padding);
|
2022-08-18 03:03:28 -04:00
|
|
|
align-items: center;
|
|
|
|
font-size: var(--font-down-1);
|
2022-05-05 02:35:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-container {
|
2022-07-22 01:06:47 -04:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2022-05-05 02:35:08 -04:00
|
|
|
box-sizing: border-box;
|
|
|
|
height: 100%;
|
2022-08-23 21:33:15 -04:00
|
|
|
padding: 0;
|
2022-06-30 16:14:29 -04:00
|
|
|
overflow-x: hidden;
|
2022-08-18 22:51:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-scroll-wrap {
|
|
|
|
box-sizing: border-box;
|
|
|
|
flex: 1;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: overlay;
|
2022-06-30 16:14:29 -04:00
|
|
|
|
|
|
|
// custom scrollbar styling
|
|
|
|
--scrollbarBg: transparent;
|
|
|
|
--scrollbarThumbBg: var(--primary-low);
|
2022-08-23 21:33:15 -04:00
|
|
|
--scrollbarWidth: 1em;
|
2022-06-30 16:14:29 -04:00
|
|
|
|
|
|
|
scrollbar-color: transparent var(--scrollbarBg);
|
2022-07-11 12:58:48 -04:00
|
|
|
transition: scrollbar-color 0.25s ease-in-out;
|
|
|
|
transition-delay: 0.5s;
|
|
|
|
|
2022-06-30 16:14:29 -04:00
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
|
background-color: transparent;
|
|
|
|
border-radius: calc(var(--scrollbarWidth) / 2);
|
2022-08-23 21:33:15 -04:00
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-track {
|
|
|
|
background-color: transparent;
|
2022-06-30 16:14:29 -04:00
|
|
|
}
|
2022-08-18 03:03:28 -04:00
|
|
|
|
2022-06-30 16:14:29 -04:00
|
|
|
&:hover {
|
|
|
|
scrollbar-color: var(--scrollbarThumbBg) var(--scrollbarBg);
|
2022-08-18 22:51:55 -04:00
|
|
|
|
2022-06-30 16:14:29 -04:00
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
|
background-color: var(--scrollbarThumbBg);
|
|
|
|
}
|
2022-08-18 22:51:55 -04:00
|
|
|
|
2022-07-11 12:58:48 -04:00
|
|
|
transition-delay: 0s;
|
2022-06-30 16:14:29 -04:00
|
|
|
}
|
2022-08-18 03:03:28 -04:00
|
|
|
|
2022-06-30 16:14:29 -04:00
|
|
|
&::-webkit-scrollbar {
|
2022-08-23 21:33:15 -04:00
|
|
|
// 0.5em gives webkit browsers a little space between the scrollbar and the content
|
|
|
|
width: calc(var(--scrollbarWidth) - 0.45em);
|
2022-06-30 16:14:29 -04:00
|
|
|
}
|
2022-07-31 23:02:11 -04:00
|
|
|
|
2022-08-23 21:33:15 -04:00
|
|
|
// allows sidebar to scroll to the bottom when the composer is open
|
|
|
|
margin-bottom: var(--composer-height);
|
|
|
|
padding-bottom: var(--composer-ipad-padding);
|
2022-05-05 02:35:08 -04:00
|
|
|
}
|
|
|
|
|
2022-07-22 01:06:47 -04:00
|
|
|
.sidebar-sections {
|
2022-08-23 21:33:15 -04:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
box-sizing: border-box;
|
2022-07-22 01:06:47 -04:00
|
|
|
flex: 1;
|
2022-08-23 21:33:15 -04:00
|
|
|
padding: 1em 0 0;
|
|
|
|
max-width: calc(var(--d-sidebar-width) - var(--scrollbarWidth));
|
|
|
|
background-color: var(--primary-very-low);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-hamburger-dropdown {
|
|
|
|
// note that these apply to mobile and desktop dropdowns
|
|
|
|
.sidebar-section-wrapper {
|
|
|
|
.sidebar-section-header-wrapper.sidebar-row {
|
|
|
|
padding-right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-section-header {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.discourse-no-touch & {
|
|
|
|
.sidebar-section-wrapper .sidebar-section-header-wrapper:hover,
|
|
|
|
.sidebar-section-wrapper .sidebar-section-header-wrapper:focus-within {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-footer-wrapper {
|
|
|
|
margin-top: 1em;
|
|
|
|
.sidebar-footer-container {
|
|
|
|
background: var(--secondary);
|
|
|
|
&:before {
|
|
|
|
background: linear-gradient(
|
|
|
|
to bottom,
|
|
|
|
transparent,
|
|
|
|
rgba(var(--secondary-rgb), 1)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2022-05-05 02:35:08 -04:00
|
|
|
}
|
2022-07-18 00:03:37 -04:00
|
|
|
}
|