Replies: 2 comments
-
That |
Beta Was this translation helpful? Give feedback.
0 replies
-
@trusktr after some investigation I found that import assertion has been deprecated and there's another propsal using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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.
Beta Was this translation helpful? Give feedback.
All reactions