vitonsky / react-elegant-ui

Elegant UI components, made by BEM best practices for react
https://vitonsky.github.io/react-elegant-ui/
Apache License 2.0
2 stars 0 forks source link

Research CSS modules to use on library level #164

Open vitonsky opened 2 years ago

vitonsky commented 2 years ago
vitonsky commented 2 years ago

Profits

Styles isolation

No conflicts with other components. But BEM quite good isolate CSS too

Ability to optimize CSS

We can remove unused CSS.

But actually no, due to dynamic use styles. I mean conditional use and use classes by dynamic names

Ability to analyze CSS

We can check custom CSS properties while compilation


No problem with Next.js

Now, global CSS on library level is not supported on next.js

But this is not problem of library, but problem of next.js design. The impossing a CSS modules/styled components on next.js side is not a reason to refactor library


Looks that CSS modules are useless for this UI kit