GlobalStyles may not be the best place to import fonts
Opened this issue · 2 comments
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
@MarcosViniciusPC @alizeleal Please confirm the issue
Since we are considering changing Quantum to CSS Modules, this change might not be necessary in the near future.