ProjectEvergreen / wcc

Experimental native Web Components compiler.
https://merry-caramel-524e61.netlify.app
90 stars 7 forks source link

Support Constructable Stylesheets (CSS Modules) in DOM Shim #152

Closed thescientist13 closed 7 months ago

thescientist13 commented 7 months ago

Summary

Now that Import Attributes are a thing, including CSS Modules as Constructable Stylesheets, it would be good to get some basic support for this into the DOM Shim at least in some capacity.

Something at minimum like, that can shim part of the CSSStyleSheet class

class CSSStyleSheet {
  constructor() { }
  replace() { }
  replaceSync() { }
}

Details

This would help support projects like Greenwood in supporting features like being able to author using Import Attributes - https://github.com/ProjectEvergreen/wcc/issues/153