S
SolidJS3w ago
Aozen

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
bigmistqke
bigmistqke2w ago
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)
Aozen
AozenOP2w ago
yes but then you have to add styles. everywhere 🙁
bigmistqke
bigmistqke2w ago
Yes, indeed!
Aozen
AozenOP2w ago
so anyway around it or should i just use gloabl css and be done with it
bigmistqke
bigmistqke2w ago
there are different libraries that can help with scoped styling, but nothing like angular.
bigmistqke
bigmistqke2w ago
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.
bigmistqke
bigmistqke2w ago
i use css-modules, and just go through the pain of importing them via styles.

Did you find this page helpful?