Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

plus it's called "cascading style sheets". you're going against the current if everything wants to be so specific. This is one of my gripes with styled components.. it makes it easy to forget the power of cascading rules!


I think that forgetting the power of the cascade is part of the point, maybe the main point.


For me, forgetting the cascade has nothing to do with it; in my use cases, styled-components is all about:

- eliminating the chance of colliding CSS class names when composing multiple micro-clients together

- simplifying builds, especially cascading builds (library + client). It's nice when styles are covered entirely by the JS build (no separate CSS/SCSS input or output files or separate build pipelines).

Yes, there are other complexities/problems that styled-components adds (including the likelihood that devs will forget about the cascade)... so I wouldn't recommend it for every case. But it does have its place.


... but if you're nesting styled components, you'd better not forget about the cascade :-)




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

Search: