typicode / mistcss

Create React visual components without JavaScript or TypeScript. Leverage native HTML and CSS. It's an alternative to CSS-in-JS and CSS modules.
MIT License
859 stars 25 forks source link

Sass support #32

Closed The-Code-Monkey closed 7 months ago

The-Code-Monkey commented 7 months ago

@typicode what are your thoughts on sass support I was looking to add it would this be ok?

The-Code-Monkey commented 7 months ago

There are two ways we could support sass one we keep the sass file and import that into the built component,

Or we could convert the sass to CSS and then import that. But that would mean keeping a sass and a CSS file in the directory

typicode commented 7 months ago

Hi @The-Code-Monkey,

I'm kind of satisfied with the way MistCSS works currently so I'd rather not change code too much and gather feedback first before adding more features. I have some ideas as well but I need a bit time to play with them.

Also I plan to work on the documentation a bit more.

For Sass, I'd go with the second option and do it the Remix way: https://remix.run/docs/en/main/styling/postcss#css-preprocessors

So adding a section to how to and have sass convert from .mist.scss to .mist.css then mistcss would pick from there would be the simplest option without changing how MistCSS currently works.

The-Code-Monkey commented 7 months ago

Yeah fair enough I'll close this ticket.