Skip to content

Tighten prose-lg body rhythm to match design reference#55

Merged
Kanyandula merged 1 commit into
masterfrom
fix/prose-lg-body-rhythm
May 15, 2026
Merged

Tighten prose-lg body rhythm to match design reference#55
Kanyandula merged 1 commit into
masterfrom
fix/prose-lg-body-rhythm

Conversation

@Kanyandula
Copy link
Copy Markdown
Owner

Summary

Published post bodies render with prose prose-lg, but Tiptap stores
class-less HTML, so the body fell through to the stock
@tailwindcss/typography prose-lg defaults (line-height 1.78, ~56px
above <h2>) — markedly airier than the design_reference/ mock, which
tames prose via per-block utilities (leading-relaxed, mt-12/mb-6)
that an editor will never emit. The fix belongs in the prose config
itself so the rendered post and the Tiptap editor stay in sync.

Overrides only the lg modifier in tailwind.config.js:

prose-lg Before After
Body line-height 1.78 1.6
Body font-size 18px 18px (unchanged)
<h2> top / bottom 56 / 32px 48 / 24px
<h3> top / bottom 40 / 16px ~34 / 12px
<p> margins 24px 24px (untouched)

Body stays 18px (better for long-form reading than the reference's 16px).
Applies equally to the Tiptap editor (WYSIWYG parity) and the About page
(same prose-lg content) — both intentional.

Test plan

  • CI green (tests + ruff)
  • Rendered post body: tighter leading, smaller heading gaps, 18px text
  • Tiptap editor matches the published result
  • About page still reads correctly
  • After merge: collectstatic to DO Spaces so prod picks up rebuilt CSS

Published post bodies render with `prose prose-lg`, but Tiptap stores
class-less HTML so the body fell through to the stock @tailwindcss/
typography prose-lg defaults — line-height 1.78 and ~56px above h2 —
which is markedly airier than the design reference (leading-relaxed,
mt-12/mb-6). The reference tames prose via per-block utilities that an
editor will never emit, so the fix belongs in the prose config itself.

Override only the lg modifier: line-height 1.6, h2 48/24px, h3 ~34/12px.
Body font stays 18px (better for long-form reading than the reference's
16px) and paragraph margins are left untouched. Applies equally to the
Tiptap editor (WYSIWYG parity) and the About page (same prose content).
@Kanyandula Kanyandula merged commit 4303093 into master May 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant