Justified reading measure with fitted article card (#29)

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: #29
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
This commit was merged in pull request #29.
This commit is contained in:
2026-07-17 17:37:58 +00:00
committed by archvillainette
parent 004be9b038
commit d794f4fb87
+30
View File
@@ -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;