Facebook's stylex might also be interesting to you. No idea when (if ever) they will release it, but one thing it does is compile all the css down to atomic classes
https://www.infoq.com/news/2020/04/facebook-cssinjs-react-co...
https://www.infoq.com/news/2020/04/facebook-cssinjs-react-co...