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

> I thought with inheritance you meant generic styles on elements like "p", "ul", etc... getting applied across separate components

Yes, so I mean if you add "color: blue" to "p", it's now going to start interacting with any element that's a child of "p" (which will probably be on all pages on your website so hard to predict and check what will happen).

BEM and Tailwind don't get rid of the behaviour of the color being applied to child elements, but it at least forces you to isolates these kinds of style changes to the component level (vs sitewide) which is what improves maintainability.



Okay, we are on the same page then -- sorry. Yep, I generally agree with this.




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

Search: