Built-in, single file, scoped CSS #1910
Replies: 2 comments 3 replies
-
Scoped CSS is out of the scope of Solid (pun intended). |
Beta Was this translation helpful? Give feedback.
-
The way of approaching CSS in Svelte and Vue is really nice imo. By contrast React has a confusing and overwhelming amount of CSS-in-JS options. Solid is a framework for building UI and CSS is an intrinsic part of a UI so it should have a default styling story. Emotion/Styled Components etc have a runtime. AFAIK the built-in CSS approach of Vue and Svelte has no runtime, which is the approach that Solid should take. There is a lot of value in being a "batteries included" framework and having an officially maintained approach. I don't dislike Tailwind but saying "just use Tailwind" isn't good enough imo. |
Beta Was this translation helpful? Give feedback.
-
One of the great improvements Vue brought over React is the built-in scoped CSS. You don't need any external libraries but SASS.
I'm aware that Solid plays well with Vite's CSS modules support. This is great when you have large CSS code, but it's too much when you just need 1 or 2 styles.
So...
I wonder if something like this could be baked into Solid:
Beta Was this translation helpful? Give feedback.
All reactions