Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research CSS modules to use on library level #164

Open
5 tasks
vitonsky opened this issue May 24, 2022 · 1 comment
Open
5 tasks

Research CSS modules to use on library level #164

vitonsky opened this issue May 24, 2022 · 1 comment
Labels
important question Further information is requested

Comments

@vitonsky
Copy link
Owner

  • What's profits?
  • Research problems
  • How to express BEM approach and use modifiers as in cn library?
  • How to override styles in high level components?
  • What about selectors rely on inner selectors? Example: .Menu ~ .Button. Should we forward class name hooks?
@vitonsky vitonsky added question Further information is requested important labels May 24, 2022
@vitonsky
Copy link
Owner Author

vitonsky commented May 27, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
important question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant