From b0c127b718c450529195e027f975226ef82d1526 Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:09:41 +1300 Subject: [PATCH 1/8] Adjust content layout for internally scroll ToC --- .../src/code-comment-form/style.scss | 22 ------------------- .../templates/single.html | 9 +++----- .../themes/wporg-developer-2023/theme.json | 2 +- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/source/wp-content/themes/wporg-developer-2023/src/code-comment-form/style.scss b/source/wp-content/themes/wporg-developer-2023/src/code-comment-form/style.scss index a77e32dde..0e55a9d11 100644 --- a/source/wp-content/themes/wporg-developer-2023/src/code-comment-form/style.scss +++ b/source/wp-content/themes/wporg-developer-2023/src/code-comment-form/style.scss @@ -2,25 +2,3 @@ margin-block-start: var(--wp--style--block-gap); margin-block-end: var(--wp--style--block-gap); } - -.wp-block-wporg-code-reference-comment-form-content { - display: flex; - flex-direction: column; - max-width: var(--wp--style--global--content-size); - - @media screen and (min-width: 1200px) { - max-width: unset; - flex-direction: row; - justify-content: space-between; - gap: var(--wp--preset--spacing--40); - - .comment-respond { - min-width: var(--wp--style--global--content-size); - } - - .comment-rules { - padding-top: var(--wp--preset--spacing--30); - } - } -} - diff --git a/source/wp-content/themes/wporg-developer-2023/templates/single.html b/source/wp-content/themes/wporg-developer-2023/templates/single.html index 8a96bb2fb..003f3bacb 100644 --- a/source/wp-content/themes/wporg-developer-2023/templates/single.html +++ b/source/wp-content/themes/wporg-developer-2023/templates/single.html @@ -16,10 +16,13 @@ + + + @@ -29,10 +32,4 @@ - -
- -
- - diff --git a/source/wp-content/themes/wporg-developer-2023/theme.json b/source/wp-content/themes/wporg-developer-2023/theme.json index 1a91049d3..87672a987 100644 --- a/source/wp-content/themes/wporg-developer-2023/theme.json +++ b/source/wp-content/themes/wporg-developer-2023/theme.json @@ -159,7 +159,7 @@ "wporg-sidebar-container": { "spacing": { "margin": { - "top": "150px" + "top": "130px" } } }, From 502683cc3064793cce67427820f2846f729202b8 Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Fri, 12 Jan 2024 14:49:58 +1300 Subject: [PATCH 2/8] Wrap chapter list with sidebar container --- .../patterns/article-sidebar.php | 2 +- .../wporg-developer-2023/src/style/style.scss | 12 ++++++++---- .../templates/single-handbook.html | 14 +++++++++----- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/source/wp-content/themes/wporg-developer-2023/patterns/article-sidebar.php b/source/wp-content/themes/wporg-developer-2023/patterns/article-sidebar.php index cd813de21..7669a2c11 100644 --- a/source/wp-content/themes/wporg-developer-2023/patterns/article-sidebar.php +++ b/source/wp-content/themes/wporg-developer-2023/patterns/article-sidebar.php @@ -7,7 +7,7 @@ ?> - + diff --git a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss index 24b378754..6feba0784 100644 --- a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss +++ b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss @@ -71,6 +71,7 @@ pre { .has-three-columns { --local--sidebar--width: 232px; --local--column-gap: 40px; + justify-content: flex-end; > * { width: 100%; @@ -84,8 +85,10 @@ pre { flex-direction: row !important; column-gap: var(--local--column-gap); - aside { + /* Left sidebar */ + > .wp-block-wporg-sidebar-container { width: var(--local--sidebar--width); + inset-inline-start: var(--wp--preset--spacing--edge-space); } main { @@ -105,10 +108,11 @@ pre { max-width: 960px; margin-left: auto; margin-right: auto; - } - .wp-block-wporg-sidebar-container { - inset-inline-end: var(--wp--preset--spacing--edge-space); + /* Right sidebar */ + .wp-block-wporg-sidebar-container { + inset-inline-end: var(--wp--preset--spacing--edge-space); + } } } } diff --git a/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html b/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html index 29993bb4a..a95d170de 100644 --- a/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html +++ b/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html @@ -5,11 +5,11 @@
- -
+ +
- -
+ +
@@ -29,7 +29,11 @@
- + + + + +
From 9d1a04036e48fdebedd360c2b6a90dfcd617f1d7 Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:59:30 +1300 Subject: [PATCH 3/8] Improve sidebar descriptions --- .../themes/wporg-developer-2023/src/style/style.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss index 6feba0784..198f61b8f 100644 --- a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss +++ b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss @@ -85,7 +85,7 @@ pre { flex-direction: row !important; column-gap: var(--local--column-gap); - /* Left sidebar */ + /* Left sidebar: Chapter List */ > .wp-block-wporg-sidebar-container { width: var(--local--sidebar--width); inset-inline-start: var(--wp--preset--spacing--edge-space); @@ -109,7 +109,7 @@ pre { margin-left: auto; margin-right: auto; - /* Right sidebar */ + /* Right sidebar: ToC */ .wp-block-wporg-sidebar-container { inset-inline-end: var(--wp--preset--spacing--edge-space); } From 20344932e71d463afc7f141e58e495cccde52ca2 Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:17:05 +1300 Subject: [PATCH 4/8] Remove space from top of chapter list --- .../themes/wporg-developer-2023/src/chapter-list/style.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/source/wp-content/themes/wporg-developer-2023/src/chapter-list/style.scss b/source/wp-content/themes/wporg-developer-2023/src/chapter-list/style.scss index 683e761f8..09b8094d3 100644 --- a/source/wp-content/themes/wporg-developer-2023/src/chapter-list/style.scss +++ b/source/wp-content/themes/wporg-developer-2023/src/chapter-list/style.scss @@ -21,7 +21,6 @@ } .wporg-chapter-list__list { - margin-top: var(--wp--preset--spacing--20); @media (max-width: 767px) { display: none; From 3eb01868c37025ddb9db837fed7848344b4dfe44 Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:19:56 +1300 Subject: [PATCH 5/8] Increase space at bottom of single page --- .../src/code-comment-form/style.scss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/wp-content/themes/wporg-developer-2023/src/code-comment-form/style.scss b/source/wp-content/themes/wporg-developer-2023/src/code-comment-form/style.scss index 0e55a9d11..6268f9655 100644 --- a/source/wp-content/themes/wporg-developer-2023/src/code-comment-form/style.scss +++ b/source/wp-content/themes/wporg-developer-2023/src/code-comment-form/style.scss @@ -1,4 +1,8 @@ -.wp-block-wporg-code-reference-comment-form p { - margin-block-start: var(--wp--style--block-gap); - margin-block-end: var(--wp--style--block-gap); +.wp-block-wporg-code-reference-comment-form { + padding-bottom: var(--wp--style--block-gap); + + p { + margin-block-start: var(--wp--style--block-gap); + margin-block-end: var(--wp--style--block-gap); + } } From f4c32a9bdf0dac4be3aac1c3f355e54bdac6254a Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Tue, 30 Jan 2024 09:49:02 +1300 Subject: [PATCH 6/8] Adjust sidebar margins --- .../themes/wporg-developer-2023/src/style/style.scss | 12 ++++++++++-- .../themes/wporg-developer-2023/theme.json | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss index 198f61b8f..bb5288cbe 100644 --- a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss +++ b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss @@ -81,11 +81,20 @@ pre { order: 1; } + /* Left sidebar: Chapter List */ + > .wp-block-wporg-sidebar-container { + margin-top: var(--wp--preset--spacing--20); + } + + /* Right sidebar: ToC */ + article .wp-block-wporg-sidebar-container { + margin-bottom: var(--wp--preset--spacing--50); + } + @media (min-width: 768px) { flex-direction: row !important; column-gap: var(--local--column-gap); - /* Left sidebar: Chapter List */ > .wp-block-wporg-sidebar-container { width: var(--local--sidebar--width); inset-inline-start: var(--wp--preset--spacing--edge-space); @@ -109,7 +118,6 @@ pre { margin-left: auto; margin-right: auto; - /* Right sidebar: ToC */ .wp-block-wporg-sidebar-container { inset-inline-end: var(--wp--preset--spacing--edge-space); } diff --git a/source/wp-content/themes/wporg-developer-2023/theme.json b/source/wp-content/themes/wporg-developer-2023/theme.json index 87672a987..1a91049d3 100644 --- a/source/wp-content/themes/wporg-developer-2023/theme.json +++ b/source/wp-content/themes/wporg-developer-2023/theme.json @@ -159,7 +159,7 @@ "wporg-sidebar-container": { "spacing": { "margin": { - "top": "130px" + "top": "150px" } } }, From c0251c467096a3cfb9fdabc0b41ac14b8b30e72d Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:30:42 +1300 Subject: [PATCH 7/8] Add breakpoint config for chapter list sidebar container --- .../themes/wporg-developer-2023/templates/single-handbook.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html b/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html index a95d170de..e285f8075 100644 --- a/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html +++ b/source/wp-content/themes/wporg-developer-2023/templates/single-handbook.html @@ -29,7 +29,7 @@ - + From 07cf41f6a0ed1a3b6b2053b7acfb7eb00c6417ee Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:23:04 +1300 Subject: [PATCH 8/8] Increase sidebar width to allow for custom scrollbars --- .../wp-content/themes/wporg-developer-2023/src/style/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss index bb5288cbe..13e50fbd5 100644 --- a/source/wp-content/themes/wporg-developer-2023/src/style/style.scss +++ b/source/wp-content/themes/wporg-developer-2023/src/style/style.scss @@ -69,7 +69,7 @@ pre { } .has-three-columns { - --local--sidebar--width: 232px; + --local--sidebar--width: 248px; --local--column-gap: 40px; justify-content: flex-end;