CSS Module Scripts

Open
#1,466 3 comments 36 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
css, javascript

Research direction

The issue is about adding CSS Module Scripts to the Interop project. Start by reading the specification link and the web-feature page to understand the feature. Review the existing test results at the provided WPT link. The work involves updating test suites or documentation in the web-platform-tests/interop repository. Check the linked prior proposals for context. 'Done' means the feature is correctly represented in the project's tracking.

Written by the indexing model from the issue text.

Description

focus-area-proposal
Description

CSS module scripts allow a CSS file to be imported as a constructable stylesheet using the JavaScript module import syntax:

import styleSheet from "./styles.css" with { type: "css" };
documentOrStyleSheet.adoptedStyleSheets = [styleSheet];

Shipped in Chromium and Gecko, not in WebKit.

Specification

https://html.spec.whatwg.org/multipage/webappapis.html#creating-a-css-module-script

web-feature

https://web-platform-dx.github.io/web-features-explorer/features/css-modules/

Test Links

https://wpt.fyi/results/html/semantics/scripting-1/the-script-element/css-module

Additional Signals

This has been proposed 4 times for prior versions of Interop (once by me, 3 times by others):
2026: https://github.com/web-platform-tests/interop/issues/1056
2025: https://github.com/web-platform-tests/interop/issues/703
2024: https://github.com/web-platform-tests/interop/issues/597
2023: https://github.com/web-platform-tests/interop/issues/206
Lots of positive reactions on those threads (and negative reactions to the rejections) in the past couple years.

Dominant language
JavaScript
Stars
591
Forks
39
Avg merge
3h 8m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web-platform-tests/interop

All issues in web-platform-tests/interop

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.