Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SolidJS: migrate css prop solution to solid-styled #947

Open
samijaber opened this issue Dec 7, 2022 · 5 comments
Open

SolidJS: migrate css prop solution to solid-styled #947

samijaber opened this issue Dec 7, 2022 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers solid Solid.js

Comments

@samijaber
Copy link
Contributor

Migrate our approach for the css prop in the SolidJS generator from using https://github.com/solidjs/solid-styled-components to using https://github.com/lxsmnsyc/solid-styled (as recommended by some folks in the SolidJS Community)

@samijaber samijaber assigned samijaber and unassigned samijaber Dec 7, 2022
@samijaber samijaber added enhancement New feature or request good first issue Good for newcomers solid Solid.js labels Dec 7, 2022
@akshatgarg12
Copy link
Contributor

Hey @samijaber, I would like to contribute to this.
I found this line , is responsible for importing the css wrapper from solid-styled-components, which needs to change to make the migration happen and we are injecting css into the component here using the style tag, does the css string also needs to be changed for it to work?

(Sorry for the newbie questions, just needed a heads up if this is the correct approach)

@samijaber
Copy link
Contributor Author

@akshatgarg12 I haven't had time to look: I am not familiar with the difference between both, so we'd need to read up the docs/API of both and see if there are differences between them, and go from there.

I actually also see that solid-styled requires Babel https://github.com/lxsmnsyc/solid-styled#babel, which would be an extra thing to setup for the SolidJS output to work properly. That does make me wonder if we should commit to it, although it sounds like this is the direction the SolidJS community is exploring...

@birkskyum
Copy link

birkskyum commented Oct 12, 2023

Note to anyone who'll look into this. If possible, make the solution work on Solid components class="" rather than className="", because className quite likely could go away in future versions. Setups like clsx might come in handy.

@Syed-Bilal-Haider-Engineer

Please assign me, I will migrate css props to solid-styled. thanks

@samijaber
Copy link
Contributor Author

@Syed-Bilal-Haider-Engineer go for it!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request good first issue Good for newcomers solid Solid.js
Projects
None yet
Development

No branches or pull requests

4 participants