This is an automated email from the ASF dual-hosted git repository. chaokunyang pushed a commit to branch fix_website in repository https://gitbox.apache.org/repos/asf/fory-site.git
commit a7e9824c3d51529fcd2fef5b8b3f961ad97f15e1 Author: chaokunyang <[email protected]> AuthorDate: Sun Jun 14 13:27:25 2026 +0800 Fix docs sidebar clipping on wide screens --- src/css/custom.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/css/custom.css b/src/css/custom.css index 98d24b3830..117bfab0e0 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -179,11 +179,18 @@ --fory-doc-wide-width: 988px; --fory-doc-gutter-width: 18px; --fory-doc-sidebar-inset: 2rem; + --fory-doc-sidebar-panel-width: 300px; + --fory-doc-sidebar-offset: max(0px, calc((100vw - var(--fory-layout-width)) / 2)); --fory-doc-toc-right-inset: 1.5rem; } html:root { - --doc-sidebar-width: 300px; + /* + * The menu is aligned with the centered navbar on wide screens. Keep the + * Docusaurus sidebar at least that wide, otherwise its overflow clipping + * hides the menu and the sidebar looks empty. + */ + --doc-sidebar-width: calc(var(--fory-doc-sidebar-panel-width) + var(--fory-doc-sidebar-offset)); } .theme-doc-breadcrumbs, @@ -345,7 +352,7 @@ html:root { @media (min-width: 997px) { .theme-doc-sidebar-menu { - padding-left: max(.75rem, calc((100vw - var(--fory-layout-width)) / 2)); + padding-left: max(.75rem, var(--fory-doc-sidebar-offset)); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
