Intent to Implement: CSS Modules V1
scripts, e.g. with "cors" mode and using strict MIME type checking. They share the same module import syntax, e.g. import styles from "./styles.css ".
The CSSStyleSheet parsed from the fetched file is provided as the module's single default export, with parse errors checked before instantiating the module graph.
Current solutions for including CSS in component definitions are lacking; they suffer from one or more of the following rough edges:
See GitHub thread here for additional design discussion and use cases: https://github.com/w3c/webcomponents/issues/759
Interoperability and Compatibility
The initial implementation of this feature will be behind an experimental flag. Prior to shipping by default, we’ll confirm support from other browser vendors and drive the standardization of the feature in the HTML spec.
Edge: Public support; Microsoft will drive the Blink implementation.
Firefox: No definite signals
Safari: No signals
The feature will be built on Synthetic Modules as part of the existing module graph infrastructure so we don't expect any new performance issues.
Since the feature shares the existing modules syntax and infrastructure we expect that developers already familiar with ES6 modules will have very little difficulty learning and taking advantage of the feature.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Link to entry on the feature dashboard
Requesting approval to ship?