Hacker News new | past | comments | ask | show | jobs | submit login

I fail to understand this criticism. React Components expose a class hierarchy which can be namespaced well by their designers (if Antd isn't already doing this). Extending / theming with your specific CSS pre-processor is then pretty straightforward.



Doing it this way requires overriding every single built-in rule that uses the property you're trying to override… including states like :hover, :before, :disabled, :disabled and :hover, etc which can be easy to miss.

I've had some success with simple find & replace preprocessor but this gets complicated if the CSS uses colour manipulation functions e.g. color: color(var(--color-base) tint(50%)), then you're basically going to be re-implementing their whole stylesheet again.

Also, good luck making sure everything still works if and when the components are updated.

Ideally, you alter theme variables in one place, rather than finding and overriding them everywhere they're applied.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: