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

Is it possible to optimize style.text to be like style_text? #251

Open
mokeyish opened this issue May 15, 2023 · 3 comments
Open

Is it possible to optimize style.text to be like style_text? #251

mokeyish opened this issue May 15, 2023 · 3 comments

Comments

@mokeyish
Copy link

mokeyish commented May 15, 2023

When using tailwindcss/unocss, there are places where styles are duplicated, so this way is needed to reference duplicated styles.

Is it possible to optimize style.text to be like style_text?

The reproduce code:

https://playground.solidjs.com/anonymous/4d3dfcf1-136f-4a7c-ba38-1cdfa8418e9f

@ryansolid
Copy link
Owner

Not easily.. or rather it would require resolution. I suppose we could try but keep in mind . heuristics matter for possible reactive wrapping since getters/proxies. Even if we could optimize this case where everything is inlined like that it would drop back as soon as it was in another file.

@mokeyish
Copy link
Author

Thanks for your explaination. Maybe it needs something like /*@once*/ to mark it non-reactive.🤣

@intrnl
Copy link
Contributor

intrnl commented Nov 2, 2023

Still not inline-able in the template, but #283 should at least address not having to wrap namespace imports under effects, the only tradeoff being that you'd have to author these classes in a separate file.

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

3 participants