styled-components / xstyled

A utility-first CSS-in-JS framework built for React. 💅👩‍🎤⚡️
https://xstyled.dev
MIT License
2.27k stars 106 forks source link

Fela js backend for the library #312

Closed joseDaKing closed 2 years ago

joseDaKing commented 2 years ago

🚀 Feature Proposal

Is it possible to use a Fela js backend for this library?

Motivation

If Fela js can be used for this library, it would reduce the amount of CSS used because it is an Atomic CSS library

Example

Most of the code would not change, people would use the library as regularly

Pitch

To be honest, I don't know if it would be a good idea because the Fela js uses atomic which comes with drawbacks, the drawback is the CSS selector must be a class selector which means utilities like space between (spaceX, spaceY) and divide would not work as expected.

If you think it is a bad idea, then I would try to write my own utility on top of Fela js and take inspiration from this library.

gregberge commented 2 years ago

Hi @joseDaKing, Fela is not popular enough to be integrated as a backend in xstyled.

But @xstyled/system is very low level, I think it could be used with Fela without any problem.