Skip to content
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

GlobalStyles may not be the best place to import fonts #512

Open
2bfe26 opened this issue Jul 6, 2023 · 2 comments
Open

GlobalStyles may not be the best place to import fonts #512

2bfe26 opened this issue Jul 6, 2023 · 2 comments
Labels
enhancement New feature or request issue:analyzing Someone is analysing this issue status:blocked

Comments

@2bfe26
Copy link
Contributor

2bfe26 commented Jul 6, 2023

Describe the feature or problem you’d like to solve

We import some fonts in GlobalStyles component, but since styled-components don't load properly inside nextjs <Head />, we end up with the font imports outside the html head element.

I understand that its convenient to ask clients to import <GlobalStyles /> and the everything works, but this is probably preventing the browser from pre-loading the fonts and hurting performance.

If necessary I'm open to create some benchmarks to see how much of a impact we actually have.

Proposed solution

Do not include this imports and instead mention the need to include them in the documentation

@2bfe26 2bfe26 added the enhancement New feature or request label Jul 6, 2023
@rapahaeru rapahaeru added the issue:analyzing Someone is analysing this issue label Jul 31, 2023
@rapahaeru
Copy link
Contributor

@MarcosViniciusPC @alizeleal Please confirm the issue

@MarcosViniciusPC
Copy link
Contributor

Since we are considering changing Quantum to CSS Modules, this change might not be necessary in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request issue:analyzing Someone is analysing this issue status:blocked
Projects
None yet
Development

No branches or pull requests

3 participants