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 duplicate styles when Components are used multiple times #4

Closed
3 tasks done
wakaztahir opened this issue Oct 23, 2023 · 0 comments
Closed
3 tasks done

Fix duplicate styles when Components are used multiple times #4

wakaztahir opened this issue Oct 23, 2023 · 0 comments

Comments

@wakaztahir
Copy link
Contributor

wakaztahir commented Oct 23, 2023

  • Method 1 : Fix by caching styles on server side

    • Unique hash string map method doesn't work
    • Can't figure out how to mount a child once and ignore multiple invocations
  • Method 2 : Fix by extracting styles (Very hard & time consuming)

    • Find the usages of styled
    • Hash & extract the CSS styles
    • Give unique class name to component along with user given class name
    • Styles after being hashed should be put into document or include it as a File (head or body)
    • Once done, support styled options & withComponent
    • Support Global Styles
@wakaztahir wakaztahir changed the title Compile Time Typescript Transformer for CSS In JS Fix duplicate styles when Components are used multiple times Oct 26, 2023
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