mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 03:33:58 -06:00
UX: Adjust scrollbar behaviour in sidebar
Vertical sidebar is only restricted to sidebar sections and not the footer.
This commit is contained in:
parent
1e1cf1e821
commit
a3565914a4
@ -2,10 +2,10 @@
|
|||||||
<div class="sidebar-scroll-wrap">
|
<div class="sidebar-scroll-wrap">
|
||||||
{{#if this.currentUser}}
|
{{#if this.currentUser}}
|
||||||
<Sidebar::Sections @collapsableSections={{true}}/>
|
<Sidebar::Sections @collapsableSections={{true}}/>
|
||||||
<Sidebar::Footer />
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<Sidebar::AnonymousSections />
|
<Sidebar::AnonymousSections />
|
||||||
<Sidebar::Footer />
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Sidebar::Footer />
|
||||||
</DSection>
|
</DSection>
|
||||||
|
@ -34,7 +34,15 @@
|
|||||||
width: var(--d-sidebar-width);
|
width: var(--d-sidebar-width);
|
||||||
padding: 1em 0 0;
|
padding: 1em 0 0;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
}
|
||||||
|
|
||||||
|
.sidebar-scroll-wrap {
|
||||||
|
box-sizing: border-box;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: overlay;
|
||||||
|
|
||||||
// custom scrollbar styling
|
// custom scrollbar styling
|
||||||
--scrollbarBg: transparent;
|
--scrollbarBg: transparent;
|
||||||
@ -48,29 +56,23 @@
|
|||||||
&::-webkit-scrollbar-thumb {
|
&::-webkit-scrollbar-thumb {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-radius: calc(var(--scrollbarWidth) / 2);
|
border-radius: calc(var(--scrollbarWidth) / 2);
|
||||||
border: calc(var(--scrollbarWidth) / 4) solid var(--primary-very-low);
|
border: calc(var(--scrollbarWidth) / 4) solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
scrollbar-color: var(--scrollbarThumbBg) var(--scrollbarBg);
|
scrollbar-color: var(--scrollbarThumbBg) var(--scrollbarBg);
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb {
|
&::-webkit-scrollbar-thumb {
|
||||||
background-color: var(--scrollbarThumbBg);
|
background-color: var(--scrollbarThumbBg);
|
||||||
|
border-color: var(--primary-very-low);
|
||||||
}
|
}
|
||||||
|
|
||||||
transition-delay: 0s;
|
transition-delay: 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: var(--scrollbarWidth);
|
width: var(--scrollbarWidth);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-scroll-wrap {
|
|
||||||
// limit the wrapper width, so when the scrollbar is added the content doesn't shift
|
|
||||||
max-width: calc(var(--d-sidebar-width));
|
|
||||||
box-sizing: border-box;
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
.composer-open & {
|
.composer-open & {
|
||||||
// allows sidebar to scroll to the bottom when the composer is open
|
// allows sidebar to scroll to the bottom when the composer is open
|
||||||
|
Loading…
Reference in New Issue
Block a user