DEV Community

Discussion on: A Typewriter, but using a New HTML Tag

Collapse
 
auroratide profile image
Timothy Foster

Ah yes I did think about this; normally web components define styles in the shadow dom for encapsulation, but I found I couldn't do that here since the characters live in the light dom.

In theory the define.js script could create a style node itself, but in the end I decided to let the developer decide how/when to import the stylesheet, since the preference can differ from app to app.