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

Better support for portals & CSS-in-JS #3

Open
OlegWock opened this issue Sep 5, 2023 · 1 comment
Open

Better support for portals & CSS-in-JS #3

OlegWock opened this issue Sep 5, 2023 · 1 comment
Assignees

Comments

@OlegWock
Copy link
Owner

OlegWock commented Sep 5, 2023

Currently (because of mutation observer), it's possible to have FOUC when using CSS-in-JS because styles are copied with small delay. It might be good idea to implement custom Sheet and Tag to support multiple targets for injection.

Related:

https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/sheet/Sheet.ts#L78C41-L78C41
https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/sheet/Tag.ts#L5

@OlegWock OlegWock self-assigned this Sep 5, 2023
@OlegWock
Copy link
Owner Author

OlegWock commented Sep 6, 2023

Fixes for styles-components, still need to work on emotion

Probably will need to implement custom cache https://github.com/emotion-js/emotion/blob/main/packages/cache/src/index.js

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