I am a Widget Building Man. I bulid widgets. All my widgets are custom elements. Each of my elements has a shadow tree that contains styles.
Situation 1: My widgets share the same set of styles, which makes them consistent and awesome. I keep this set of styles in awesome.css
.
Situation 2: Some of my widgets have styles that are long and boring. I want to split them into a separate file, instead of using the style
element.
In both situations:
- What's the easy-peasy HTML syntax for doing this?
- There's a distinct FOUC moment between instantiating the widget's shadow tree and the styles being available. How do I control that?