Skip to content

Commit b043d96

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

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

assets/css/v2/style.css

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,10 @@ 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;
465464
}
466465

467-
/* this is the complete, corrected CSS you can directly copy/paste clearly: */
468466
.sidebar-layout::before {
469467
content: "";
470468
position: absolute;
@@ -787,7 +785,6 @@ button:has(~ .product-selector[style*="none"]) > .product-selector-button-icon {
787785
overflow-y: auto;
788786
color: var(--color-foreground);
789787

790-
/* Reset/Renormalize lists to remove default browser styling */
791788
.sidebar__container,
792789
.sidebar__container button,
793790
.sidebar__container ul,
@@ -1481,10 +1478,8 @@ a:has(code:not(pre code)) {
14811478
padding: 0.15rem 0.5rem;
14821479
font-size: 0.75rem;
14831480
z-index: 999;
1484-
/* position: absolute; */
14851481
background-color: white;
14861482
margin: 0 0 -1px 0;
1487-
/* box-shadow: 2px 2px 0px var(--color-shadow); */
14881483
}
14891484

14901485
.code-container {
@@ -1636,7 +1631,7 @@ hr {
16361631
background-repeat: no-repeat;
16371632
background-size: contain;
16381633
background-position: left center;
1639-
width: 200px; /* Adjust the width as needed to fit the logo */
1634+
width: 200px;
16401635

16411636
img {
16421637
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)