diff --git a/.changeset/dark-mode-toggle-laptop.md b/.changeset/dark-mode-toggle-laptop.md new file mode 100644 index 000000000..6d30db12b --- /dev/null +++ b/.changeset/dark-mode-toggle-laptop.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Show the theme toggle in the footer whenever the outline column that hosts the other toggle isn't pinned open, so it stays reachable on laptop-sized screens in wide layouts and while the AI chat is open. diff --git a/packages/gitbook/src/components/Footer/Footer.tsx b/packages/gitbook/src/components/Footer/Footer.tsx index 46c72ec39..539af7925 100644 --- a/packages/gitbook/src/components/Footer/Footer.tsx +++ b/packages/gitbook/src/components/Footer/Footer.tsx @@ -30,8 +30,11 @@ export function Footer(props: { context: GitBookSiteContext }) { data-gb-site-footer className={tcls( 'border-tint-subtle border-t', - // If the footer only contains a mode toggle, we only show it on smaller screens - mobileOnly ? 'xl:hidden' : null + // If the footer only contains a mode toggle, we only show it where the outline + // column — which carries its own toggle — isn't pinned open. + mobileOnly + ? 'layout-default:xl:chat-closed:hidden layout-default:3xl:hidden layout-wide:3xl:chat-closed:hidden page-api-block:page-has-outline:min-[96rem]:hidden' + : null )} >