fix(docsite): improve docs article body readability#3085
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Bump article body text to 16px with a 1.75 line-height (type-scale consistent: a 4px-grid-snapped 28px line box) and render paragraphs as <p> instead of <span>. Scoped to the article container via the body size/leading tokens, so headings, subtitle, and site chrome are unaffected. Addresses reader feedback: https://fb.workplace.com/groups/xdsfyi/posts/2426457761173540/?comment_id=2427223827763600&reply_comment_id=2427226201096696 Co-authored-by: Cursor <cursoragent@cursor.com>
47f3193 to
1ddcfd4
Compare
Contributor
🚀 Vercel Preview Deployment
|
cixzhang
approved these changes
Jun 25, 2026
…kdown) Merge origin/main into docsite-article-theme-update. The conflict in ProseBlock.tsx is resolved by keeping our as="p" + display="block" + marginBlock:0 changes while adopting main's renamed renderInlineMarkdown import. Co-authored-by: Navi <navi@navibot.dev>
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
5 tasks
ernestt
added a commit
that referenced
this pull request
Jun 26, 2026
…ponent pages (#3179) Follow-up to #3085, which bumped docs article body text to 16px / 1.75 line-height (and semantic <p>) via DocPageLayout. A few article-style pages have their own Section wrapper and so missed the update. Re-assign the body size/leading tokens (--text-body-size / --text-body-leading) on each page's container, exactly as #3085 did for DocPageLayout. The Markdown root and body-typed Text read these tokens, so the larger/airier body cascades to article prose only; titles (display-1) and subtitles (large) use different tokens and are unaffected. - ChangelogView (What's New): override on the Section — release notes render via Markdown, which already emits semantic <p>. - BlogArticle: override on the Section — post body renders via Markdown. - ComponentDetailClient: override scoped to the Overview prose only (not the page Section), so the dense Properties props table keeps its compact body size. Live previews are isolated inside ComponentPreviewTheme, so the override never leaks into them. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses reader feedback on docs article readability (Workplace comment):
expandTypeScale'scomputeLeading) — the grid-aligned value closest to the requested ~1.7 is28px ÷ 16px = 1.75.ProseBlocknow renders<p>(as="p"+display="block") instead of the default<span>; the<p>UA margin is zeroed so it doesn't double up with the existingVStackgap.DocPageLayoutSectioncontainer, so they cascade only tobody-typed text inside an article. The title (display-1), section headings (display-3), subtitle (large), and all site chrome (sidebar/top-nav) are unaffected.Files changed
apps/docsite/src/components/docs/DocPageLayout.tsx— scoped body--text-body-size(16px) +--text-body-leading(1.75) overrides.apps/docsite/src/components/docs/ProseBlock.tsx— render paragraphs as<p>, zero block margin.Test plan
/docs/getting-started(and other guide topics) — body paragraphs are 16px with noticeably more line spacing.<p>, not<span>, with no extra vertical gap.Made with Cursor