-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CSS Module Scripts feature #954
Conversation
@@ -0,0 +1,9 @@ | |||
name: CSS module scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we've used the term "JavaScript module" for the JS counterpart, but I chose to use the "scripts" suffix here because there was a lot of discussion around this name in the feature proposal originally: WICG/webcomponents#843
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want consistency, we could perhaps rename JS modules to "JavaScript module scripts" to match https://html.spec.whatwg.org/multipage/webappapis.html#module-script. But consistency isn't everything...
- https://chromestatus.com/metrics/feature/timeline/popularity/3805 | ||
compat_features: | ||
- javascript.statements.import | ||
- javascript.statements.import.import_attributes.type_css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also the old import assertion syntax, but that's deprecated. So I think this is the right BCD key to use here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, and if it's deprecated in BCD you'll get a warning that the feature can never be Baseline.
status: | ||
baseline: false | ||
support: | ||
chrome: "123" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://chromestatus.com/feature/5948572598009856 says Chrome 93, is that wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that's when the old assertion syntax (assert
) got added. Since the new syntax relies on import attributes instead (with
), I think 123 is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. It's akin to the feature being supported with another name or with a prefix, which we don't count as supported for web-features.
This PR adds a new feature to the repo for CSS Module Scripts.