News for hackers. Stuff that matters.
Re:Chakra UI – Modular and accessible UI components for Reac... by shripadk on Sunday June 14, 2020 @12:13PM (#23518861)
> My example takes 8LOC of customization. Yours use 45LOC. That matches my experience with customizing styles on larger project, Chakra is 80% simpler to customize.

Since your contention was the LOC and ability to use nested CSS styles, I have taken your own example and matched it. Line to line. Using Material UI. Updated the above demo:

https://codesandbox.io/s/material-demo-d2vmn?file=/demo.js:1...

8 LOC of customization. Same styles you applied to your demo with a few syntactic changes.

Hope this convinces you that you can do exactly the same thing in Material UI as you can in Chakra. Because both use CSS-in-JS. What you can't do in Chakra is ability to change styles of nested components (note I am saying components instead of HTML elements) without worrying about implementation detail.

There are no comments on this comment yet.