From fb97e740c9fe027a4dee4865d576568a4c6c9b35 Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Thu, 6 Apr 2023 11:06:42 -0400 Subject: [PATCH 1/4] fix(styles): add sidebar indentation for nested sections --- src/styles/components/_doc-sidebar.scss | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/styles/components/_doc-sidebar.scss b/src/styles/components/_doc-sidebar.scss index 1d36474e088..4e89ff0bdc7 100644 --- a/src/styles/components/_doc-sidebar.scss +++ b/src/styles/components/_doc-sidebar.scss @@ -71,17 +71,21 @@ html[data-theme='dark'] { display: none !important; } + .theme-doc-sidebar-item-category-level-1 > .menu__list { + /* removes indentation from first level categories */ + margin: 0; + } + + .theme-doc-sidebar-item-category-level-1 + .theme-doc-sidebar-item-category-level-1 { + /* adds margin between first level categories */ + margin-block-start: 1.5rem; + } + .menu__list { display: block !important; transition: height 0.35s cubic-bezier(0.36, 0.66, 0.04, 1) 25ms !important; will-change: initial !important; - margin: 0; - - li:last-of-type { - padding-block-end: 1.5rem; - } - .menu__list { .menu__link--sublist { margin-inline-start: calc(-1 * (var(--dropdown-icon-width) + var(--dropdown-icon-gap))); From 079afa8d5f53c4bd924179b20c6f7138adcb4b2b Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Thu, 6 Apr 2023 11:11:46 -0400 Subject: [PATCH 2/4] fix: spacing at end of sidebar --- src/styles/components/_doc-sidebar.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/styles/components/_doc-sidebar.scss b/src/styles/components/_doc-sidebar.scss index 4e89ff0bdc7..951c803beec 100644 --- a/src/styles/components/_doc-sidebar.scss +++ b/src/styles/components/_doc-sidebar.scss @@ -81,6 +81,10 @@ html[data-theme='dark'] { margin-block-start: 1.5rem; } + .theme-doc-sidebar-item-category-level-1:last-of-type { + margin-block-end: 1.5rem; + } + .menu__list { display: block !important; transition: height 0.35s cubic-bezier(0.36, 0.66, 0.04, 1) 25ms !important; From 46504c6e99c6571755a532b95885055aa29081bf Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Fri, 7 Apr 2023 12:34:39 -0400 Subject: [PATCH 3/4] fix: spacing between sections --- src/styles/components/_doc-sidebar.scss | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/styles/components/_doc-sidebar.scss b/src/styles/components/_doc-sidebar.scss index 951c803beec..839dc9505ed 100644 --- a/src/styles/components/_doc-sidebar.scss +++ b/src/styles/components/_doc-sidebar.scss @@ -76,15 +76,6 @@ html[data-theme='dark'] { margin: 0; } - .theme-doc-sidebar-item-category-level-1 + .theme-doc-sidebar-item-category-level-1 { - /* adds margin between first level categories */ - margin-block-start: 1.5rem; - } - - .theme-doc-sidebar-item-category-level-1:last-of-type { - margin-block-end: 1.5rem; - } - .menu__list { display: block !important; transition: height 0.35s cubic-bezier(0.36, 0.66, 0.04, 1) 25ms !important; @@ -112,6 +103,15 @@ html[data-theme='dark'] { } } + .theme-doc-sidebar-item-category-level-1 + .theme-doc-sidebar-item-category-level-1 { + /* adds margin between first level categories */ + margin-block-start: 1.5rem; + } + + .theme-doc-sidebar-item-category-level-1:last-of-type { + margin-block-end: 1.5rem; + } + .menu__link { font-weight: 500; font-size: 0.813rem; From 3acc42705b91419177d4978af34c5210e0e21197 Mon Sep 17 00:00:00 2001 From: Sean Perkins Date: Mon, 10 Apr 2023 11:40:30 -0400 Subject: [PATCH 4/4] fix: padding between collapsed sections --- src/styles/components/_doc-sidebar.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/styles/components/_doc-sidebar.scss b/src/styles/components/_doc-sidebar.scss index 839dc9505ed..34b9bd17ee7 100644 --- a/src/styles/components/_doc-sidebar.scss +++ b/src/styles/components/_doc-sidebar.scss @@ -103,9 +103,8 @@ html[data-theme='dark'] { } } - .theme-doc-sidebar-item-category-level-1 + .theme-doc-sidebar-item-category-level-1 { - /* adds margin between first level categories */ - margin-block-start: 1.5rem; + .theme-doc-sidebar-item-category-level-1 > .menu__list > .menu__list-item:last-of-type { + padding-block-end: 1.5rem; } .theme-doc-sidebar-item-category-level-1:last-of-type {