File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,6 +99,18 @@ html.dark code.docutils {
9999 font-weight : 600 ;
100100}
101101
102+ /* Allow long dotted FQNs to wrap in the sidebar instead of clipping */
103+ .sy-sidebar-toc ,
104+ .sy-sidebar-toc ul ,
105+ .sy-sidebar-toc li {
106+ overflow : visible;
107+ }
108+
109+ .sy-lside a {
110+ white-space : normal;
111+ word-break : break-word;
112+ }
113+
102114/* Reset code font in sidebar nav — prevents identifier-titled pages
103115 * (e.g. generate_composite_decl) from rendering in monospace */
104116.sy-lside a code {
Original file line number Diff line number Diff line change 1+ // Copyright 2026 Apple Inc.
2+ //
3+ // Use of this source code is governed by a BSD-3-Clause license that can
4+ // be found in the LICENSE file or at https://opensource.org/licenses/BSD-3-Clause
5+
6+
7+ // Break sidebar entries at `.` boundaries so long dotted FQNs wrap cleanly
8+ // (e.g. `coreai_opt.quantization.QuantizerConfig.presets.w4` wraps between
9+ // segments rather than mid-word). Inserts a zero-width space (U+200B) after
10+ // each `.`, which the browser treats as a valid line-break opportunity when
11+ // combined with `white-space: normal` in the sidebar CSS.
12+ document . addEventListener ( "DOMContentLoaded" , function ( ) {
13+ document . querySelectorAll ( ".wy-menu-vertical li a" ) . forEach ( function ( link ) {
14+ // Only touch the text nodes — don't mangle any HTML inside (e.g. icons).
15+ link . childNodes . forEach ( function ( node ) {
16+ if ( node . nodeType === Node . TEXT_NODE && node . textContent . indexOf ( "." ) !== - 1 ) {
17+ node . textContent = node . textContent . replace ( / \. / g, "." ) ;
18+ }
19+ } ) ;
20+ } ) ;
21+ } ) ;
Original file line number Diff line number Diff line change 3737html_theme = "shibuya"
3838html_static_path = ["_static" ]
3939html_css_files = ["custom.css" ]
40- html_js_files = ["copy-page-button.js" ]
40+ html_js_files = ["sidebar-wrap.js" , " copy-page-button.js" ]
4141templates_path = ["_templates" ]
4242html_show_sourcelink = False
4343
You can’t perform that action at this time.
0 commit comments