polyfills icon indicating copy to clipboard operation
polyfills copied to clipboard

[ShadyCSS] Integration with Lit/HyperHtml - Dynamic Class Interpolation

Open egucciar opened this issue 7 years ago • 3 comments

We discovered an issue today in our application where we use hyperHtml and shadyCss extensively and successfully. We used a variable that changes dynamically over time to apply a class to a dom Element. When the class is updated, ShadyCSS styles are unfortunately cleared off.

My question here is - how do i force shadyCSS to re-apply styles to an element it thinks it has styled? I have tried the suspects - styleElement, styleSubtree and styleDocument but I believe there has to be some mechanism preventing shadyCSS from restyling certain elements. Any ideas what we could do better or differently here?

Our current workaround is not to use hyperHtml interpolation to set classes in the instance we discovered it, but we are wondering how this can be handled on a larger scale

egucciar avatar Jul 24 '18 21:07 egucciar