From 2545d37dac24b9cb6590d7d6716a96f0217eb551 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 24 Oct 2025 15:01:02 +1100 Subject: [PATCH 1/2] FF145 Relnote/Expr: CSS Module Scripts --- .../firefox/experimental_features/index.md | 16 +++++++++++++++- .../en-us/mozilla/firefox/releases/145/index.md | 4 ++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/files/en-us/mozilla/firefox/experimental_features/index.md b/files/en-us/mozilla/firefox/experimental_features/index.md index 02eeb08b746c391..8e3ba02a03f98af 100644 --- a/files/en-us/mozilla/firefox/experimental_features/index.md +++ b/files/en-us/mozilla/firefox/experimental_features/index.md @@ -356,7 +356,21 @@ The {{CSSXRef(":heading")}} pseudo-class allows you to style all [heading elemen ## JavaScript -**No experimental features in this release cycle.** +### CSS module scripts + +CSS module scripts are now supported, allowing a stylesheet to be loaded into a script as a {{domxref("CSSStyleSheet")}} instance using the [`import`](/en-US/docs/Web/JavaScript/Reference/Statements/import) statement. +The `import` statement must also specify the `type` [import attribute](/en-US/docs/Web/JavaScript/Reference/Statements/import/with) and set it to `"css"`, and the stylesheet must be served with the MIME type of `text/css`. +([Firefox bug 1720570](https://bugzil.la/1720570)). + +| Release channel | Version added | Enabled by default? | +| ----------------- | ------------- | ------------------- | +| Nightly | 145 | No | +| Developer Edition | No | No | +| Beta | No | No | +| Release | No | No | + +- `layout.css.module-scripts.enabled` + - : Set to `true` to enable. ## APIs diff --git a/files/en-us/mozilla/firefox/releases/145/index.md b/files/en-us/mozilla/firefox/releases/145/index.md index fa5a560c74a4e4c..030e3e72cd44e17 100644 --- a/files/en-us/mozilla/firefox/releases/145/index.md +++ b/files/en-us/mozilla/firefox/releases/145/index.md @@ -110,3 +110,7 @@ You can find more such features on the [Experimental features](/en-US/docs/Mozil Nightly builds now support [CSS anchor positioning](/en-US/docs/Web/CSS/CSS_anchor_positioning) by default, which allows you to tether elements together. The anchor-positioned elements can then have their size and position set relative to the size and location of the anchor elements to which they are bound. (General: [Firefox bug 1988224](https://bugzil.la/1988224), `position-area`: [Firefox bug 1924086](https://bugzil.la/1924086)). + +- **CSS module scripts:** (Nightly) and `layout.css.module-scripts.enabled`. + + CSS module scripts are now supported, allowing a stylesheet to be loaded into a script as a {{domxref("CSSStyleSheet")}} instance using the [`import`](/en-US/docs/Web/JavaScript/Reference/Statements/import) keyword and the [`type` import attribute](/en-US/docs/Web/JavaScript/Reference/Statements/import/with) set to `type="css"`. ([Firefox bug 1720570](https://bugzil.la/1720570)). From 7dbef9a2b67c2178dd5347a20c72e46f82d22834 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 31 Oct 2025 11:38:01 +1100 Subject: [PATCH 2/2] Update files/en-us/mozilla/firefox/experimental_features/index.md Co-authored-by: Brian Smith --- files/en-us/mozilla/firefox/experimental_features/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/mozilla/firefox/experimental_features/index.md b/files/en-us/mozilla/firefox/experimental_features/index.md index 8e3ba02a03f98af..f19f83fd9fe1a21 100644 --- a/files/en-us/mozilla/firefox/experimental_features/index.md +++ b/files/en-us/mozilla/firefox/experimental_features/index.md @@ -359,7 +359,7 @@ The {{CSSXRef(":heading")}} pseudo-class allows you to style all [heading elemen ### CSS module scripts CSS module scripts are now supported, allowing a stylesheet to be loaded into a script as a {{domxref("CSSStyleSheet")}} instance using the [`import`](/en-US/docs/Web/JavaScript/Reference/Statements/import) statement. -The `import` statement must also specify the `type` [import attribute](/en-US/docs/Web/JavaScript/Reference/Statements/import/with) and set it to `"css"`, and the stylesheet must be served with the MIME type of `text/css`. +The `import` statement must also specify the `type` [import attribute](/en-US/docs/Web/JavaScript/Reference/Statements/import/with) and set it to `"css"`, and the stylesheet must be served with the [media type](/en-US/docs/Web/HTTP/Guides/MIME_types) of `text/css`. ([Firefox bug 1720570](https://bugzil.la/1720570)). | Release channel | Version added | Enabled by default? |