mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 10:18:48 +08:00
UX: two column dropdown sidebar layout (#21288)
This commit is contained in:
@ -711,6 +711,8 @@ body.footer-nav-ipad {
|
|||||||
.menu-panel.slide-in {
|
.menu-panel.slide-in {
|
||||||
top: var(--header-top);
|
top: var(--header-top);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
// ensure there's always space to click outside on tiny devices
|
||||||
|
max-width: 90vw;
|
||||||
|
|
||||||
--100dvh: 100%;
|
--100dvh: 100%;
|
||||||
@supports (height: 100dvh) {
|
@supports (height: 100dvh) {
|
||||||
|
@ -115,29 +115,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-hamburger-dropdown {
|
|
||||||
.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)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-section-form-modal {
|
.sidebar-section-form-modal {
|
||||||
.modal-inner-container {
|
.modal-inner-container {
|
||||||
width: var(--modal-max-width);
|
width: var(--modal-max-width);
|
||||||
|
@ -37,6 +37,35 @@
|
|||||||
.sidebar-section-header-wrapper .select-kit .btn:hover {
|
.sidebar-section-header-wrapper .select-kit .btn:hover {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.sidebar-section {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
.sidebar-section-header-wrapper {
|
||||||
|
margin: 0 0 var(--d-sidebar-row-vertical-padding);
|
||||||
|
border-bottom: 1px solid var(--primary-low);
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
li {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-section-wrapper .sidebar-section-header-caret {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-section-header-collapsable {
|
||||||
|
pointer-events: none; // disabling collapsible sections
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-custom-sections .d-icon-globe {
|
||||||
|
left: -0.9em;
|
||||||
|
top: 0.35em;
|
||||||
|
font-size: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-section-link-wrapper
|
.sidebar-section-link-wrapper
|
||||||
@ -47,11 +76,28 @@
|
|||||||
|
|
||||||
.sidebar-footer-wrapper {
|
.sidebar-footer-wrapper {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
margin-top: 1em;
|
||||||
.sidebar-footer-container {
|
.sidebar-footer-container {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
background: var(--secondary);
|
||||||
&:before {
|
&:before {
|
||||||
top: calc(-100% + 2px);
|
top: -1.5em;
|
||||||
|
background: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
transparent,
|
||||||
|
rgba(var(--secondary-rgb), 1)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar-hamburger-dropdown {
|
||||||
|
.discourse-no-touch & {
|
||||||
|
.sidebar-section-wrapper .sidebar-section-header-wrapper:hover,
|
||||||
|
.sidebar-section-wrapper .sidebar-section-header-wrapper:focus-within {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user