From d794f4fb871c2405e3739300e5cb72c1a3f6729e Mon Sep 17 00:00:00 2001 From: vickydotbat Date: Fri, 17 Jul 2026 17:37:58 +0000 Subject: [PATCH] Justified reading measure with fitted article card (#29) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wiki article text was capping at the plugin's default 70ch measure, leaving a wide dead strip inside the article card after the ToC-dock change. - Set `--wiki-prose-measure: 54rem` (~90ch of body text; rem so the cap also applies to large headings — ch scales with font size and never caps them) - Justify paragraphs, list items, and blockquotes with `hyphens: auto` - Fit the article card to the measure (58rem) and widen the docked ToC column to absorb the leftover width - Center the prose block with 1.5rem vertical padding Verified on the theme-dev stack against /wiki/Lore/Gond (with long filler paragraphs) at 1561px, and the wiki hub for regressions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://git.westgate.pw/ShadowsOverWestgate/sow-nodebb-theme/pulls/29 Co-authored-by: vickydotbat Co-committed-by: vickydotbat --- scss/westgate/_wiki-prose.scss | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/scss/westgate/_wiki-prose.scss b/scss/westgate/_wiki-prose.scss index c3d647f..f098f02 100644 --- a/scss/westgate/_wiki-prose.scss +++ b/scss/westgate/_wiki-prose.scss @@ -158,6 +158,10 @@ --wiki-article-drawer-layer: 1010; --wiki-article-drawer-backdrop-layer: 1005; + + /* Reading measure in rem, not ch: ch scales with font size, so a ch-based + cap never applies to large headings. 54rem ≈ 90ch of body text. */ + --wiki-prose-measure: 54rem; } /* Wiki surfaces: match forum category/topic panel depth. */ @@ -202,6 +206,32 @@ z-index: var(--wiki-article-drawer-backdrop-layer, 1005); } +/* Article reading layout: the card hugs the justified text block instead of + leaving a dead strip, and the docked ToC column absorbs the leftover width + (overrides the plugin's minmax(16rem, 24rem) ToC column in wiki.css). */ +@media (min-width: 1200px) { + .westgate-wiki .wiki-with-fab:has(.wiki-article-drawer--toc:not([hidden])) { + grid-template-columns: minmax(0, 58rem) minmax(0, 1fr); + } + + .westgate-wiki .wiki-with-fab:has(.wiki-article-drawer--toc:not([hidden])) .wiki-content-layout { + max-width: 58rem; + } +} + +.westgate-wiki .wiki-article-prose { + padding-block: 1.5rem; +} + +.westgate-wiki .wiki-article-prose :where(p, ul, ol, blockquote, .wiki-footnotes, h1, h2, h3, h4, h5, h6) { + margin-inline: auto; +} + +.westgate-wiki .wiki-article-prose :where(p, li, blockquote) { + hyphens: auto; + text-align: justify; +} + .westgate-wiki .card.wiki-card:hover, .westgate-wiki .card.wiki-topic-card:hover { background: var(--wg-velvet-panel-hover) !important;