4 ms·
One thing I've come to like with CSS-in-JS is the ability to define a CSS API. For example the MUI Select component https://material-ui.com/api/select/#css http
by arenaninja 7y ago
One thing I've come to like with CSS-in-JS is the ability to define a CSS API. For example the MUI Select component https://material-ui.com/api/select/#css https://material-ui.com/api/select/#css it's a non-trivial amount of customization you can add (and you can define your own). As Chyzwar said in his post, this allows theming of custom components making it almost trivial for developers
I do think it's possible to have too much of a good thing, but for the most part I've seen developers ill-define a CSS API (with no easy way to override) which then becomes messy with !important all over the place. I do wish CSS blocks from LinkedIn (https://css-blocks.com/ https://css-blocks.com/) had better support and adoption because I thought it looked promising. I may even try it on a project soon since my new employer doesn't have an onerous on what I do during my free time