From b6088daf6144cce3fdc4cb4abf92e983d8167189 Mon Sep 17 00:00:00 2001 From: Aziz Becha Date: Sun, 28 Jun 2026 20:47:19 +0100 Subject: [PATCH 1/2] fix(copy-page): right-align Copy page button when page has no TOC The in-article Copy page button sits in `.docHeaderContainer` (a flex row with `justify-content: space-between`) next to ``. On the current release `DocVersionBadge` renders nothing, leaving a single flex child that space-between pins to the left. `.copyPageArticleAction` was referenced in the component but never defined in the CSS module, so the no-TOC wrapper had no class to right-align it. Define `.copyPageArticleAction` with `margin-left: auto` so the button stays right-aligned whether or not the version badge renders. --- website/src/theme/DocItem/Layout/styles.module.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/src/theme/DocItem/Layout/styles.module.css b/website/src/theme/DocItem/Layout/styles.module.css index ee64367ae82..7fc832cd86b 100644 --- a/website/src/theme/DocItem/Layout/styles.module.css +++ b/website/src/theme/DocItem/Layout/styles.module.css @@ -24,6 +24,13 @@ div[class^="copyPageArticleAction"] { margin-bottom: 0; } +/* Keep the in-article button right-aligned even when DocVersionBadge renders + * nothing (current release), so .docHeaderContainer's space-between doesn't + * pin the lone child to the left. */ +.copyPageArticleAction { + margin-left: auto; +} + button[class^="copyPageButton"] { border-radius: var(--ifm-global-radius); border-color: var(--ifm-color-gray-500); From 6015dc6364cdd551ecac5a086e78001327b22587 Mon Sep 17 00:00:00 2001 From: Aziz Becha Date: Sun, 28 Jun 2026 20:56:52 +0100 Subject: [PATCH 2/2] chore: remove unnecessary comment Co-authored-by: Bartosz Kaszubowski --- website/src/theme/DocItem/Layout/styles.module.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/website/src/theme/DocItem/Layout/styles.module.css b/website/src/theme/DocItem/Layout/styles.module.css index 7fc832cd86b..d2d6137c74e 100644 --- a/website/src/theme/DocItem/Layout/styles.module.css +++ b/website/src/theme/DocItem/Layout/styles.module.css @@ -24,9 +24,6 @@ div[class^="copyPageArticleAction"] { margin-bottom: 0; } -/* Keep the in-article button right-aligned even when DocVersionBadge renders - * nothing (current release), so .docHeaderContainer's space-between doesn't - * pin the lone child to the left. */ .copyPageArticleAction { margin-left: auto; }