Skip to content

Commit 9933bc5

Browse files
committed
Adjust paddingLeft calculation and margin in styles for improved layout
1 parent d6e6fd2 commit 9933bc5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class DOMService {
156156
link.href = `?${doc.slug}`;
157157
link.textContent = doc.title || doc.path.split('/').pop().replace('.md', '');
158158
link.dataset.path = doc.path;
159-
link.style.paddingLeft = `${level * 0.6}rem`; // Reduced from 0.8 + 1.2 to just 0.6
159+
link.style.paddingLeft = `${(level * 0.6) + 0.8}rem`; // Add base padding of 0.8rem
160160

161161
link.onclick = (e) => {
162162
e.preventDefault();

styles.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ body {
193193
font-size: 0.875rem;
194194
width: 100%;
195195
position: relative;
196+
box-sizing: border-box;
196197
}
197198

198199
.folder-icons {
@@ -201,7 +202,7 @@ body {
201202
gap: 0.25rem;
202203
color: var(--ifm-color-content-secondary);
203204
min-width: 1.5em;
204-
margin-right: 0.5rem;
205+
margin-right: 0.25rem;
205206
order: 1;
206207
}
207208

0 commit comments

Comments
 (0)