Hi, Is there a way to specify CSS for the template by loading a CSS resourc

Hi,
Is there a way to specify CSS for the template by loading a CSS resource?

It could be added as the first part of the convertAndAppend(...) method:

Element styleElement = new Element("style");
// style: Need to get it from some CSS input stream
String style = "h1.test { background: yellow; }";
styleElement.setText(style);
flowNode.appendChild(styleElement);
...

Another alternative could be to add the template contents to the light DOM of the host component instead of inside an encapsulating shadow root.

That could most likely be done by changing

convertAndAppend(document.body(), getElement().attachShadow(), idMap::put);

to

convertAndAppend(document.body(), getElement(), idMap::put);

I feel that the shadow DOM idea is better because the CSS coder will not mess up the styles of other parts of the application.