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

I would like to see more documentation about how to accomplish some of the benefits of web components with Riot.js, such as the ability to style your custom components without having those styles influenced by the host page's CSS and the ability to selectively theme nested elements with things like /deep/ and ::shadow.


Currently styling is outside Riot's responsibility. Shadow elements are not supported enough on browsers and require too much polyfilling.

Also not sure about component- based styling in general. I think that CSS should be controlled separately <-- highly personal opinnion.


Your whole point about polyfilling really avoids the issue that web components/Polymer is trying to address. Of course polyfilling is needed now for that, but until we have it, we won't have truly reusable web components, and claiming Riot can substitute Polymer is therefore a pretty big bait and switch, cool though Riot.js may be.


I would say that Riot does very much what Polymer is trying to address - which is custom tags.

The implementation and syntax is different so it's not a drop- in replacement, but both have similar goals.


It would still be good for you to address this concern in your documentation since you claim that it's a replacement for Polymer. I would suggest providing a few examples of how one might accomplish CSS isolation on their own in a way that is 'good enough' for real-world use.


Also the ability to easily broadcast events up and down the component hierarchy.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: