Skip to content

Replacing Google Fonts import with next/font#52

Merged
Diubii merged 2 commits intomainfrom
Diubii/fonts
Mar 24, 2026
Merged

Replacing Google Fonts import with next/font#52
Diubii merged 2 commits intomainfrom
Diubii/fonts

Conversation

@Diubii
Copy link
Copy Markdown
Contributor

@Diubii Diubii commented Mar 24, 2026

Closes #24

@Diubii Diubii requested a review from toto04 March 24, 2026 23:01
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68df7d67-c402-49bc-b07a-b5f6b1fbe2b6

📥 Commits

Reviewing files that changed from the base of the PR and between eb61876 and 8838e69.

📒 Files selected for processing (5)
  • src/app/layout.tsx
  • src/components/home/hero.tsx
  • src/components/ui/button.tsx
  • src/styles/globals.css
  • src/styles/typography.css
💤 Files with no reviewable changes (1)
  • src/styles/globals.css

Walkthrough

Migrated font loading from external Google Fonts CSS imports to Next.js's next/font/google API in the root layout. CSS variables and Tailwind theme configuration updated to reference dynamically injected font variables instead of hardcoded font stacks.

Changes

Cohort / File(s) Summary
Font configuration migration
src/app/layout.tsx, src/styles/globals.css
Replaced GeistSans and external Google Fonts @import with next/font/google integration for Poppins, DM Sans, and Red Hat Text fonts. Google Fonts now loaded via Next.js optimization instead of CSS imports.
Font system integration
src/styles/typography.css
Updated @theme CSS variable declarations to reference dynamic font variables (var(--font-dm-sans), var(--font-poppins), var(--font-red-hat)) instead of hardcoded font-family stacks.
Minor UI adjustments
src/components/home/hero.tsx, src/components/ui/button.tsx
Reordered utility class on hero heading element; updated tertiary button variant typography class from typo-label-large to typo-headline-small.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: replacing Google Fonts import with next/font/google, which is the primary objective across all modified files.
Linked Issues check ✅ Passed The PR successfully implements issue #24's requirements: imports Google Fonts via next/font/google [#24], removes hardcoded CSS imports [#24], and shifts to Next.js font optimization [#24].
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #24: font imports replacement. The hero.tsx class reordering and button.tsx typography update are minor formatting/styling adjustments supporting font integration consistency.
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
  • Create stacked PR
  • Commit on current branch

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.

@Diubii Diubii marked this pull request as ready for review March 24, 2026 23:01
@Diubii Diubii self-assigned this Mar 24, 2026
@Diubii Diubii merged commit ae1e184 into main Mar 24, 2026
2 checks passed
@Diubii Diubii deleted the Diubii/fonts branch March 24, 2026 23:04
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.

Use next/font instead of hardcoded import from google fonts

2 participants