This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git


The following commit(s) were added to refs/heads/main by this push:
     new f856d9cb92 Fix docs sidebar clipping on wide screens (#468)
f856d9cb92 is described below

commit f856d9cb92ac5527febeff337cfc31579af91eaf
Author: Shawn Yang <[email protected]>
AuthorDate: Sun Jun 14 13:29:40 2026 +0800

    Fix docs sidebar clipping on wide screens (#468)
---
 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]

Reply via email to