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

fix(gatsby): Support inline styles on html/body for Head API #38098

Merged
merged 9 commits into from
May 22, 2023

Conversation

LekoArts
Copy link
Contributor

@LekoArts LekoArts commented May 17, 2023

Description

When you use inline styles React's renderToString converts the styles to strings and when we then apply those styles inside head-export-handler-for-ssr.js it'll throw because JSX requires object style.

For this we'll use https://github.com/remarkablemark/style-to-object.

On the client we needed to concatenate style rules together.

Documentation

Docs already state that this should work

Tests

Integration & E2E tests were added

Related Issues

Fixes #38097

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label May 17, 2023
@LekoArts LekoArts added topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels May 17, 2023
@LekoArts LekoArts marked this pull request as ready for review May 17, 2023 14:30
@LekoArts LekoArts merged commit ccbbda5 into master May 22, 2023
1 check failed
@LekoArts LekoArts deleted the head-inline-style branch May 22, 2023 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine)
2 participants