Skip to content

FOUC when using style tag with Gatsby Head API #39239

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

Open
2 tasks done
alexey0975 opened this issue Mar 10, 2025 · 0 comments
Open
2 tasks done

FOUC when using style tag with Gatsby Head API #39239

alexey0975 opened this issue Mar 10, 2025 · 0 comments
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@alexey0975
Copy link

Preliminary Checks

Description

When inserting the style tag via Gatsby Head there is a flash of unstyled content (content without style appears for a split second, after which styles are loaded). This effect occurs both when entering the site and when following internal links.

When using react-helmet there is no such effect.

Reproduction Link

https://github.com/alexey0975/Gatsby-Head-API-with-style-tag

Steps to Reproduce

  1. Build the project and open the site
  2. Click Second page

Expected Result

Opening the site and transitions between pages are smooth without style jumps

Actual Result

When opening the site and navigating through the pages there are flashes of unstyled content

Environment

System:
    OS: Windows 11 10.0.26100
    CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz
  Binaries:
    Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.12.0
  Browsers:
    Edge: Chromium (133.0.3065.82)
  npmPackages:
    gatsby: ^5.14.1 => 5.14.1 
    gatsby-plugin-sass: ^6.14.0 => 6.14.0 
  npmGlobalPackages:
    gatsby-cli: 5.14.0

Config Flags

No response

@alexey0975 alexey0975 added the type: bug An issue or pull request relating to a bug in Gatsby label Mar 10, 2025
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

1 participant