diff --git a/src/css/custom.css b/src/css/custom.css index 22e7960d826bace8abb777c6bee2ec04666168a5..49cd975ad7e960023747972d377d1d57b8ed7392 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -22,6 +22,7 @@ --ifm-navbar-second-background-color: rgba(248, 250, 252, 1); --ifm-navbar-button-border-color: rgba(226, 232, 240, 1); --ifm-navbar-button-color: rgba(15, 23, 41, 1); + --ifm-font-family-base: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; } /* For readability concerns, you should choose a lighter palette in dark mode. */ @@ -261,3 +262,17 @@ div[id^='headlessui-disclosure-panel'] tr td.relative:nth-child(2) { color: var(--ifm-menu-color); } } + +/* 修复左侧边栏样式,使其固定不滚动 */ +.t-doc__sidebar { + max-height: calc(100dvh - (var(--ifm-navbar-height) * 2)) !important; + top: calc(var(--ifm-navbar-height) * 2) !important; +} + +.theme-doc-sidebar-container { + margin-top: calc(-1* var(--ifm-navbar-height) * 2) !important; +} + +.theme-doc-sidebar-container > div > div { + padding-top: calc(var(--ifm-navbar-height) * 2) !important; +} \ No newline at end of file