Re: [w3c/webcomponents] CSS Modules (#759)

To add a few more constructive comments, I would wish that this specification would be feature equivalent to ICSS modules, i.e. if I try to port from ICSS modules to "native stylesheet modules" (or whatever we call it), I wouldn't get "stuck" on major missing features.

1. Work out a server-side polyfill library that supports scoping for CSS modules without client-side JS with solid bundling support. I anticipate that this will be hard, at least as hard as figuring out what to do with `@import`, and that the problems that the library implementor will encounter will/would inform even this specification as well as whatever CSS Modules V2 would look like.
2. That may be too much to ask, but as a compromise, at least work out a polyfill intended for use with SSR that could render scoped CSS modules with an extremely tiny JS payload in the `<head>` of the document.
3. Provide a way to import (and tree-shake!) individual classes/rules from a big stylesheet. That will be especially important if, in V1, users will have no way to `@import`, because then I'll have to pre-resolve the `@import`s into a big giant CSS file; including only the rules I actually need will be way more important.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/759#issuecomment-520596771

Received on Monday, 12 August 2019 21:11:01 UTC