-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Open
Labels
status: triage neededIssue or pull request that need to be triaged and assigned to a reviewerIssue or pull request that need to be triaged and assigned to a reviewertype: bugAn issue or pull request relating to a bug in GatsbyAn issue or pull request relating to a bug in Gatsby
Description
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
Description
When viewing a website that has a component style calculated based on a media query, the style applied to the element in HTML differs from what was calculated/logged.
The issue is only present when building/serving the site.

The issue does not reproduce when developing the site.

Reproduction Link
https://github.com/karjanme/gatsby-bug
Steps to Reproduce
npm run develop
- Open a web browser with the window width exceeding 900px
- Load the website (http://localhost:8000/)
- The navigation component is displayed (correct)
npm run build & npm run serve
- Open a web browser with the window width exceeding 900px
- Load the website (http://localhost:9000/)
- The navigation component is not visible/displayed (incorrect)
Expected Result
The built/deployed website should show the navigation component on page load when the window width is greater than the min-width in the media query.
Actual Result
The built/deployed website does not show the navigation component on page load when the window width is
Environment
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
Binaries:
Node: 22.15.0 - C:\DevTools\NodeJS\v22.15.0\node.EXE
Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
npm: 11.3.0 - C:\DevTools\NodeJS\v22.15.0\npm.CMD
Languages:
Python: 3.12.2
Browsers:
Edge: Chromium (127.0.2651.74)
npmPackages:
gatsby: ^5.15.0-next.2 => 5.15.0-next.2
npmGlobalPackages:
gatsby-cli: 5.13.3Config Flags
NONE
Metadata
Metadata
Assignees
Labels
status: triage neededIssue or pull request that need to be triaged and assigned to a reviewerIssue or pull request that need to be triaged and assigned to a reviewertype: bugAn issue or pull request relating to a bug in GatsbyAn issue or pull request relating to a bug in Gatsby