From 9933bc5dad5e2c337095fd089a58684ef8e5bbb4 Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Mon, 10 Feb 2025 14:27:07 +1100 Subject: [PATCH] Adjust paddingLeft calculation and margin in styles for improved layout --- index.js | 2 +- styles.css | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 3e02bcf..d3172d9 100644 --- a/index.js +++ b/index.js @@ -156,7 +156,7 @@ class DOMService { link.href = `?${doc.slug}`; link.textContent = doc.title || doc.path.split('/').pop().replace('.md', ''); link.dataset.path = doc.path; - link.style.paddingLeft = `${level * 0.6}rem`; // Reduced from 0.8 + 1.2 to just 0.6 + link.style.paddingLeft = `${(level * 0.6) + 0.8}rem`; // Add base padding of 0.8rem link.onclick = (e) => { e.preventDefault(); diff --git a/styles.css b/styles.css index 8bc08aa..32b1c37 100644 --- a/styles.css +++ b/styles.css @@ -193,6 +193,7 @@ body { font-size: 0.875rem; width: 100%; position: relative; + box-sizing: border-box; } .folder-icons { @@ -201,7 +202,7 @@ body { gap: 0.25rem; color: var(--ifm-color-content-secondary); min-width: 1.5em; - margin-right: 0.5rem; + margin-right: 0.25rem; order: 1; }