This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
deprecating the current usage, and make it follow official CSS Module spec #58
Labels
You can continue the conversation there. Go to discussion →
Here's how the standardized CSS Module spec works:
https://web.dev/css-module-scripts
The import does not return CSS class names, but a CSS style sheet.
It could be possible to provide a utility that gets the class names from the sheet, and even modified the class names in the CSS OM, and it could also be possible to do at build time. With this idea, the default behavior would be as the CSS Module spec, but then some options could be specified to opt into the non-standard behavior.
The standard behavior would be more useful for vanilla custom elements and aligned with future direction of web, but the opt-in CSS name handling could be more useful for systems like React, Preact, Solid.js, etc.
The text was updated successfully, but these errors were encountered: