#Ecsstatic - CSS in JS library (vite powered, compile-time & scoped css support)

1 messages · Page 1 of 1 (latest)

atomic wave
#

A remix community member (couldn't find him on discord) recently created this compile time CSS in JS library;
Its the API I've wanted to use in my own Remix apps remix

What do you think about this style of CSS in JS?
https://www.ecsstatic.dev/

ecsstatic

A fully static CSS-in-JS solution that does just enough.

atomic wave
#

Questions I got from friend (italics)

I feel like people use CSS-in-JS solutions for the ability to leverage a type-safe theme, but this doesn’t offer that.

Yeah if you’re using a design system something that has type safety makes sense - good point. If you’re using an existing framework (MUI, ant design etc) I can see this being useful for layout
The last 2 company’s I worked at used a React component framework (MUI, currently ant design at current company)

why would I use this instead of CSS modules or Sass modules?
IMO they are an alternative - you can colocate your styles with your components like Svelte/Vue/Astro

forest compass
#

Cool api. Can it be used with remix yet ?

atomic wave
#

I don't think in its current state
mostly because it designed for projects using Vite as their bundler

Maybe in the future once Remix is stablized, I gope the team revisits Vite 🤞

at least CSS modules and vanilla extract are options in remix apps now tho