-
Notifications
You must be signed in to change notification settings - Fork 15
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
[svelte] Reshadow + Svelte SSR Styles #32
Comments
Another suggestion for runtime performance: cache all styles for re-use and inject CSS using .insertRule() |
Hi @s0kil, thank you very much for the request! Yeah, I think it's really important to extract styles also with So I think I'll have a chance to make it today/tomorrow And thank you for the link to the I also thought about But I think about runtime mixins too and how they could be extracted and optimized, and mixins implementation probably should be with CSSOM |
@s0kil, I've made some benchmarks comparing with and the difference on 100 boxes is quite big (ms):
I think that there are some things that could be optimized in the example for |
@lttb Looks great, but we still got to get them static styles out of the JavaScript bundle. |
When reshadow processes styles, they no longer are extracted to a css file, instead are evaluated by JavaScript at runtime.
Ex runtime styles:
It would be ideal to return static styles in a
style
tag so Svelte could export them into a CSS file, and Reshadow will process dynamic styles at runtime.Ex static styles:
The text was updated successfully, but these errors were encountered: