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

Duplicated CSS rule in devloop if using SSR #1531

Open
liamqma opened this issue Oct 19, 2023 · 0 comments
Open

Duplicated CSS rule in devloop if using SSR #1531

liamqma opened this issue Oct 19, 2023 · 0 comments

Comments

@liamqma
Copy link
Collaborator

liamqma commented Oct 19, 2023

Describe the bug
Duplicated CSS rule in devloop if using SSR

To Reproduce

  1. Checkout the master branch
  2. run yarn run start:ssr
  3. Go localhost:3000
  4. See ._1wyb1osq { font-size:100% } is defined twice

Screenshot 2023-10-19 at 11 24 20 am

Expected behavior
CSS rule should be defined once

Additional context
Compiled moves all found server-side rendered style elements to the head: https://github.com/atlassian-labs/compiled/blob/master/packages/react/src/runtime/style-cache.tsx#L23
Also, insert style again https://github.com/atlassian-labs/compiled/blob/master/packages/react/src/runtime/style.tsx#L63
It causes same CSS being inserted to DOM twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant