Skip to content
Merged
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
11 changes: 9 additions & 2 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chaokunyang the sidebar is rendered double it's width size on the screen by it should
Image

*/
--doc-sidebar-width: calc(var(--fory-doc-sidebar-panel-width) + var(--fory-doc-sidebar-offset));
}

.theme-doc-breadcrumbs,
Expand Down Expand Up @@ -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));
}
}

Expand Down
Loading