Skip to content

Commit bcc8a24

Browse files
committed
Sidebar: Fix scroll height, remove chad comments
1 parent 4da9c2e commit bcc8a24

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

assets/css/v2/style.css

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,11 @@ nav {
459459
.sidebar-layout {
460460
display: flex;
461461
flex-direction: column;
462-
position: relative; /* required for absolute-positioned pseudo element */
462+
position: relative;
463463
z-index: 2;
464-
min-height: 100vh;
464+
min-height: 74vh;
465465
}
466466

467-
/* this is the complete, corrected CSS you can directly copy/paste clearly: */
468467
.sidebar-layout::before {
469468
content: "";
470469
position: absolute;
@@ -785,9 +784,9 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
785784
padding-top: 1.5rem;
786785
align-items: start;
787786
overflow-y: auto;
787+
overflow-x: hidden;
788788
color: var(--color-foreground);
789789

790-
/* Reset/Renormalize lists to remove default browser styling */
791790
.sidebar__container,
792791
.sidebar__container button,
793792
.sidebar__container ul,
@@ -1481,10 +1480,8 @@ a:has(code:not(pre code)) {
14811480
padding: 0.15rem 0.5rem;
14821481
font-size: 0.75rem;
14831482
z-index: 999;
1484-
/* position: absolute; */
14851483
background-color: white;
14861484
margin: 0 0 -1px 0;
1487-
/* box-shadow: 2px 2px 0px var(--color-shadow); */
14881485
}
14891486

14901487
.code-container {
@@ -1636,7 +1633,7 @@ hr {
16361633
background-repeat: no-repeat;
16371634
background-size: contain;
16381635
background-position: left center;
1639-
width: 200px; /* Adjust the width as needed to fit the logo */
1636+
width: 200px;
16401637

16411638
img {
16421639
display: none;

assets/js/sidebar-v2.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,3 @@ document.addEventListener('click', (e) => {
1616
}
1717
}
1818
});
19-
20-
document.addEventListener('DOMContentLoaded', () => {
21-
const sidebar = document.querySelector('.sidebar__ul');
22-
23-
if (!sidebar) return;
24-
25-
const activeLink = sidebar.querySelector('.sidebar__link--current');
26-
27-
if (activeLink) {
28-
activeLink.scrollIntoView({
29-
behavior: 'auto',
30-
block: 'center',
31-
inline: 'nearest',
32-
});
33-
}
34-
});

0 commit comments

Comments
 (0)