Skip to content

Commit f7a7d12

Browse files
authored
fix(styles): add sidebar indentation for nested sections (#2886)
* fix(styles): add sidebar indentation for nested sections * fix: spacing at end of sidebar * fix: spacing between sections * fix: padding between collapsed sections
1 parent 4a5f398 commit f7a7d12

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/styles/components/_doc-sidebar.scss

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,16 @@ html[data-theme='dark'] {
7171
display: none !important;
7272
}
7373

74+
.theme-doc-sidebar-item-category-level-1 > .menu__list {
75+
/* removes indentation from first level categories */
76+
margin: 0;
77+
}
78+
7479
.menu__list {
7580
display: block !important;
7681
transition: height 0.35s cubic-bezier(0.36, 0.66, 0.04, 1) 25ms !important;
7782
will-change: initial !important;
7883

79-
margin: 0;
80-
81-
li:last-of-type {
82-
padding-block-end: 1.5rem;
83-
}
84-
8584
.menu__list {
8685
.menu__link--sublist {
8786
margin-inline-start: calc(-1 * (var(--dropdown-icon-width) + var(--dropdown-icon-gap)));
@@ -104,6 +103,14 @@ html[data-theme='dark'] {
104103
}
105104
}
106105

106+
.theme-doc-sidebar-item-category-level-1 > .menu__list > .menu__list-item:last-of-type {
107+
padding-block-end: 1.5rem;
108+
}
109+
110+
.theme-doc-sidebar-item-category-level-1:last-of-type {
111+
margin-block-end: 1.5rem;
112+
}
113+
107114
.menu__link {
108115
font-weight: 500;
109116
font-size: 0.813rem;

0 commit comments

Comments
 (0)