appreciated/card

Theming via @CSSImport ignored

Opened this issue · 3 comments

Hi,

maybe I am doing something stupid but it seems that @CSSImport(..., themeFor="clickable-card") is not applied to the shadow dom. The <style include="<id>"> directive is missing / overwritten by the template JS in the element's shadow dom, the custom style / dom element is present in <head>. I want to use this to theme the content div with a border.

Styling via @CSSImport is currently not supported.

Try the following instead:

Card c ...;
card.getTemplateDiv().getStyle().set("...", "...");

Perfect, works for me. Only using this to mark user-selected items, so traffic is quite low.

So this would rather be nice-to-have I guess. Thanks for your hint.

thigg commented

It would be really nice if this could be fixed, or better documented.
Also, it would be good to have more CSS variables that can be used, e.g. for background-color.