Skip to content

Conversation

@Abhishek2005-ard
Copy link
Contributor

@Abhishek2005-ard Abhishek2005-ard commented Jan 3, 2026

Description

Applies the Outfit font globally across the frontend for consistent typography.

Changes

  • Added Outfit font via Google Fonts
  • Applied the font globally using CSS on the body element

Closes #170 #173

Summary by CodeRabbit

  • Style

    • Updated global typography to the Outfit font and applied it app-wide.
    • Added a body reset (zeroed margins) for more consistent layout.
  • Performance

    • Improved font loading/delivery by adding font preload and preconnect hints for faster rendering and smoother first paint.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

📝 Walkthrough

Walkthrough

Updates global typography to Outfit: normalizes DOCTYPE, adds Google Fonts preconnects and stylesheet to the HTML head, sets body margin and font-family to Outfit in CSS, and extends Tailwind's sans fontFamily to include Outfit. No app logic or scripts were changed.

Changes

Cohort / File(s) Summary
HTML head / Font loading
frontend/index.html
Normalized DOCTYPE case (<!DOCTYPE html>); added <link rel="preconnect"> to https://fonts.googleapis.com and https://fonts.gstatic.com (with crossorigin); added Google Fonts stylesheet for Outfit (weights 100–900). No changes to body/script logic.
Global CSS
frontend/src/index.css
Appended body { margin: 0; font-family: 'Outfit', sans-serif; } to apply Outfit globally.
Tailwind configuration
frontend/tailwind.config.js
Extended theme.fontFamily.sans to include ["Outfit", "sans-serif"]; minor reformatting only.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I found a font beneath the moonlight,
Outfit stitched my lines just right.
Preconnect hop, styles take flight,
A tidy type, crisp and bright. ✨

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: applying the Outfit font globally across the frontend, which is the core objective of this PR.
Linked Issues check ✅ Passed The PR successfully implements the objective from issue #170 by importing the Outfit font via Google Fonts, configuring it in Tailwind, and applying it globally to the body element.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #170: updating global fonts. DOCTYPE formatting and CSS/Tailwind configuration changes are necessary supporting modifications for font implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adf0fcd and 3aff06f.

📒 Files selected for processing (1)
  • frontend/index.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/index.html

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

🧹 Nitpick comments (1)
frontend/index.html (1)

4-9: Consider optimizing font weight loading to match actual usage.

The codebase currently uses font weights 400 (normal), 500 (medium), 600 (semibold), 700 (bold), and 800 (extrabold). Loading the full variable font range (100-900) includes unused weights that impact initial page load performance.

If you only need the weights you're actually using, specify them explicitly:

Suggested optimization
-    href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&display=swap"
+    href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap"

Alternatively, if there's a possibility of using additional weights in the future, the current variable font approach is acceptable. The preconnect hints and display=swap parameter are correctly configured.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1f8db72 and 0c50af1.

📒 Files selected for processing (2)
  • frontend/index.html
  • frontend/src/index.css

Comment on lines +113 to +116
body {
margin: 0;
font-family: 'Outfit', sans-serif;
}
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Consolidate font-family into the existing body selector.

This creates a duplicate body selector (lines 93-95 already define a body rule inside @layer base). Duplicating selectors violates the DRY principle and increases maintenance burden.

Additionally, margin: 0 is redundant—Tailwind's preflight (included via @tailwind base) already resets body margins.

Consider these idiomatic approaches for Tailwind projects:

Option 1 (Recommended): Extend Tailwind theme configuration

Add Outfit to your Tailwind config file (tailwind.config.js or tailwind.config.ts):

export default {
  theme: {
    extend: {
      fontFamily: {
        sans: ['Outfit', 'sans-serif'],
      },
    },
  },
}

Then remove lines 113-116 entirely. Tailwind will apply Outfit as the default sans-serif font through the existing @apply directives.

Option 2: Modify the existing body rule

If you prefer explicit CSS, consolidate into the existing @layer base body selector:

 @layer base {
   * {
     @apply border-border;
   }
   body {
-    @apply bg-background text-foreground;
+    @apply bg-background text-foreground;
+    font-family: 'Outfit', sans-serif;
   }
 }
-
-body {
-  margin: 0;
-  font-family: 'Outfit', sans-serif;
-}
🤖 Prompt for AI Agents
frontend/src/index.css lines 113-116: duplicate body selector defines margin:0
and font-family which duplicates the existing @layer base body rule and Tailwind
preflight; remove these lines and either (preferred) add Outfit to Tailwind
config by extending theme.fontFamily.sans and rely on the existing base rule, or
(alternate) move only the font-family into the existing @layer base body
selector (do not re-add margin:0 since Tailwind preflight already resets it).

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

🧹 Nitpick comments (1)
frontend/tailwind.config.js (1)

3-65: Reformatting is fine but extensive.

The file has been reformatted with spacing and indentation changes throughout. While these changes don't affect functionality, they make the diff larger. Consider using a formatter consistently to avoid mixing formatting changes with functional changes in future PRs.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c50af1 and adf0fcd.

📒 Files selected for processing (2)
  • frontend/index.html
  • frontend/tailwind.config.js
🔇 Additional comments (3)
frontend/tailwind.config.js (1)

10-12: LGTM! Proper Tailwind font configuration.

The fontFamily.sans extension correctly adds Outfit as the primary sans-serif font. This will apply Outfit globally to all elements using Tailwind's default sans font stack (which is most elements by default).

frontend/index.html (2)

1-1: DOCTYPE normalization is fine.

Uppercase <!DOCTYPE html> is the standard convention.


20-20: The Google Identity script is actively used in the authentication system and is related to this PR.

The script is required for Google Sign-In functionality, which is implemented in frontend/src/Pages/Authentication/forms.tsx using google.accounts.id.initialize() and google.accounts.id.renderButton(). Type definitions are also defined in frontend/src/types/google.d.ts. This is an initial commit setting up the entire project structure, not merely a font change PR, so the script is a necessary and integral part of the project setup.

Likely an incorrect or invalid review comment.

Comment on lines 4 to 16
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&display=swap"
rel="stylesheet"
/>
<meta charset="UTF-8" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&display=swap"
rel="stylesheet"
/>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Remove duplicate font loading blocks.

Lines 4-9 and 11-16 are identical duplicates of the Google Fonts preconnect and stylesheet links. This causes unnecessary redundancy in the HTML and may lead to duplicate network requests (though modern browsers typically deduplicate).

🔎 Proposed fix: Remove the duplicate block
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link
      href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&display=swap"
      rel="stylesheet"
    />
    <meta charset="UTF-8" />
-   <link rel="preconnect" href="https://fonts.googleapis.com" />
-   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
-   <link
-     href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&display=swap"
-     rel="stylesheet"
-   />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In frontend/index.html around lines 4 to 16 there are two identical Google Fonts
preconnect and stylesheet blocks (lines 4-9 and 11-16); remove the duplicate
block (delete the second occurrence, lines 11-16) so only one set of <link
rel="preconnect"> and the single <link href="...Outfit..."> stylesheet remains,
keeping the existing <meta charset="UTF-8" /> intact in the first block.

@bhavik-mangla bhavik-mangla merged commit 49eaf74 into AOSSIE-Org:main Jan 8, 2026
1 check 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.

Update Global Font to Outfit for Improved UI Consistency

2 participants