diff --git a/src/css/custom.css b/src/css/custom.css index 02ac18d6..6189327c 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -10,6 +10,7 @@ :root { --ifm-font-family-base: "Google Sans", system-ui, -apple-system, sans-serif; --ifm-heading-font-family: "Google Sans", system-ui, -apple-system, sans-serif; + --doc-content-max-width: 1100px; --ifm-color-primary: #1877f2; --ifm-color-primary-dark: #166bda; --ifm-color-primary-darker: #1564ce; @@ -746,10 +747,10 @@ body { line-height: 1.2; text-align: left; white-space: nowrap; - max-width: 970px; + max-width: var(--doc-content-max-width); margin-left: auto; margin-right: auto; - padding-left: 4rem; + padding-left: 2rem; padding-right: 2rem; box-sizing: border-box; } @@ -853,7 +854,7 @@ article h4 { /* Force center all documentation content */ .col:not(.col--3) { - max-width: 1000px !important; + max-width: var(--doc-content-max-width) !important; margin-left: auto !important; margin-right: auto !important; } @@ -898,10 +899,10 @@ article h4 { div, article )[class*="generatedIndexPage"] { - max-width: 1000px !important; + max-width: var(--doc-content-max-width) !important; margin-left: auto !important; margin-right: auto !important; - width: 1000px !important; + width: var(--doc-content-max-width) !important; } } diff --git a/src/theme/DocItem/Layout/index.tsx b/src/theme/DocItem/Layout/index.tsx index 7e1030f4..e80aaae1 100644 --- a/src/theme/DocItem/Layout/index.tsx +++ b/src/theme/DocItem/Layout/index.tsx @@ -1,5 +1,4 @@ import React, { type ReactNode } from "react" -import clsx from "clsx" import { useWindowSize } from "@docusaurus/theme-common" import { useDoc } from "@docusaurus/plugin-content-docs/client" import DocItemPaginator from "@theme/DocItem/Paginator" @@ -45,7 +44,7 @@ export default function DocItemLayout({ children }: Props): ReactNode { const { metadata } = useDoc() return (