Skip to content

Improved fonts loading #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 21, 2025
Merged

Improved fonts loading #7

merged 4 commits into from
Jun 21, 2025

Conversation

coderdiaz
Copy link
Owner

We are enabling the use of experimental fonts loading for better performance.

@coderdiaz coderdiaz requested a review from Copilot June 21, 2025 19:30
@coderdiaz coderdiaz self-assigned this Jun 21, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces experimental fonts loading to improve performance by leveraging CSS variables and Astro's experimental fonts configuration.

  • Updates Tailwind's typography configuration to use CSS variable-based font families.
  • Adjusts global CSS to use the new font variables.
  • Preloads fonts in the Head component and configures experimental fonts in the Astro config.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tailwind.config.mjs Updated typography configuration for new experimental fonts
src/styles/global.css Modified root and --font-sans variables to use the new fonts
src/components/partials/Head.astro Added font preloading components for experimental fonts
astro.config.mjs Added experimental fonts integration with local font files
Comments suppressed due to low confidence (1)

astro.config.mjs:41

  • If the missing 'weight' property for the variable font variant is intentional, consider adding a clarifying comment to explain this choice.
          { src: ['./src/assets/fonts/InterVariable.woff2'] },

@coderdiaz coderdiaz merged commit 88ee887 into main Jun 21, 2025
@coderdiaz coderdiaz deleted the feature/improved-fonts-loading branch June 21, 2025 19:31
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