From 5870f0f3beb4af64fa085066e5d3477476440f7c Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Sun, 27 Mar 2022 00:58:59 +0300 Subject: [PATCH] fix: make page wrapper take full height --- .../src/theme/DocPage/Layout/index.tsx | 4 ++-- .../src/theme/DocPage/Layout/styles.module.css | 9 ++++++++- .../docusaurus-theme-classic/src/theme/DocPage/index.tsx | 1 - 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.tsx index 77d148811826..5bfca0b4f2a1 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/index.tsx @@ -14,13 +14,13 @@ import DocPageLayoutMain from '@theme/DocPage/Layout/Main'; import styles from './styles.module.css'; -import {useDocsSidebar} from '@docusaurus/theme-common'; +import {useDocsSidebar, ThemeClassNames} from '@docusaurus/theme-common'; export default function DocPageLayout({children}: Props): JSX.Element { const sidebar = useDocsSidebar(); const [hiddenSidebarContainer, setHiddenSidebarContainer] = useState(false); return ( - +
{sidebar && ( diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css index 8b3e52ce13e5..a34f0837facb 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/Layout/styles.module.css @@ -10,10 +10,17 @@ --doc-sidebar-hidden-width: 30px; } +:global(.docs-wrapper) { + display: flex; +} + +.docPage { + width: 100%; +} + .docPage, .docMainContainer { display: flex; - width: 100%; } .docSidebarContainer { diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocPage/index.tsx index 8ee721f9862b..32cfa1ff7704 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/index.tsx @@ -77,7 +77,6 @@ export default function DocPage(props: Props): JSX.Element { />