Skip to content

Commit 650936a

Browse files
fix(toc): remove horizontal overflow due Table of Contents (#23052) (#23068)
<!--Delete sections as needed --> ## Description <!-- Tell us what you did and why --> This PR fixes the horizontal overflow issue in the Docker Docs Website due to overflow Table of Contents section, as described in [#23052](#23052). ### Changes made: Updated layout structure and/or styles in: - layouts/partials/aside.html - layouts/partials/content-default.html The fix prevents excessive width in the ToC container, which was previously causing the entire page to become horizontally scrollable on certain pages. ## Update: https://github.com/user-attachments/assets/cdc3898c-ba21-468a-9add-0785abf0e76f ## Related issues or tickets Closes #23052 <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review ### Notes for reviewers: - Let me know if you’d prefer a purely CSS-based solution, or if structural changes are acceptable. - Happy to tweak styles, breakpoints, or layout as needed!
1 parent d657aea commit 650936a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

layouts/partials/aside.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
class="sticky top-16 h-[calc(100vh-64px)] min-w-52 space-y-4 overflow-y-auto py-4 w-full"
33
>
44
{{ partial "github-links.html" . }}
5-
<div id="TableOfContents">
5+
<div id="TableOfContents" class="overflow-x-auto">
66
{{ partialCached "pagemeta.html" . . }}
77
</div>
88
{{- if ne .Type "guides" }}
99
{{ with .GetTerms "tags" }}
10-
<div class="not-prose mt-8 px-4">
10+
<div class="not-prose mt-8 px-4 overflow-x-auto">
1111
{{- partial "tags.html" . }}
1212
</div>
1313
{{- end }}

layouts/partials/content-default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h1 data-pagefind-weight="10">{{ .Title }}</h1>
1313
</div>
1414
{{ .Content }}
1515
</article>
16-
<div class="-mt-8 -mr-20 hidden min-w-48 flex-1 lg:block">
16+
<div class="-mt-8 hidden min-w-48 flex-1 lg:block">
1717
{{ partial "aside.html" . }}
1818
</div>
1919
</div>

0 commit comments

Comments
 (0)