diff --git a/src/pydata_sphinx_theme/assets/styles/components/_navbar-links.scss b/src/pydata_sphinx_theme/assets/styles/components/_navbar-links.scss
index 91656f951..6504c51c9 100644
--- a/src/pydata_sphinx_theme/assets/styles/components/_navbar-links.scss
+++ b/src/pydata_sphinx_theme/assets/styles/components/_navbar-links.scss
@@ -26,32 +26,6 @@
@include link-style-text;
}
}
-
- /**
- * Togglable expand/collapse
- * This is only applicable to the primary sidebar which has these checkboxes
- */
- .toctree-checkbox {
- position: absolute;
- display: none;
- }
-
- .toctree-checkbox {
- ~ ul {
- display: none;
- }
- ~ label .fa-chevron-down {
- transform: rotate(0deg);
- }
- }
- .toctree-checkbox:checked {
- ~ ul {
- display: block;
- }
- ~ label .fa-chevron-down {
- transform: rotate(180deg);
- }
- }
}
// Don't display the `site navigation` in the header menu
diff --git a/src/pydata_sphinx_theme/assets/styles/components/_toc-inpage.scss b/src/pydata_sphinx_theme/assets/styles/components/_toc-inpage.scss
index 7abd37916..7bfc028c2 100644
--- a/src/pydata_sphinx_theme/assets/styles/components/_toc-inpage.scss
+++ b/src/pydata_sphinx_theme/assets/styles/components/_toc-inpage.scss
@@ -6,8 +6,7 @@ nav.page-toc {
margin-bottom: 1rem;
}
-.bd-toc .nav,
-.list-caption {
+.bd-toc .nav {
.nav {
display: none;
diff --git a/src/pydata_sphinx_theme/assets/styles/sections/_sidebar-primary.scss b/src/pydata_sphinx_theme/assets/styles/sections/_sidebar-primary.scss
index 6bae4e752..b461b451a 100644
--- a/src/pydata_sphinx_theme/assets/styles/sections/_sidebar-primary.scss
+++ b/src/pydata_sphinx_theme/assets/styles/sections/_sidebar-primary.scss
@@ -3,6 +3,7 @@
* e.g., between-pages navigation.
*/
+$sidebar-padding-right: 1rem;
.bd-sidebar-primary {
display: flex;
flex-direction: column;
@@ -13,7 +14,7 @@
@include make-col(3);
// Borders padding and whitespace
- padding: 2rem 1rem 1rem 1rem;
+ padding: 2rem $sidebar-padding-right 1rem 1rem;
border-right: 1px solid var(--pst-color-border);
background-color: var(--pst-color-background);
overflow-y: auto;
@@ -140,61 +141,107 @@
.list-caption {
list-style: none;
padding-left: 0px;
- }
- li {
- position: relative;
- // If it has children, add a bit more padding to wrap the content to avoid
- // overlapping with the