Skip to content

fix: updated fonts on the entire site for better readability#237

Closed
vihar wants to merge 1 commit intomasterfrom
fix-fonts-for-readability
Closed

fix: updated fonts on the entire site for better readability#237
vihar wants to merge 1 commit intomasterfrom
fix-fonts-for-readability

Conversation

@vihar
Copy link
Contributor

@vihar vihar commented Mar 9, 2026

Description

Font changes:

  • Body text: Switched from Satoshi to Inter Variable (single WOFF2 file, all weights) — matches plane.so, optimized for screen readability
  • Headings: Keep Satoshi (h1-h6, nav title, hero) via new --vp-font-family-heading variable
  • Code: IBM Plex Mono now uses WOFF2 (with TTF fallback) — ~156KB vs ~542KB

Readability fixes:

  • Body paragraphs and list items now have line-height: 1.75 for better reading comfort
  • 5 component font sizes normalized from 13px to 14px (panel labels, status codes, cookie consent)
  • 4 hardcoded ui-monospace stacks replaced with var(--vp-font-family-mono) so IBM Plex Mono actually applies everywhere

Performance:

  • Font preload hints added for Inter Variable, Satoshi Medium, and Satoshi Bold
  • 12 unused font files deleted (~1.4MB removed from repo)
  • Overall font payload reduced significantly

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Summary by CodeRabbit

  • Style

    • Refreshed typography with new fonts (Inter for body text, Satoshi for headings)
    • Increased font sizes across UI components for improved readability
    • Enhanced line-height for better text spacing in paragraphs and lists
    • Standardized font usage across documentation components
  • Performance

    • Added font preloading to optimize resource loading

@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
developer-docs Ready Ready Preview, Comment Mar 9, 2026 8:29pm

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

📝 Walkthrough

Walkthrough

This PR updates the documentation's typography system by introducing font preloading in the build configuration, replacing hardcoded font stacks with CSS variables across components, and refactoring the core stylesheet to implement Inter for body text, Satoshi for headings, and increased font sizes for improved readability.

Changes

Cohort / File(s) Summary
Font Preloading Configuration
docs/.vitepress/config.mts
Added preload link tags for Inter-roman.var.woff2, Satoshi-Medium.woff2, and Satoshi-Bold.woff2 fonts in the document head.
Component Typography Updates
docs/.vitepress/theme/components/ApiParam.vue, CodePanel.vue, CookieConsent.vue, ResponsePanel.vue
Replaced hardcoded monospace font stacks with CSS variables and increased font-size from 13px to 14px across UI component styles.
Core Typography Refactor
docs/.vitepress/theme/style.css
Replaced Satoshi Light font-face with Inter variable font; updated IBM Plex Mono declarations to prefer .woff2 sources; introduced CSS variables for body (Inter) and heading (Satoshi) fonts; increased line-height to 1.75; replaced hardcoded font references with monospace CSS variable.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 hops with glee
Fonts now dance with Inter's grace,
Satoshi bold adorns each space,
Variables replace hardcoded ways,
Typography shines through all our days!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change—updating fonts across the site for better readability, which directly reflects the primary objectives of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-fonts-for-readability

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/.vitepress/theme/style.css`:
- Around line 133-139: The `@font-face` block for font-family "Inter" uses a
variable-font declaration (src format "woff2-variations" and a font-weight
range) that is failing the CSS linter; replace the variable-font rule with
linter-friendly declarations by either (A) providing a fallback woff2
(non-variations) src or (B) emitting separate `@font-face` blocks per weight
(e.g., distinct `@font-face` rules for 100, 200, … 900) and remove the
space-separated range notation so the linter accepts the rules; update the
`@font-face`(s) that reference "Inter" (the block with src:
url("/fonts/Inter/Inter-roman.var.woff2") format("woff2-variations") and the
similar block at lines ~198-205) accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 01cfe6d0-dd3d-4f27-a279-4bc1a7f5224d

📥 Commits

Reviewing files that changed from the base of the PR and between 224c2c0 and 3ad4301.

⛔ Files ignored due to path filters (17)
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-Bold.woff2 is excluded by !**/*.woff2
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-BoldItalic.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-ExtraLight.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-ExtraLightItalic.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-Italic.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-Light.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-LightItalic.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2 is excluded by !**/*.woff2
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-MediumItalic.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-Regular.woff2 is excluded by !**/*.woff2
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2 is excluded by !**/*.woff2
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-SemiBoldItalic.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-Thin.ttf is excluded by !**/*.ttf
  • docs/public/fonts/IBMPlexMono/IBMPlexMono-ThinItalic.ttf is excluded by !**/*.ttf
  • docs/public/fonts/Inter/Inter-roman.var.woff2 is excluded by !**/*.woff2
  • docs/public/fonts/Satoshi/Satoshi-Light.woff is excluded by !**/*.woff
  • docs/public/fonts/Satoshi/Satoshi-Light.woff2 is excluded by !**/*.woff2
📒 Files selected for processing (6)
  • docs/.vitepress/config.mts
  • docs/.vitepress/theme/components/ApiParam.vue
  • docs/.vitepress/theme/components/CodePanel.vue
  • docs/.vitepress/theme/components/CookieConsent.vue
  • docs/.vitepress/theme/components/ResponsePanel.vue
  • docs/.vitepress/theme/style.css

Comment on lines +133 to +139
@font-face {
font-family: "Inter";
src: url("/fonts/Inter/Inter-roman.var.woff2") format("woff2-variations");
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Unblock the CSS lint check for the new font declarations.

Line 134 and Lines 200-204 currently fail the repo’s CSS lint rules, so this stylesheet will not pass as written.

Suggested fix
 `@font-face` {
-  font-family: "Inter";
+  font-family: Inter;
   src: url("/fonts/Inter/Inter-roman.var.woff2") format("woff2-variations");
   font-weight: 100 900;
   font-style: normal;
   font-display: swap;
 }
@@
   --vp-font-family-base:
-    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
+    "Inter", -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
   --vp-font-family-heading:
-    "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
+    "Satoshi", -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
   --vp-font-family-mono:
-    "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
+    "IBM Plex Mono", ui-monospace, "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono",
+    "Courier New",
     monospace;

Also applies to: 198-205

🧰 Tools
🪛 Stylelint (17.4.0)

[error] 134-134: Unexpected quotes around "Inter" (font-family-name-quotes)

(font-family-name-quotes)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/.vitepress/theme/style.css` around lines 133 - 139, The `@font-face` block
for font-family "Inter" uses a variable-font declaration (src format
"woff2-variations" and a font-weight range) that is failing the CSS linter;
replace the variable-font rule with linter-friendly declarations by either (A)
providing a fallback woff2 (non-variations) src or (B) emitting separate
`@font-face` blocks per weight (e.g., distinct `@font-face` rules for 100, 200, …
900) and remove the space-separated range notation so the linter accepts the
rules; update the `@font-face`(s) that reference "Inter" (the block with src:
url("/fonts/Inter/Inter-roman.var.woff2") format("woff2-variations") and the
similar block at lines ~198-205) accordingly.

@sriramveeraghanta
Copy link
Member

Looks good to me

@vihar vihar closed this Mar 9, 2026
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.

2 participants