3 ms·
I’m using them in a css-based design tool I’m working on. The “canvas” is inside of an iframe so that I can completely control the styling irrespective of the a
by danielvaughn 5y ago
I’m using them in a css-based design tool I’m working on. The “canvas” is inside of an iframe so that I can completely control the styling irrespective of the application itself.
There are definitely a few scenarios where they are useful.
- ramesh31 5y agoIs there any reason you're not just using shadow DOM?
- danielvaughn 5y agoAfaik that doesn’t solve the problem of global CSS. Whatever framework I use to build the application itself (right now I’m using Tailwind), I don’t want to risk it polluting the canvas itself.
- danielvaughn 5y agoedit: I'd never spent much time looking at shadow dom, but it does appear that you can encapsulate styles with a shadow root. Had no idea - that's really interesting, thanks!