Skip to content
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

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Add CSS Module Scripts feature #954

merged 2 commits into from
Apr 24, 2024

Conversation

captainbrosset
Copy link
Contributor

This PR adds a new feature to the repo for CSS Module Scripts.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Apr 24, 2024
@@ -0,0 +1,9 @@
name: CSS module scripts
Copy link
Contributor Author

@captainbrosset captainbrosset Apr 24, 2024

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

Copy link
Collaborator

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
Copy link
Contributor Author

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.

Copy link
Collaborator

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"
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

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.

@foolip foolip merged commit 2bbf011 into main Apr 24, 2024
3 checks passed
@foolip foolip deleted the css-modules branch April 24, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants