a way to get the same css behaviour of angular where every component has its own css sheet in solid
how can i get solid to work with angular like components with css or scss angular just does it and allows to write its ts or js in 1 file its html in another and its css in another i would rather have them seperate is it possible in solid and if it is how?
7 Replies
Not sure if I understand the question. Solid has no built in abstraction over css. I mostly use css modules to get scoped css. With css modules you have template (tsx) separated from your css (.module.css)
yes but then you have to add styles. everywhere 🙁
Yes, indeed!
so anyway around it or should i just use gloabl css and be done with it
there are different libraries that can help with scoped styling, but nothing like angular.
https://github.com/lxsmnsyc/solid-styled looks pretty cool. i have always wanted to try it, but never did.
GitHub
GitHub - lxsmnsyc/solid-styled: Reactive stylesheets for SolidJS
Reactive stylesheets for SolidJS. Contribute to lxsmnsyc/solid-styled development by creating an account on GitHub.
i use css-modules, and just go through the pain of importing them via
styles.