manolakis / scoped-registries

Scoped Custom Element Registry Polyfill
4 stars 2 forks source link

`@font-face` CSS rules breaks polyfill #16

Open guillemcordoba opened 3 years ago

guillemcordoba commented 3 years ago

Hi :) me again,

Font-face type CSS rules breaks the adoptedStyleSheet API, with this error:

cssTransform.js:163 Uncaught TypeError: Cannot read property 'length' of undefined
    at cssTransform (cssTransform.js:163)
    at polyfillShadowRoot.js:93
    at Array.map (<anonymous>)

Tried to make a PR bypassing the transformation of the CSS rule but bumped into some other issue.

I'm on Chromium, reproduction here: https://github.com/guillemcordoba/scoped-registries/tree/reproduction

guillemcordoba commented 3 years ago

Also FYI, I've created a little mixin to make it easier to work with LitElement: https://github.com/guillemcordoba/scoped-element-mixin