Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ html.dark code.docutils {
font-weight: 600;
}

/* Allow long dotted FQNs to wrap in the sidebar instead of clipping */
.sy-sidebar-toc,
.sy-sidebar-toc ul,
.sy-sidebar-toc li {
overflow: visible;
}

.sy-lside a {
white-space: normal;
word-break: break-word;
}

/* Reset code font in sidebar nav — prevents identifier-titled pages
* (e.g. generate_composite_decl) from rendering in monospace */
.sy-lside a code {
Expand Down
21 changes: 21 additions & 0 deletions docs/_static/sidebar-wrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2026 Apple Inc.
//
// Use of this source code is governed by a BSD-3-Clause license that can
// be found in the LICENSE file or at https://opensource.org/licenses/BSD-3-Clause


// Break sidebar entries at `.` boundaries so long dotted FQNs wrap cleanly
// (e.g. `coreai_opt.quantization.QuantizerConfig.presets.w4` wraps between
// segments rather than mid-word). Inserts a zero-width space (U+200B) after
// each `.`, which the browser treats as a valid line-break opportunity when
// combined with `white-space: normal` in the sidebar CSS.
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll(".wy-menu-vertical li a").forEach(function (link) {
// Only touch the text nodes — don't mangle any HTML inside (e.g. icons).
link.childNodes.forEach(function (node) {
if (node.nodeType === Node.TEXT_NODE && node.textContent.indexOf(".") !== -1) {
node.textContent = node.textContent.replace(/\./g, ".​");
}
});
});
});
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
html_theme = "shibuya"
html_static_path = ["_static"]
html_css_files = ["custom.css"]
html_js_files = ["copy-page-button.js"]
html_js_files = ["sidebar-wrap.js", "copy-page-button.js"]
templates_path = ["_templates"]
html_show_sourcelink = False

Expand Down