:root { --d-sidebar-width: #{$d-sidebar-width}; --d-sidebar-animation-time: 0.25s; --d-sidebar-animation-ease: ease-in-out; } .sidebar-wrapper { --d-sidebar-highlight-color: var(--primary-low); // 1.25rem gets text left-aligned with the hamburger icon --d-sidebar-row-horizontal-padding: 1.25rem; grid-area: sidebar; position: sticky; top: var(--header-offset); .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 { padding: 0.33rem var(--d-sidebar-row-horizontal-padding); align-items: center; font-size: var(--font-down-1); } .sidebar-container { display: flex; flex-direction: column; box-sizing: border-box; height: 100%; padding: 0; overflow-x: hidden; } .sidebar-scroll-wrap { box-sizing: border-box; flex: 1; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: overlay; // custom scrollbar styling --scrollbarBg: transparent; --scrollbarThumbBg: var(--primary-low); --scrollbarWidth: 1em; scrollbar-color: transparent var(--scrollbarBg); transition: scrollbar-color 0.25s ease-in-out; transition-delay: 0.5s; &::-webkit-scrollbar-thumb { background-color: transparent; border-radius: calc(var(--scrollbarWidth) / 2); background-color: transparent; } &::-webkit-scrollbar-track { background-color: transparent; } &:hover { scrollbar-color: var(--scrollbarThumbBg) var(--scrollbarBg); &::-webkit-scrollbar-thumb { background-color: var(--scrollbarThumbBg); } transition-delay: 0s; } &::-webkit-scrollbar { // 0.5em gives webkit browsers a little space between the scrollbar and the content width: calc(var(--scrollbarWidth) - 0.45em); } // allows sidebar to scroll to the bottom when the composer is open margin-bottom: var(--composer-height); padding-bottom: var(--composer-ipad-padding); } .sidebar-sections { display: flex; flex-direction: column; box-sizing: border-box; flex: 1; 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) ); } } } }