Skip to content

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

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions