@@ -428,7 +408,7 @@ If you like _lots_ of features and your editor is slowing down because of all yo
- [Aptana Studio](https://www.axway.com/en/aptana)
- [Eclipse](https://www.eclipse.org/)
- [Komodo IDE](https://www.activestate.com/products/komodo-ide/)
-- [NetBeans IDE](https://netbeans.apache.org//)
+- [NetBeans IDE](https://netbeans.apache.org/)
- [Visual Studio](https://visualstudio.microsoft.com/)
- [WebStorm](https://www.jetbrains.com/webstorm/)
diff --git a/files/en-us/learn/common_questions/tools_and_setup/how_much_does_it_cost/index.md b/files/en-us/learn/common_questions/tools_and_setup/how_much_does_it_cost/index.md
index 77d4661f8fbeff3..615986cfee0b38a 100644
--- a/files/en-us/learn/common_questions/tools_and_setup/how_much_does_it_cost/index.md
+++ b/files/en-us/learn/common_questions/tools_and_setup/how_much_does_it_cost/index.md
@@ -46,7 +46,7 @@ When launching a website, you may spend nothing, or your costs may go through th
You likely have a text editor: such as, Notepad on Windows, Gedit on Linux, TextEdit on Mac. You'll have an easier time writing code if you choose an editor that color-codes, checks your syntax, and assists you with code structure.
-Many editors are free, for example [Brackets](https://brackets.io/), [Bluefish](https://bluefish.openoffice.nl/index.html), [TextWrangler](https://www.barebones.com/products/textwrangler/), [Eclipse](https://www.eclipse.org/), [Netbeans](https://netbeans.apache.org//), and [Visual Studio Code](https://code.visualstudio.com/). Some, like [Sublime Text](https://www.sublimetext.com/), you can test as long as you like, but you're encouraged to pay. Some, like [PhpStorm](https://www.jetbrains.com/phpstorm/), can cost between a few dozen and 200 dollars, depending on the plan you purchase. Some of them, like [Microsoft Visual Studio](https://visualstudio.microsoft.com/), can cost hundreds, or thousands of dollars; though Visual Studio Community is free for individual developers or open source projects. Often, for-pay editors will have a trial version.
+Many editors are free, for example [Brackets](https://brackets.io/), [Bluefish](https://bluefish.openoffice.nl/index.html), [TextWrangler](https://www.barebones.com/products/textwrangler/), [Eclipse](https://www.eclipse.org/), [Netbeans](https://netbeans.apache.org/), and [Visual Studio Code](https://code.visualstudio.com/). Some, like [Sublime Text](https://www.sublimetext.com/), you can test as long as you like, but you're encouraged to pay. Some, like [PhpStorm](https://www.jetbrains.com/phpstorm/), can cost between a few dozen and 200 dollars, depending on the plan you purchase. Some of them, like [Microsoft Visual Studio](https://visualstudio.microsoft.com/), can cost hundreds, or thousands of dollars; though Visual Studio Community is free for individual developers or open source projects. Often, for-pay editors will have a trial version.
To start, we suggest trying out several editors, to get a sense of which works best for you. If you're only writing simple {{Glossary("HTML")}}, {{Glossary("CSS")}}, and {{Glossary("JavaScript")}}, go with a simple editor.
@@ -64,7 +64,7 @@ You can use any of them, as they will have similar functionality, though some ar
If you want to include video or audio into your website, you can either embed online services (for example YouTube, Vimeo, or Dailymotion), or include your own videos (see below for bandwidth costs).
-For audio files, you can find free software ([Audacity](https://www.audacityteam.org/), [Wavosaur](https://www.wavosaur.com/)), or paying up to a few hundred dollars ([Sound Forge](https://www.magix.com/us/music-editing/sound-forge/), [Adobe Audition](https://www.adobe.com/products/audition.html)). Likewise, video-editing software can be free ([PiTiVi](https://www.pitivi.org/), [OpenShot](https://www.openshot.org/) for Linux, [iMovie](https://www.apple.com/imovie/) for Mac), less than $100 ([Adobe Premiere Elements](https://www.adobe.com/products/premiere-elements.html)), or several hundred dollars ([Adobe Premiere Pro](https://www.adobe.com/products/premiere.html), [Avid Media Composer](https://www.avid.com/media-composer), [Final Cut Pro](https://www.apple.com/final-cut-pro/)). The software you received with your digital camera may cover all your needs.
+For audio files, you can find free software ([Audacity](https://www.audacityteam.org/), [Wavosaur](https://www.wavosaur.com/)), or paying up to a few hundred dollars ([Sound Forge](https://www.magix.com/us/music-editing/sound-forge/), [Adobe Audition](https://www.adobe.com/products/audition.html)). Likewise, video-editing software can be free ([PiTiVi](https://www.pitivi.org/), [OpenShot](https://www.openshot.org/) for Linux, [iMovie](https://support.apple.com/imovie) for Mac), less than $100 ([Adobe Premiere Elements](https://www.adobe.com/products/premiere-elements.html)), or several hundred dollars ([Adobe Premiere Pro](https://www.adobe.com/products/premiere.html), [Avid Media Composer](https://www.avid.com/media-composer), [Final Cut Pro](https://www.apple.com/final-cut-pro/)). The software you received with your digital camera may cover all your needs.
### Publishing tools
diff --git a/files/en-us/learn/common_questions/tools_and_setup/set_up_a_local_testing_server/index.md b/files/en-us/learn/common_questions/tools_and_setup/set_up_a_local_testing_server/index.md
index 2dcc6a5401ef704..df5e6c132cea28d 100644
--- a/files/en-us/learn/common_questions/tools_and_setup/set_up_a_local_testing_server/index.md
+++ b/files/en-us/learn/common_questions/tools_and_setup/set_up_a_local_testing_server/index.md
@@ -70,7 +70,7 @@ To use the module:
npx -v
```
-2. If Node.js is not installed, you need to install it. Follow the [download instructions](https://nodejs.org/en/download/) in the Node.js docs, then run the above commands again to check if the installation is successful.
+2. If Node.js is not installed, you need to install it. Follow the [download instructions](https://nodejs.org/en/download/package-manager) in the Node.js docs, then run the above commands again to check if the installation is successful.
3. Let's assume the directory is `/path/to/project`. Run the following command to start the server:
@@ -85,30 +85,23 @@ To use the module:
Another way to achieve this is to use Python's `http.server` module.
> [!NOTE]
-> Older versions of Python (up to version 2.7) provided a similar module named `SimpleHTTPServer`. If you are using Python 2.x, you can follow this guide by replacing all uses of `http.server` with `SimpleHTTPServer`. However, we recommend you use the latest version of Python.
+> Older versions of Python (up to version 2.7) provided a similar module named `SimpleHTTPServer`. Python 2 is already end-of-life so we recommend using Python 3.
To do this:
-1. Install Python. If you are using Linux or macOS, it should be available on your system already. If you are a Windows user, you can get an installer from the Python homepage and follow the instructions to install it:
-
- - Go to [python.org](https://www.python.org/)
- - Under the Download section, click the link for Python "3.xxx".
- - At the bottom of the page, click the _Windows Installer_ link to download the installer file.
- - When it has downloaded, run it.
- - On the first installer page, make sure you check the "Add Python 3.xxx to PATH" checkbox.
- - Click _Install_, then click _Close_ when the installation has finished.
-
-2. Open your command prompt (Windows) / terminal (macOS/ Linux). To check if Python is installed, enter the following command:
+1. Run the following command to check if Python is already installed:
```bash
python -V
# If the above fails, try:
python3 -V
# Or, if the "py" command is available, try:
- py -V
+ py -3 -V
```
-3. This should return a version number. If this is OK, navigate to the directory that contains the website code you want to test, using the `cd` command.
+2. If Python is not installed, you need to install it. Follow the [download instructions](https://www.python.org/downloads/) in the Python docs (we also have more detailed explanations in our [Django tutorial](/en-US/docs/Learn/Server-side/Django/development_environment#installing_python_3)), then run the above commands again to check if the installation is successful.
+
+3. If Python is set up, navigate to the directory that contains the website code you want to test, using the `cd` command.
```bash
# include the directory name to enter it, for example
@@ -120,17 +113,14 @@ To do this:
4. Enter the command to start up the server in that directory:
```bash
- # If Python version returned above is 3.X
# On Windows, try "python -m http.server" or "py -3 -m http.server"
python3 -m http.server
- # If Python version returned above is 2.X
- python -m SimpleHTTPServer
```
5. By default, this will run the contents of the directory on a local web server, on port 8000. You can go to this server by going to the URL `localhost:8000` in your web browser. Here you'll see the contents of the directory listed — click the HTML file you want to run.
> [!NOTE]
-> If you already have something running on port 8000, you can choose another port by running the server command followed by an alternative port number, e.g. `python3 -m http.server 7800` (Python 3.x) or `python -m SimpleHTTPServer 7800` (Python 2.x). You can then access your content at `localhost:7800`.
+> If you already have something running on port 8000, you can choose another port by running the server command followed by an alternative port number, e.g. `python3 -m http.server 7800`. You can then access your content at `localhost:7800`.
## Running server-side languages locally
diff --git a/files/en-us/learn/common_questions/tools_and_setup/using_github_pages/index.md b/files/en-us/learn/common_questions/tools_and_setup/using_github_pages/index.md
index 041f968268154f1..80cf23cb322cda6 100644
--- a/files/en-us/learn/common_questions/tools_and_setup/using_github_pages/index.md
+++ b/files/en-us/learn/common_questions/tools_and_setup/using_github_pages/index.md
@@ -15,7 +15,7 @@ GitHub is a very important and useful community to get involved in, and Git/GitH
### Basic GitHub setup
1. First of all, [install Git](https://git-scm.com/downloads) on your machine. This is the underlying version control system software that GitHub works on top of.
-2. Next, [sign up for a GitHub account](https://github.com/join). It's simple and easy.
+2. Next, [sign up for a GitHub account](https://github.com/signup). It's simple and easy.
3. Once you've signed up, log in to [github.com](https://github.com/) with your username and password.
### Preparing your code for upload
diff --git a/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md b/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md
index 011dd853076ad78..b797dc1c3c4030c 100644
--- a/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md
+++ b/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md
@@ -146,7 +146,7 @@ The final section, **Scopes**, shows what values are visible from various points
Find out more about the JavaScript debugger in different browsers:
- [Firefox JavaScript Debugger](https://firefox-source-docs.mozilla.org/devtools-user/debugger/index.html))
-- [Microsoft Edge Debugger](https://docs.microsoft.com/archive/microsoft-edge/legacy/developer/devtools-guide/debugger)
+- [Microsoft Edge Debugger](https://learn.microsoft.com/en-us/archive/microsoft-edge/legacy/developer/devtools-guide/debugger)
- [Chrome Debugger](https://developer.chrome.com/docs/devtools/javascript/)
- [Safari Debugger](https://developer.apple.com/safari/tools/)
diff --git a/files/en-us/learn/common_questions/tools_and_setup/what_software_do_i_need/index.md b/files/en-us/learn/common_questions/tools_and_setup/what_software_do_i_need/index.md
index aba428d4983fd82..67912ad1ea97140 100644
--- a/files/en-us/learn/common_questions/tools_and_setup/what_software_do_i_need/index.md
+++ b/files/en-us/learn/common_questions/tools_and_setup/what_software_do_i_need/index.md
@@ -81,7 +81,7 @@ All desktop operating systems come with a basic text editor. These editors are a
A generic way to process some shared storage data. Used, for example, by the Private Aggregation API to process shared storage data and generate aggregated reports.
+
A generic way to process some shared storage data. Used, for example, by the Private Aggregation API to process shared storage data and generate aggregated reports.
{{domxref("SharedStorageRunOperation")}}
{{domxref("WindowSharedStorage.run()", "run()")}}
diff --git a/files/en-us/web/api/sharedstoragerunoperation/index.md b/files/en-us/web/api/sharedstoragerunoperation/index.md
index ceb42d2108220b7..ab3996af4ae2676 100644
--- a/files/en-us/web/api/sharedstoragerunoperation/index.md
+++ b/files/en-us/web/api/sharedstoragerunoperation/index.md
@@ -78,7 +78,7 @@ async function measureUniqueReach() {
measureUniqueReach();
```
-For more details about this example, see [Unique reach measurement](https://developers.google.com/privacy-sandbox/relevance/private-aggregation/unique-reach). See [Shared Storage API](/en-US/docs/Web/API/Shared_Storage_API) for more examples.
+For more details about this example, see [Unique reach measurement](https://developers.google.com/privacy-sandbox/private-advertising/private-aggregation/unique-reach). See [Shared Storage API](/en-US/docs/Web/API/Shared_Storage_API) for more examples.
## Specifications
diff --git a/files/en-us/web/api/sourcebuffer/changetype/index.md b/files/en-us/web/api/sourcebuffer/changetype/index.md
index 3303d6a52465ff4..e5a066ae0b26576 100644
--- a/files/en-us/web/api/sourcebuffer/changetype/index.md
+++ b/files/en-us/web/api/sourcebuffer/changetype/index.md
@@ -55,6 +55,10 @@ If the {{domxref("MediaSource.readyState", "readyState")}} property of the paren
will set the `readyState` property to `"open"` and
fire a simple event named {{domxref("MediaSource.sourceopen_event", "sourceopen")}} at the parent media source.
+## Specifications
+
+{{Specifications}}
+
## Browser compatibility
{{Compat}}
diff --git a/files/en-us/web/api/speculation_rules_api/index.md b/files/en-us/web/api/speculation_rules_api/index.md
index d1e206697f5af9f..2ee76e42851ce49 100644
--- a/files/en-us/web/api/speculation_rules_api/index.md
+++ b/files/en-us/web/api/speculation_rules_api/index.md
@@ -55,7 +55,7 @@ A script example:
```
-Speculation rules using a `
+
+
+```
diff --git a/files/en-us/web/api/websockets_api/writing_websocket_servers/index.md b/files/en-us/web/api/websockets_api/writing_websocket_servers/index.md
index f6189d7b90d0690..f6c6c3e29162bb2 100644
--- a/files/en-us/web/api/websockets_api/writing_websocket_servers/index.md
+++ b/files/en-us/web/api/websockets_api/writing_websocket_servers/index.md
@@ -222,7 +222,7 @@ Sec-WebSocket-Protocol: wamp
Now the server must pick one of the protocols that the client suggested and it supports. If there is more than one, send the first one the client sent. Imagine our server can use both `soap` and `wamp`. Then, in the response handshake, it sends:
-```bash
+```http
Sec-WebSocket-Protocol: soap
```
diff --git a/files/en-us/web/api/websocketstream/close/index.md b/files/en-us/web/api/websocketstream/close/index.md
new file mode 100644
index 000000000000000..57e177a495fa546
--- /dev/null
+++ b/files/en-us/web/api/websocketstream/close/index.md
@@ -0,0 +1,70 @@
+---
+title: "WebSocketStream: close() method"
+short-title: close()
+slug: Web/API/WebSocketStream/close
+page-type: web-api-instance-method
+status:
+ - experimental
+browser-compat: api.WebSocketStream.close
+---
+
+{{APIRef("WebSockets API")}}{{SeeCompatTable}}
+
+The **`close()`** method of the
+{{domxref("WebSocketStream")}} interface closes the WebSocket connection. The method optionally accepts an object containing a custom code and/or reason indicating why the connection was closed.
+
+An alternative mechanism for closing a `WebSocketStream` is to specify an {{domxref("AbortSignal")}} in the [`signal`](/en-US/docs/Web/API/WebSocketStream/WebSocketStream#signal) option of the constructor upon creation. The associated {{domxref("AbortController")}} can then be used to close the WebSocket connection. This is generally the preferred mechanism. However, `close()` can be used if you wish to specify a custom code and/or reason.
+
+## Syntax
+
+```js-nolint
+close()
+close(options)
+```
+
+### Parameters
+
+- `options` {{optional_inline}}
+ - : An options object containing the following properties:
+ - `closeCode` {{optional_inline}}
+ - : A number representing the closing code (see the full list of [`CloseEvent` status codes](/en-US/docs/Web/API/CloseEvent/code#value)).
+ - `reason` {{optional_inline}}
+ - : A string representing a human-readable description of the reason why the socket connection is closed. The maximum allowed length for a `reason` string is 123 bytes. The string is automatically encoded as UTF-8 when the function is invoked.
+
+> [!NOTE]
+> Depending on the server setup and status code you use, the server may choose to ignore a custom code in favor of a valid code that is correct for the closing reason. Valid codes are 1000, and any code within the range 3000 to 4999, inclusive.
+
+### Return value
+
+None (`undefined`).
+
+### Exceptions
+
+- `SyntaxError` {{domxref("DOMException")}}
+ - : Thrown if the provided `reason` is longer than the maximum allowed length of 123 bytes.
+
+## Examples
+
+```js
+const wsURL = "wss://127.0.0.1/";
+const wss = new WebSocketStream(wsURL);
+
+setTimeout(() => {
+ wss.close({
+ code: 1000,
+ reason: "That's all folks",
+ });
+}, 10000);
+```
+
+## Specifications
+
+Not currently a part of any specification. See https://github.com/whatwg/websockets/pull/48 for standardization progress.
+
+## Browser compatibility
+
+{{Compat}}
+
+## See also
+
+- [WebSocketStream: integrating streams with the WebSocket API](https://developer.chrome.com/docs/capabilities/web-apis/websocketstream), developer.chrome.com (2020)
diff --git a/files/en-us/web/api/websocketstream/closed/index.md b/files/en-us/web/api/websocketstream/closed/index.md
new file mode 100644
index 000000000000000..f1198b7fb63a312
--- /dev/null
+++ b/files/en-us/web/api/websocketstream/closed/index.md
@@ -0,0 +1,53 @@
+---
+title: "WebSocketStream: closed property"
+short-title: closed
+slug: Web/API/WebSocketStream/closed
+page-type: web-api-instance-property
+status:
+ - experimental
+browser-compat: api.WebSocketStream.closed
+---
+
+{{APIRef("WebSockets API")}}{{SeeCompatTable}}
+
+The **`closed`** read-only property of the
+{{domxref("WebSocketStream")}} interface returns a {{jsxref("Promise")}} that fulfills with an object once the socket connection is closed. The object contains the closing code and reason.
+
+## Value
+
+A promise, which fulfills with an object containing the following properties:
+
+- `closeCode`
+ - : A number representing the closing code (see the full list of [`CloseEvent` status codes](/en-US/docs/Web/API/CloseEvent/code#value)).
+- `reason`
+ - : A string representing a human-readable description of the reason why the socket connection was closed.
+
+The promise rejects if the WebSocket connection did not close cleanly (for a clean close, the associated TCP connection must be closed _after_ the WebSocket closing handshake is completed).
+
+## Examples
+
+```js
+const wsURL = "wss://127.0.0.1/";
+const wss = new WebSocketStream(wsURL);
+
+wss.closed.then((result) => {
+ writeToScreen(
+ `DISCONNECTED: code ${result.closeCode}, message "${result.reason}"`,
+ );
+ console.log("Socket closed", result.closeCode, result.reason);
+});
+```
+
+See [Using WebSocketStream to write a client](/en-US/docs/Web/API/WebSockets_API/Using_WebSocketStream) for a complete example with full explanation.
+
+## Specifications
+
+Not currently a part of any specification. See https://github.com/whatwg/websockets/pull/48 for standardization progress.
+
+## Browser compatibility
+
+{{Compat}}
+
+## See also
+
+- [WebSocketStream: integrating streams with the WebSocket API](https://developer.chrome.com/docs/capabilities/web-apis/websocketstream), developer.chrome.com (2020)
diff --git a/files/en-us/web/api/websocketstream/index.md b/files/en-us/web/api/websocketstream/index.md
new file mode 100644
index 000000000000000..88ab63b7a53be82
--- /dev/null
+++ b/files/en-us/web/api/websocketstream/index.md
@@ -0,0 +1,94 @@
+---
+title: WebSocketStream
+slug: Web/API/WebSocketStream
+page-type: web-api-interface
+status:
+ - experimental
+browser-compat: api.WebSocketStream
+---
+
+{{APIRef("WebSockets API")}}{{SeeCompatTable}}
+
+The **`WebSocketStream`** interface of the {{domxref("WebSockets API", "WebSockets API", "", "nocode")}} is a promise-based API for connecting to a WebSocket server. It uses [streams](/en-US/docs/Web/API/Streams_API) to send and receive data on the connection, and can therefore take advantage of stream [backpressure](/en-US/docs/Web/API/Streams_API/Concepts#backpressure) automatically, regulating the speed of reading or writing to avoid bottlenecks in the application.
+
+{{InheritanceDiagram}}
+
+## Constructor
+
+- {{domxref("WebSocketStream.WebSocketStream", "WebSocketStream()")}} {{experimental_inline}}
+ - : Creates a new `WebSocketStream` object instance.
+
+## Instance properties
+
+- {{domxref("WebSocketStream.url", "url")}} {{ReadOnlyInline}} {{experimental_inline}}
+ - : Returns the URL of the WebSocket server that the `WebSocketStream` instance was created with.
+- {{domxref("WebSocketStream.closed", "closed")}} {{ReadOnlyInline}} {{experimental_inline}}
+ - : Returns a {{jsxref("Promise")}} that fulfills with an object once the socket connection is closed. The object contains the closing code and reason as sent by the server.
+- {{domxref("WebSocketStream.opened", "opened")}} {{ReadOnlyInline}} {{experimental_inline}}
+ - : Returns a {{jsxref("Promise")}} that fulfills with an object once the socket connection is successfully opened. Among other features, this object contains a {{domxref("ReadableStream")}} and a {{domxref("WritableStream")}} instance for receiving and sending data on the connection.
+
+## Instance methods
+
+- {{domxref("WebSocketStream.close", "close()")}} {{experimental_inline}}
+ - : Closes the WebSocket connection.
+
+## Examples
+
+```js
+const output = document.querySelector("#output");
+
+function writeToScreen(message) {
+ const pElem = document.createElement("p");
+ pElem.textContent = message;
+ output.appendChild(pElem);
+}
+
+if (!("WebSocketStream" in self)) {
+ writeToScreen("Your browser does not support WebSocketStream");
+} else {
+ const wsURL = "ws://127.0.0.1/";
+ const wss = new WebSocketStream(wsURL);
+
+ console.log(wss.url);
+
+ async function start() {
+ const { readable, writable, extensions, protocol } = await wss.opened;
+ writeToScreen("CONNECTED");
+ closeBtn.disabled = false;
+ const reader = readable.getReader();
+ const writer = writable.getWriter();
+
+ writer.write("ping");
+ writeToScreen("SENT: ping");
+
+ while (true) {
+ const { value, done } = await reader.read();
+ writeToScreen(`RECEIVED: ${value}`);
+ if (done) {
+ break;
+ }
+
+ setTimeout(() => {
+ writer.write("ping");
+ writeToScreen("SENT: ping");
+ }, 5000);
+ }
+ }
+
+ start();
+}
+```
+
+See [Using WebSocketStream to write a client](/en-US/docs/Web/API/WebSockets_API/Using_WebSocketStream) for a complete example with full explanation.
+
+## Specifications
+
+Not currently a part of any specification. See https://github.com/whatwg/websockets/pull/48 for standardization progress.
+
+## Browser compatibility
+
+{{Compat}}
+
+## See also
+
+- [WebSocketStream: integrating streams with the WebSocket API](https://developer.chrome.com/docs/capabilities/web-apis/websocketstream), developer.chrome.com (2020)
diff --git a/files/en-us/web/api/websocketstream/opened/index.md b/files/en-us/web/api/websocketstream/opened/index.md
new file mode 100644
index 000000000000000..b898050e0e4189e
--- /dev/null
+++ b/files/en-us/web/api/websocketstream/opened/index.md
@@ -0,0 +1,70 @@
+---
+title: "WebSocketStream: opened property"
+short-title: opened
+slug: Web/API/WebSocketStream/opened
+page-type: web-api-instance-property
+status:
+ - experimental
+browser-compat: api.WebSocketStream.opened
+---
+
+{{APIRef("WebSockets API")}}{{SeeCompatTable}}
+
+The **`opened`** read-only property of the
+{{domxref("WebSocketStream")}} interface returns a {{jsxref("Promise")}} that fulfills with an object once the socket connection is successfully opened. Among other features, this object contains a {{domxref("ReadableStream")}} and a {{domxref("WritableStream")}} instance for receiving and sending data on the connection.
+
+## Value
+
+A promise, which fulfills with an object containing the following properties:
+
+- `extensions`
+ - : A string representing any extensions applied to the `WebSocketStream`. Such extensions are not currently defined, but may be in the future. Currently returns an empty string.
+- `protocol`
+ - : A string representing the sub-protocol used to open the current WebSocket connection (chosen from the options specified in the [`protocols`](/en-US/docs/Web/API/WebSocketStream/WebSocketStream#protocols) option of the `WebSocketStream()` constructor). Returns an empty string if no sub-protocol has been used to open the connection (i.e. no sub-protocol options were included in the constructor call).
+- `readable`
+ - : A {{domxref("ReadableStream")}} instance. Call {{domxref("ReadableStream.getReader()")}} on it to obtain a {{domxref("ReadableStreamDefaultReader")}} instance that can be used to read incoming WebSocket data.
+- `writable`
+ - : A {{domxref("WritableStream")}} instance. Call {{domxref("WritableStream.getWriter()")}} on it to obtain a {{domxref("WritableStreamDefaultWriter")}} instance that can be used to write data to the WebSocket connection.
+
+The promise rejects if the WebSocket connection fails.
+
+## Examples
+
+```js
+const wsURL = "wss://127.0.0.1/";
+const wss = new WebSocketStream(wsURL);
+
+async function start() {
+ const { readable, writable, extensions, protocol } = await wss.opened;
+
+ const reader = readable.getReader();
+ const writer = writable.getWriter();
+
+ writer.write("ping");
+
+ while (true) {
+ const { value, done } = await reader.read();
+ if (done) {
+ break;
+ }
+
+ setTimeout(() => {
+ writer.write("ping");
+ }, 5000);
+ }
+}
+```
+
+See [Using WebSocketStream to write a client](/en-US/docs/Web/API/WebSockets_API/Using_WebSocketStream) for a complete example with full explanation.
+
+## Specifications
+
+Not currently a part of any specification. See https://github.com/whatwg/websockets/pull/48 for standardization progress.
+
+## Browser compatibility
+
+{{Compat}}
+
+## See also
+
+- [WebSocketStream: integrating streams with the WebSocket API](https://developer.chrome.com/docs/capabilities/web-apis/websocketstream), developer.chrome.com (2020)
diff --git a/files/en-us/web/api/websocketstream/url/index.md b/files/en-us/web/api/websocketstream/url/index.md
new file mode 100644
index 000000000000000..b1f4f0e7b0de96c
--- /dev/null
+++ b/files/en-us/web/api/websocketstream/url/index.md
@@ -0,0 +1,39 @@
+---
+title: "WebSocketStream: url property"
+short-title: url
+slug: Web/API/WebSocketStream/url
+page-type: web-api-instance-property
+status:
+ - experimental
+browser-compat: api.WebSocketStream.url
+---
+
+{{APIRef("WebSockets API")}}{{SeeCompatTable}}
+
+The **`url`** read-only property of the
+{{domxref("WebSocketStream")}} interface returns the URL of the WebSocket server that the `WebSocketStream` instance was created with.
+
+## Value
+
+A string.
+
+## Examples
+
+```js
+const wss = new WebSocketStream("wss://example.com/wss");
+
+// Logs "example.com/wss" to the console
+console.log(wss.url);
+```
+
+## Specifications
+
+Not currently a part of any specification. See https://github.com/whatwg/websockets/pull/48 for standardization progress.
+
+## Browser compatibility
+
+{{Compat}}
+
+## See also
+
+- [WebSocketStream: integrating streams with the WebSocket API](https://developer.chrome.com/docs/capabilities/web-apis/websocketstream), developer.chrome.com (2020)
diff --git a/files/en-us/web/api/websocketstream/websocketstream/index.md b/files/en-us/web/api/websocketstream/websocketstream/index.md
new file mode 100644
index 000000000000000..2c0948b56a29854
--- /dev/null
+++ b/files/en-us/web/api/websocketstream/websocketstream/index.md
@@ -0,0 +1,77 @@
+---
+title: "WebSocketStream: WebSocketStream() constructor"
+short-title: WebSocketStream()
+slug: Web/API/WebSocketStream/WebSocketStream
+page-type: web-api-constructor
+status:
+ - experimental
+browser-compat: api.WebSocketStream.WebSocketStream
+---
+
+{{APIRef("WebSockets API")}}{{SeeCompatTable}}
+
+The **`WebSocketStream()`** constructor creates a new
+{{domxref("WebSocketStream")}} object instance.
+
+## Syntax
+
+```js-nolint
+new WebSocketStream(url)
+new WebSocketStream(url, options)
+```
+
+### Parameters
+
+- `url`
+ - : A string representing the URL of the WebSocket server you want to connect to with this `WebSocketStream` instance. Allowed URL schemes are `"ws"`, `"wss"`, `"http"`, and `"https"`.
+- `options` {{optional_inline}}
+ - : An object that can contain the following properties:
+ - `protocols` {{optional_inline}}
+ - : A single string or an array of strings representing the sub-protocol(s) that the client would like to use, for example `"amqp"` or `"mqtt"`. Subprotocols may be selected from the [IANA WebSocket Subprotocol Name Registry](https://www.iana.org/assignments/websocket/websocket.xml#subprotocol-name) or may be custom names jointly understood by the client and the server. A single server can implement multiple WebSocket sub-protocols, and handle different types of interactions depending on the specified value. If it is omitted, an empty array is used by default. If `protocols` is included, the connection will only be established if the server reports that it has selected one of these sub-protocols.
+ - `signal` {{optional_inline}}
+ - : An {{domxref("AbortSignal")}} belonging to an {{domxref("AbortController")}} that you want to use to close the WebSocket connection.
+
+### Exceptions
+
+- `SyntaxError` {{domxref("DOMException")}}
+ - : Thrown if the URL scheme is not one of `"ws"`, `"wss"`, `"http"`, or `"https"`.
+
+## Examples
+
+The most basic example takes the URL of a WebSocket server as an argument:
+
+```js
+const wss = new WebSocketStream("wss://example.com/wss");
+```
+
+A more advanced example could also include an options object containing custom protocols and/or an {{domxref("AbortSignal")}}:
+
+```js
+const controller = new AbortController();
+const queueWSS = new WebSocketStream("wss://example.com/queue", {
+ protocols: ["amqp", "mqtt"],
+ signal: controller.signal,
+});
+```
+
+At a later time, {{domxref("AbortController.abort()")}} can be called when required to close the connection:
+
+```js
+controller.abort();
+```
+
+Alternatively, you can use the {{domxref("WebSocketStream.close()")}} method to close a connection, however this is mainly needed if you wish to specify a custom code and/or reason for the server to report.
+
+See [Using WebSocketStream to write a client](/en-US/docs/Web/API/WebSockets_API/Using_WebSocketStream) for a complete example with full explanation.
+
+## Specifications
+
+Not currently a part of any specification. See https://github.com/whatwg/websockets/pull/48 for standardization progress.
+
+## Browser compatibility
+
+{{Compat}}
+
+## See also
+
+- [WebSocketStream: integrating streams with the WebSocket API](https://developer.chrome.com/docs/capabilities/web-apis/websocketstream), developer.chrome.com (2020)
diff --git a/files/en-us/web/api/webxr_device_api/movement_and_motion/index.md b/files/en-us/web/api/webxr_device_api/movement_and_motion/index.md
index 01d17170d9007a9..c8ccea85abd1abe 100644
--- a/files/en-us/web/api/webxr_device_api/movement_and_motion/index.md
+++ b/files/en-us/web/api/webxr_device_api/movement_and_motion/index.md
@@ -528,7 +528,7 @@ We copy the transform's {{domxref("XRRigidTransform.matrix", "matrix")}} into `m
The `renderScene()` function is called to actually render the parts of the world that are visible to the user at the moment. It's called once for each eye, with slightly different positions for each eye, in order to establish the 3D effect needed for XR gear.
-Most of this code is typical WebGL rendering code, taken directly from the `drawScene()` function in the [Lighting in WebGL](/en-US/docs/Web/API/WebGL_API/Tutorial/Lighting_in_WebGL) article, and it's there that you should look for details on the WebGL rendering parts of this example \[[view the code on GitHub](https://github.com/mdn/dom-examples/blob/main/webgl-examples/tutorial/sample7/webgl-demo.js)]. But here it begins with some code specific to this example, so we'll take a deeper look at that part.
+Most of this code is typical WebGL rendering code, taken directly from the `drawScene()` function in the [Lighting in WebGL](/en-US/docs/Web/API/WebGL_API/Tutorial/Lighting_in_WebGL) article, and it's there that you should look for details on the WebGL rendering parts of this example ([view the code on GitHub](https://github.com/mdn/dom-examples/blob/main/webgl-examples/tutorial/sample7/webgl-demo.js)). But here it begins with some code specific to this example, so we'll take a deeper look at that part.
```js
const normalMatrix = mat4.create();
diff --git a/files/en-us/web/api/wheelevent/wheelevent/index.md b/files/en-us/web/api/wheelevent/wheelevent/index.md
index 139929f2497ae1e..40ca03f8dc1cdd0 100644
--- a/files/en-us/web/api/wheelevent/wheelevent/index.md
+++ b/files/en-us/web/api/wheelevent/wheelevent/index.md
@@ -27,7 +27,9 @@ new WheelEvent(type, options)
- : A string with the name of the event.
It is case-sensitive and browsers always set it to `wheel`.
- `options` {{optional_inline}}
+
- : An object that, _in addition of the properties defined in {{domxref("MouseEvent/MouseEvent", "MouseEvent()")}}_, can have the following properties:
+
- `deltaX` {{optional_inline}}
- : A floating number representing the horizontal scroll amount in the `deltaMode` unit.
It defaults to `0.0`.
@@ -38,12 +40,14 @@ new WheelEvent(type, options)
- : A floating number representing the scroll amount for the z-axis scroll amount in the `deltaMode` unit.
It defaults to `0.0`.
- `deltaMode` {{optional_inline}}
+
- : An integer representing the unit of the delta values scroll amount. It defaults to `0x00`. Permitted values are:
- | Constant | Value | Description |
+
+ | Constant | Value | Description |
| ----------------- | ------ | ----------------------------------------- |
| `DOM_DELTA_PIXEL` | `0x00` | The delta values are specified in pixels. |
- | `DOM_DELTA_LINE` | `0x01` | The delta values are specified in lines. |
- | `DOM_DELTA_PAGE` | `0x02` | The delta values are specified in pages. |
+ | `DOM_DELTA_LINE` | `0x01` | The delta values are specified in lines. |
+ | `DOM_DELTA_PAGE` | `0x02` | The delta values are specified in pages. |
### Return value
diff --git a/files/en-us/web/api/window/appinstalled_event/index.md b/files/en-us/web/api/window/appinstalled_event/index.md
index ab70d0db825309b..b5eca5b5442dfc1 100644
--- a/files/en-us/web/api/window/appinstalled_event/index.md
+++ b/files/en-us/web/api/window/appinstalled_event/index.md
@@ -44,6 +44,10 @@ window.onappinstalled = () => {
};
```
+## Specifications
+
+{{Specifications}}
+
## Browser compatibility
{{Compat}}
diff --git a/files/en-us/web/api/window/beforeinstallprompt_event/index.md b/files/en-us/web/api/window/beforeinstallprompt_event/index.md
index a9516e3af81a207..d9a56bcad3531c2 100644
--- a/files/en-us/web/api/window/beforeinstallprompt_event/index.md
+++ b/files/en-us/web/api/window/beforeinstallprompt_event/index.md
@@ -93,6 +93,10 @@ installButton.addEventListener("click", async () => {
});
```
+## Specifications
+
+{{Specifications}}
+
## Browser compatibility
{{Compat}}
diff --git a/files/en-us/web/api/window/cancelanimationframe/index.md b/files/en-us/web/api/window/cancelanimationframe/index.md
index e372eefdc19f311..b49f4665dfa6732 100644
--- a/files/en-us/web/api/window/cancelanimationframe/index.md
+++ b/files/en-us/web/api/window/cancelanimationframe/index.md
@@ -31,7 +31,7 @@ None ({{jsxref("undefined")}}).
## Examples
```js
-const start = Date.now();
+const start = document.timeline.currentTime;
let myReq;
diff --git a/files/en-us/web/api/window/error_event/index.md b/files/en-us/web/api/window/error_event/index.md
index f3d2314a4596455..868b446d90bacef 100644
--- a/files/en-us/web/api/window/error_event/index.md
+++ b/files/en-us/web/api/window/error_event/index.md
@@ -17,11 +17,11 @@ Use the event name in methods like {{domxref("EventTarget.addEventListener", "ad
```js
addEventListener("error", (event) => {});
-onerror = (event, source, lineno, colno, error) => {};
+onerror = (message, source, lineno, colno, error) => {};
```
> [!NOTE]
-> Due to historical reasons, `onerror` on `window` is the only event handler property that receives more than one argument.
+> For historical reasons, `onerror` on `Window` and {{domxref("WorkerGlobalScope")}} objects is the only event handler property that receives more than one argument.
## Event type
@@ -29,11 +29,11 @@ The event object is a {{domxref("ErrorEvent")}} instance if it was generated fro
{{InheritanceDiagram("ErrorEvent")}}
-## Usage notes
+## Description
### Event handler property
-For historical reasons, the `onerror` event handler property, on `Window` objects only, has different behavior from other event handler properties.
+For historical reasons, the `onerror` event handler property, on `Window` and {{domxref("WorkerGlobalScope")}} objects only, has different behavior from other event handler properties.
Note that this only applies to handlers assigned to `onerror`, not to handlers added using `addEventListener()`.
@@ -57,8 +57,13 @@ When canceled, the error won't appear in the console, but the current script wil
The event handler's signature is asymmetric between `addEventListener()` and `onerror`. The event handler passed to `Window.addEventListener()` receives a single {{domxref("ErrorEvent")}} object, while the `onerror` handler receives five arguments, matching the {{domxref("ErrorEvent")}} object's properties:
-- `event`
+- `message`
+
- : A string containing a human-readable error message describing the problem. Same as {{domxref("ErrorEvent.message")}}.
+
+ > [!NOTE]
+ > In HTML, the [content event handler attribute](/en-US/docs/Web/HTML/Attributes#event_handler_attributes) `onerror` on the {{HTMLElement("body")}} element attaches `error` event listeners to `window` (_not_ the `` element). For this event handler, the first parameter is called `event`, not `message`, although it still contains a string; that is, you would use `` to log the error message.
+
- `source`
- : A string containing the URL of the script that generated the error.
- `lineno`
diff --git a/files/en-us/web/api/window/fence/index.md b/files/en-us/web/api/window/fence/index.md
index 178a26c28751e0b..47300032f5063e1 100644
--- a/files/en-us/web/api/window/fence/index.md
+++ b/files/en-us/web/api/window/fence/index.md
@@ -41,5 +41,5 @@ window.fence.reportEvent({
## See also
-- [Fenced frames](https://developers.google.com/privacy-sandbox/relevance/fenced-frame) on developers.google.com
+- [Fenced frames](https://developers.google.com/privacy-sandbox/private-advertising/fenced-frame) on developers.google.com
- [The Privacy Sandbox](https://developers.google.com/privacy-sandbox) on developers.google.com
diff --git a/files/en-us/web/api/window/getcomputedstyle/index.md b/files/en-us/web/api/window/getcomputedstyle/index.md
index eab99272a12112d..58b1c621124a92d 100644
--- a/files/en-us/web/api/window/getcomputedstyle/index.md
+++ b/files/en-us/web/api/window/getcomputedstyle/index.md
@@ -174,6 +174,7 @@ Java.
`bottom:0` on an element with `height:30px` and a containing
block of `height:100px`, Firefox's computed style for `top`
returns `70px`, as 100 − 30 = 70.
+- For compatibility reasons, serialized color values are expressed as [`rgb()`](/en-US/docs/Web/CSS/color_value/rgb) colors if the alpha channel value is exactly `1`, and `rgba()` colors otherwise. In both cases, legacy syntax is used, with commas as separators (for example `rgb(255, 0, 0)`).
## Specifications
diff --git a/files/en-us/web/api/window/moveby/index.md b/files/en-us/web/api/window/moveby/index.md
index ccd8265f385b698..9d37e932e271554 100644
--- a/files/en-us/web/api/window/moveby/index.md
+++ b/files/en-us/web/api/window/moveby/index.md
@@ -24,10 +24,12 @@ moveBy(deltaX, deltaY)
### Parameters
-- `deltaX` is the amount of pixels to move the window horizontally.
- Positive values are to the right, while negative values are to the left.
-- `deltaY` is the amount of pixels to move the window vertically. Positive
- values are down, while negative values are up.
+- `deltaX`
+ - : The amount of pixels to move the window horizontally.
+ Positive values are to the right, while negative values are to the left.
+- `deltaY`
+ - : The amount of pixels to move the window vertically. Positive
+ values are down, while negative values are up.
### Return value
diff --git a/files/en-us/web/api/window/moveto/index.md b/files/en-us/web/api/window/moveto/index.md
index 02c0044705dfad1..0ebfcc4dce5a59a 100644
--- a/files/en-us/web/api/window/moveto/index.md
+++ b/files/en-us/web/api/window/moveto/index.md
@@ -24,8 +24,10 @@ moveTo(x, y)
### Parameters
-- `x` is the horizontal coordinate to be moved to.
-- `y` is the vertical coordinate to be moved to.
+- `x`
+ - : The horizontal coordinate to be moved to.
+- `y`
+ - : The vertical coordinate to be moved to.
### Return value
diff --git a/files/en-us/web/api/window/querylocalfonts/index.md b/files/en-us/web/api/window/querylocalfonts/index.md
index 23bf9571cc6b9e2..11ac89c3d60fba7 100644
--- a/files/en-us/web/api/window/querylocalfonts/index.md
+++ b/files/en-us/web/api/window/querylocalfonts/index.md
@@ -92,7 +92,7 @@ async function computeOutlineFormat() {
const sfnt = await fontData.blob();
// Slice out only the bytes we need: the first 4 bytes are the SFNT
// version info.
- // Spec: https://docs.microsoft.com/en-us/typography/opentype/spec/otff#organization-of-an-opentype-font
+ // Spec: https://learn.microsoft.com/en-us/typography/opentype/spec/otff#organization-of-an-opentype-font
const sfntVersion = await sfnt.slice(0, 4).text();
let outlineFormat = "UNKNOWN";
diff --git a/files/en-us/web/api/window/releaseevents/index.md b/files/en-us/web/api/window/releaseevents/index.md
index f861e49bcf13e9b..3b9d71f40a43c80 100644
--- a/files/en-us/web/api/window/releaseevents/index.md
+++ b/files/en-us/web/api/window/releaseevents/index.md
@@ -52,7 +52,7 @@ See also [`window.captureEvents`](/en-US/docs/Web/API/Window/captureEvents)
## Specifications
-This is not part of any specification.
+{{Specifications}}
## Browser compatibility
diff --git a/files/en-us/web/api/window/requestanimationframe/index.md b/files/en-us/web/api/window/requestanimationframe/index.md
index 14506c1391003ea..19ba9e4ab3c4a16 100644
--- a/files/en-us/web/api/window/requestanimationframe/index.md
+++ b/files/en-us/web/api/window/requestanimationframe/index.md
@@ -66,17 +66,16 @@ milliseconds) with `0.1 * elapsed`. The element's final position is 200px
const element = document.getElementById("some-element-you-want-to-animate");
let start;
-function step(timeStamp) {
+function step(timestamp) {
if (start === undefined) {
- start = timeStamp;
+ start = timestamp;
}
- const elapsed = timeStamp - start;
+ const elapsed = timestamp - start;
// Math.min() is used here to make sure the element stops at exactly 200px
const shift = Math.min(0.1 * elapsed, 200);
element.style.transform = `translateX(${shift}px)`;
if (shift < 200) {
- previousTimeStamp = timeStamp;
requestAnimationFrame(step);
}
}
@@ -100,12 +99,12 @@ and the first call to the callback function.
```js
let zero;
requestAnimationFrame(firstFrame);
-function firstFrame(timeStamp) {
- zero = timeStamp;
- animate(timeStamp);
+function firstFrame(timestamp) {
+ zero = timestamp;
+ animate(timestamp);
}
-function animate(timeStamp) {
- const value = (timeStamp - zero) / duration;
+function animate(timestamp) {
+ const value = (timestamp - zero) / duration;
if (value < 1) {
element.style.opacity = value;
requestAnimationFrame((t) => animate(t));
@@ -115,14 +114,14 @@ function animate(timeStamp) {
This example uses {{domxref("AnimationTimeline/currentTime", "document.timeline.currentTime")}} to set a zero value
before the first call to `requestAnimationFrame`. `document.timeline.currentTime`
-aligns with the `timeStamp` argument, so the zero value is equivalent to the
+aligns with the `timestamp` argument, so the zero value is equivalent to the
0th frame's timestamp.
```js
const zero = document.timeline.currentTime;
requestAnimationFrame(animate);
-function animate(timeStamp) {
- const value = (timeStamp - zero) / duration; // animation-timing-function: linear
+function animate(timestamp) {
+ const value = (timestamp - zero) / duration; // animation-timing-function: linear
if (value < 1) {
element.style.opacity = value;
requestAnimationFrame((t) => animate(t));
diff --git a/files/en-us/web/api/window/resizeby/index.md b/files/en-us/web/api/window/resizeby/index.md
index 855fd5e60aebb73..3a2ff35a14baef4 100644
--- a/files/en-us/web/api/window/resizeby/index.md
+++ b/files/en-us/web/api/window/resizeby/index.md
@@ -19,8 +19,10 @@ resizeBy(xDelta, yDelta)
### Parameters
-- `xDelta` is the number of pixels to grow the window horizontally.
-- `yDelta` is the number of pixels to grow the window vertically.
+- `xDelta`
+ - : The number of pixels to grow the window horizontally.
+- `yDelta`
+ - : The number of pixels to grow the window vertically.
### Return value
diff --git a/files/en-us/web/api/window/scroll/index.md b/files/en-us/web/api/window/scroll/index.md
index 998ac46fd97bdd6..06f8ddf5717f5d5 100644
--- a/files/en-us/web/api/window/scroll/index.md
+++ b/files/en-us/web/api/window/scroll/index.md
@@ -14,21 +14,20 @@ particular place in the document.
## Syntax
```js-nolint
-scroll(x-coord, y-coord)
+scroll(xCoord, yCoord)
scroll(options)
```
### Parameters
-- `x-coord` is the pixel along the horizontal axis of the document that you
- want displayed in the upper left.
-- `y-coord` is the pixel along the vertical axis of the document that you
- want displayed in the upper left.
-
-\- or -
-
+- `xCoord`
+ - : The pixel along the horizontal axis of the document that you
+ want displayed in the upper left.
+- `yCoord`
+ - : The pixel along the vertical axis of the document that you
+ want displayed in the upper left.
- `options`
- - : A dictionary containing the following parameters:
+ - : An object containing the following properties:
- `top`
- : Specifies the number of pixels along the Y axis to scroll the window or element.
- `left`
diff --git a/files/en-us/web/api/window/scrollby/index.md b/files/en-us/web/api/window/scrollby/index.md
index eb6ac1c00842de8..20d98789ca723e5 100644
--- a/files/en-us/web/api/window/scrollby/index.md
+++ b/files/en-us/web/api/window/scrollby/index.md
@@ -14,19 +14,18 @@ window by the given amount.
## Syntax
```js-nolint
-scrollBy(x-coord, y-coord)
+scrollBy(xCoord, yCoord)
scrollBy(options)
```
### Parameters
-- `x-coord` is the horizontal pixel value that you want to scroll by.
-- `y-coord` is the vertical pixel value that you want to scroll by.
-
-\- or -
-
+- `xCoord`
+ - : The horizontal pixel value that you want to scroll by.
+- `yCoord`
+ - : The vertical pixel value that you want to scroll by.
- `options`
- - : A dictionary containing the following parameters:
+ - : An object containing the following properties:
- `top`
- : Specifies the number of pixels along the Y axis to scroll the window or element.
- `left`
diff --git a/files/en-us/web/api/window/scrollbylines/index.md b/files/en-us/web/api/window/scrollbylines/index.md
index 0f4e97c273759ab..0bd93ec1f6e8a18 100644
--- a/files/en-us/web/api/window/scrollbylines/index.md
+++ b/files/en-us/web/api/window/scrollbylines/index.md
@@ -21,8 +21,9 @@ scrollByLines(lines)
### Parameters
-- `lines` is the number of lines to scroll the document by. It may be a
- positive or negative integer.
+- `lines`
+ - : The number of lines to scroll the document by. It may be a
+ positive or negative integer.
### Return value
diff --git a/files/en-us/web/api/window/scrollbypages/index.md b/files/en-us/web/api/window/scrollbypages/index.md
index 1617a8bd8226e50..aeac13d3cef9149 100644
--- a/files/en-us/web/api/window/scrollbypages/index.md
+++ b/files/en-us/web/api/window/scrollbypages/index.md
@@ -21,8 +21,9 @@ scrollByPages(pages)
### Parameters
-- `pages` is the number of pages to scroll. It may be a positive or
- negative integer.
+- `pages`
+ - : The number of pages to scroll. It may be a positive or
+ negative integer.
### Return value
diff --git a/files/en-us/web/api/window/scrollto/index.md b/files/en-us/web/api/window/scrollto/index.md
index dcc63de678082cb..195a5a6decd469c 100644
--- a/files/en-us/web/api/window/scrollto/index.md
+++ b/files/en-us/web/api/window/scrollto/index.md
@@ -14,21 +14,20 @@ coordinates in the document.
## Syntax
```js-nolint
-scrollTo(x-coord, y-coord)
+scrollTo(xCoord, yCoord)
scrollTo(options)
```
### Parameters
-- `x-coord` is the pixel along the horizontal axis of the
- document that you want displayed in the upper left.
-- `y-coord` is the pixel along the vertical axis of the document
- that you want displayed in the upper left.
-
-\- or -
-
+- `xCoord`
+ - : The pixel along the horizontal axis of the
+ document that you want displayed in the upper left.
+- `yCoord`
+ - : The pixel along the vertical axis of the document
+ that you want displayed in the upper left.
- `options`
- - : A dictionary containing the following parameters:
+ - : An object containing the following properties:
- `top`
- : Specifies the number of pixels along the Y axis to scroll the window or element.
- `left`
diff --git a/files/en-us/web/api/window/updatecommands/index.md b/files/en-us/web/api/window/updatecommands/index.md
index bfa3d51c9c821da..121d80aa19d7b15 100644
--- a/files/en-us/web/api/window/updatecommands/index.md
+++ b/files/en-us/web/api/window/updatecommands/index.md
@@ -15,12 +15,13 @@ Updates the state of commands of the current chrome window (UI).
## Syntax
```js-nolint
-updateCommands("sCommandName")
+updateCommands(commandName)
```
### Parameters
-- `sCommandName` is a particular string which describes what kind of update event this is (e.g. whether we are in bold right now).
+- `commandName`
+ - : A string which describes what kind of update event this is (e.g. whether we are in bold right now).
### Return value
diff --git a/files/en-us/web/api/windowsharedstorage/run/index.md b/files/en-us/web/api/windowsharedstorage/run/index.md
index 0a1d98e1f29d306..0e07a270c792976 100644
--- a/files/en-us/web/api/windowsharedstorage/run/index.md
+++ b/files/en-us/web/api/windowsharedstorage/run/index.md
@@ -62,7 +62,7 @@ async function measureUniqueReach() {
measureUniqueReach();
```
-See [Unique reach measurement](https://developers.google.com/privacy-sandbox/relevance/private-aggregation/unique-reach) for a full explanation of this example. See [Shared Storage API](/en-US/docs/Web/API/Shared_Storage_API) for more examples.
+See [Unique reach measurement](https://developers.google.com/privacy-sandbox/private-advertising/private-aggregation/unique-reach) for a full explanation of this example. See [Shared Storage API](/en-US/docs/Web/API/Shared_Storage_API) for more examples.
## Specifications
diff --git a/files/en-us/web/api/worker/worker/index.md b/files/en-us/web/api/worker/worker/index.md
index 71e732dd5c6b5d9..0262acffebb1826 100644
--- a/files/en-us/web/api/worker/worker/index.md
+++ b/files/en-us/web/api/worker/worker/index.md
@@ -16,14 +16,25 @@ The **`Worker()`** constructor creates a {{domxref("Worker")}} object that execu
## Syntax
```js-nolint
-new Worker(aURL)
-new Worker(aURL, options)
+new Worker(url)
+new Worker(url, options)
```
### Parameters
-- `aURL`
- - : A string representing the URL of the script the worker will execute. It must obey the same-origin policy.
+- `url`
+
+ - : A string representing the URL of the script the worker will execute. It must obey the same-origin policy. The URL is resolved relative to the current HTML page's location.
+
+ > [!NOTE]
+ > Bundlers, including [Webpack](https://webpack.js.org/guides/web-workers/), [Vite](https://vitejs.dev/guide/features.html#web-workers), and [Parcel](https://parceljs.org/languages/javascript/#web-workers), recommend passing URLs that are relative to [`import.meta.url`](/en-US/docs/Web/JavaScript/Reference/Operators/import.meta#url) to the `Worker()` constructor. For example:
+ >
+ > ```js
+ > const myWorker = new Worker(new URL("worker.js", import.meta.url));
+ > ```
+ >
+ > This way, the path is relative to the current script instead of the current HTML page, which allows the bundler to safely do optimizations like renaming (because otherwise the `worker.js` URL may point to a file not controlled by the bundler, so it cannot make any assumptions).
+
- `options` {{optional_inline}}
- : An object containing option properties that can be set when creating the object instance. Available properties are as follows:
diff --git a/files/en-us/web/api/workerglobalscope/atob/index.md b/files/en-us/web/api/workerglobalscope/atob/index.md
index 6485d4461065703..a540bbb479e26d6 100644
--- a/files/en-us/web/api/workerglobalscope/atob/index.md
+++ b/files/en-us/web/api/workerglobalscope/atob/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.atob
---
-{{APIRef("HTML DOM")}}
+{{APIRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The **`atob()`** method of the {{domxref("WorkerGlobalScope")}} interface decodes a
string of data which has been encoded using {{glossary("Base64")}} encoding. You can use
diff --git a/files/en-us/web/api/workerglobalscope/btoa/index.md b/files/en-us/web/api/workerglobalscope/btoa/index.md
index 25feae34f29e316..1477f790ab31547 100644
--- a/files/en-us/web/api/workerglobalscope/btoa/index.md
+++ b/files/en-us/web/api/workerglobalscope/btoa/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.btoa
---
-{{APIRef("HTML DOM")}}
+{{APIRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The **`btoa()`** method of the {{domxref("WorkerGlobalScope")}} interface creates a
{{glossary("Base64")}}-encoded {{Glossary("ASCII")}} string from a _binary string_ (i.e., a
diff --git a/files/en-us/web/api/workerglobalscope/caches/index.md b/files/en-us/web/api/workerglobalscope/caches/index.md
index 81417c6e5b4f1e5..acbf2d0f0c659d1 100644
--- a/files/en-us/web/api/workerglobalscope/caches/index.md
+++ b/files/en-us/web/api/workerglobalscope/caches/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.caches
---
-{{APIRef("Service Workers API")}}{{securecontext_header}}
+{{APIRef("Service Workers API")}}{{securecontext_header}}{{AvailableInWorkers("worker")}}
The **`caches`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns the {{domxref("CacheStorage")}} object associated with the current context.
This object enables functionality such as storing assets for offline use, and generating custom responses to requests.
diff --git a/files/en-us/web/api/workerglobalscope/crossoriginisolated/index.md b/files/en-us/web/api/workerglobalscope/crossoriginisolated/index.md
index b36c6ba7560edd4..aafb611df5a5926 100644
--- a/files/en-us/web/api/workerglobalscope/crossoriginisolated/index.md
+++ b/files/en-us/web/api/workerglobalscope/crossoriginisolated/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.crossOriginIsolated
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`crossOriginIsolated`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns a boolean value that
indicates whether the website is in a cross-origin isolation state. That state mitigates the risk of side-channel attacks and unlocks a few capabilities:
diff --git a/files/en-us/web/api/workerglobalscope/crypto/index.md b/files/en-us/web/api/workerglobalscope/crypto/index.md
index a2ace1325116ba9..1f2f63b391295a0 100644
--- a/files/en-us/web/api/workerglobalscope/crypto/index.md
+++ b/files/en-us/web/api/workerglobalscope/crypto/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.crypto
---
-{{APIRef("Web Crypto API")}}
+{{APIRef("Web Crypto API")}}{{AvailableInWorkers("worker")}}
The **`crypto`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns the {{domxref("Crypto")}} object for this worker. This object gives workers access to certain cryptographic related services.
diff --git a/files/en-us/web/api/workerglobalscope/dump/index.md b/files/en-us/web/api/workerglobalscope/dump/index.md
index 8c3cce38b3593ab..b3dbf321f8e4734 100644
--- a/files/en-us/web/api/workerglobalscope/dump/index.md
+++ b/files/en-us/web/api/workerglobalscope/dump/index.md
@@ -9,7 +9,7 @@ status:
browser-compat: api.WorkerGlobalScope.dump
---
-{{APIRef("Web Workers API")}}{{Non-standard_Header}}{{Deprecated_Header}}
+{{APIRef("Web Workers API")}}{{Non-standard_Header}}{{Deprecated_Header}}{{AvailableInWorkers("worker")}}
The **`WorkerGlobalScope.dump()`** method logs messages to the browser's standard output (`stdout`). If the browser was started from a terminal, output sent to `dump()` will appear in the terminal. This is the same as {{domxref("Window.dump()")}}, but for workers.
diff --git a/files/en-us/web/api/workerglobalscope/error_event/index.md b/files/en-us/web/api/workerglobalscope/error_event/index.md
index 18c84edbc9ce49a..dccdadda00d58e8 100644
--- a/files/en-us/web/api/workerglobalscope/error_event/index.md
+++ b/files/en-us/web/api/workerglobalscope/error_event/index.md
@@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.WorkerGlobalScope.error_event
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`error`** event of the {{domxref("WorkerGlobalScope")}} interface fires when an error occurs in the worker.
@@ -20,6 +20,11 @@ addEventListener("error", (event) => {});
onerror = (message, filename, lineno, colno, error) => {};
```
+> [!NOTE]
+> For historical reasons, `onerror` on {{domxref("Window")}} and `WorkerGlobalScope` objects is the only event handler property that receives more than one argument.
+>
+> For more details about this, see the page for the {{domxref("Window.error_event", "error")}} event on `Window` objects.
+
## Event type
A generic {{domxref("Event")}}.
diff --git a/files/en-us/web/api/workerglobalscope/fetch/index.md b/files/en-us/web/api/workerglobalscope/fetch/index.md
index 77f1bc8ed22f7de..6cbc36969bbcd04 100644
--- a/files/en-us/web/api/workerglobalscope/fetch/index.md
+++ b/files/en-us/web/api/workerglobalscope/fetch/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.fetch
---
-{{APIRef("Fetch API")}}
+{{APIRef("Fetch API")}}{{AvailableInWorkers("worker")}}
The **`fetch()`** method of the {{domxref("WorkerGlobalScope")}} interface starts the process of fetching a resource from the network, returning a promise that is fulfilled once the response is available.
diff --git a/files/en-us/web/api/workerglobalscope/fonts/index.md b/files/en-us/web/api/workerglobalscope/fonts/index.md
index e0716f15e9c6ff0..40dafd6e87549c3 100644
--- a/files/en-us/web/api/workerglobalscope/fonts/index.md
+++ b/files/en-us/web/api/workerglobalscope/fonts/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerGlobalScope.fonts
---
-{{APIRef("DOM")}}
+{{APIRef("DOM")}}{{AvailableInWorkers("worker")}}
The **`fonts`** property of the {{domxref("WorkerGlobalScope")}} interface returns the {{domxref("FontFaceSet")}} interface of the worker.
diff --git a/files/en-us/web/api/workerglobalscope/importscripts/index.md b/files/en-us/web/api/workerglobalscope/importscripts/index.md
index c9c3b80c9c18741..82a2e18f2131605 100644
--- a/files/en-us/web/api/workerglobalscope/importscripts/index.md
+++ b/files/en-us/web/api/workerglobalscope/importscripts/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.WorkerGlobalScope.importScripts
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`importScripts()`** method of the {{domxref("WorkerGlobalScope")}} interface synchronously imports one or more scripts into the worker's scope.
@@ -21,7 +21,7 @@ importScripts(path0, path1, /* …, */ pathN)
### Parameters
- `pathN`
- - : A string value representing the URL of the script to be imported. The URL may be absolute or relative. If the URL is relative, it is relative to the HTML document's base URL.
+ - : A string value representing the URL of the script to be imported. The URL may be absolute or relative. If the URL is relative, it is relative to the worker entry script's URL.
### Return value
@@ -31,15 +31,19 @@ None ({{jsxref("undefined")}}).
- `NetworkError`
- : Imported scripts were served without a `text/javascript` MIME type or without one of the permitted [legacy JavaScript MIME types](/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#legacy_javascript_mime_types).
+- {{jsxref("TypeError")}}
+ - : Thrown if the current {{domxref("WorkerGlobalScope")}} is a module. Use [`import`](/en-US/docs/Web/JavaScript/Reference/Statements/import) instead.
## Examples
-If you had some functionality written in a separate script called `foo.js` that you wanted to use inside worker.js, you could import it using the following line:
+If you had some functionality written in a separate script called `foo.js` that you wanted to use inside `worker.js`, you could import it using the following line:
```js
importScripts("foo.js");
```
+`foo.js` should be in the same URL subtree as the worker's entry point — for example, if this worker was created with `new Worker("worker.js")`, then `worker.js` is the entry point. If `worker.js` is at `https://example.com/scripts/worker.js`, then `foo.js` should be at `https://example.com/scripts/foo.js`.
+
`importScripts()` and `self.importScripts()` are effectively equivalent — both represent `importScripts()` being called from inside the worker's inner scope.
## Specifications
diff --git a/files/en-us/web/api/workerglobalscope/index.md b/files/en-us/web/api/workerglobalscope/index.md
index 1ee902b881e7e33..a7f60c0a0fba49f 100644
--- a/files/en-us/web/api/workerglobalscope/index.md
+++ b/files/en-us/web/api/workerglobalscope/index.md
@@ -5,7 +5,7 @@ page-type: web-api-interface
browser-compat: api.WorkerGlobalScope
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`WorkerGlobalScope`** interface of the [Web Workers API](/en-US/docs/Web/API/Web_Workers_API) is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by {{domxref("Window")}} objects — in this case event handlers, the console or the associated {{domxref("WorkerNavigator")}} object. Each `WorkerGlobalScope` has its own event loop.
diff --git a/files/en-us/web/api/workerglobalscope/indexeddb/index.md b/files/en-us/web/api/workerglobalscope/indexeddb/index.md
index 655bd654b2c5073..e563f7cc2588aed 100644
--- a/files/en-us/web/api/workerglobalscope/indexeddb/index.md
+++ b/files/en-us/web/api/workerglobalscope/indexeddb/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.indexedDB
---
-{{APIRef("IndexedDB")}}
+{{APIRef("IndexedDB")}}{{AvailableInWorkers("worker")}}
The **`indexedDB`** read-only property of the {{domxref("WorkerGlobalScope")}} interface provides a mechanism for workers to
asynchronously access the capabilities of indexed databases.
diff --git a/files/en-us/web/api/workerglobalscope/issecurecontext/index.md b/files/en-us/web/api/workerglobalscope/issecurecontext/index.md
index b90aaf1fa83f539..f2caff323d75d8f 100644
--- a/files/en-us/web/api/workerglobalscope/issecurecontext/index.md
+++ b/files/en-us/web/api/workerglobalscope/issecurecontext/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.isSecureContext
---
-{{APIRef("DOM")}}
+{{APIRef("DOM")}}{{AvailableInWorkers("worker")}}
The **`isSecureContext`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns a boolean indicating whether the current [context is secure](/en-US/docs/Web/Security/Secure_Contexts) (`true`) or not (`false`).
diff --git a/files/en-us/web/api/workerglobalscope/languagechange_event/index.md b/files/en-us/web/api/workerglobalscope/languagechange_event/index.md
index de8b3bc9d71a354..6e33ad5f4b2f63b 100644
--- a/files/en-us/web/api/workerglobalscope/languagechange_event/index.md
+++ b/files/en-us/web/api/workerglobalscope/languagechange_event/index.md
@@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.WorkerGlobalScope.languagechange_event
---
-{{APIRef}}
+{{APIRef}}{{AvailableInWorkers("worker")}}
The **`languagechange`** event is fired at the global scope object when the user's preferred language changes.
diff --git a/files/en-us/web/api/workerglobalscope/location/index.md b/files/en-us/web/api/workerglobalscope/location/index.md
index 9de3515589184f4..2f916c6b8ffd900 100644
--- a/files/en-us/web/api/workerglobalscope/location/index.md
+++ b/files/en-us/web/api/workerglobalscope/location/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerGlobalScope.location
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`location`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns the {{domxref("WorkerLocation")}} associated with the worker. It is a specific location object, mostly a subset of the {{domxref("Location")}} for browsing scopes, but adapted to workers.
diff --git a/files/en-us/web/api/workerglobalscope/navigator/index.md b/files/en-us/web/api/workerglobalscope/navigator/index.md
index 1f5a6482099c414..624d82d1ee8b405 100644
--- a/files/en-us/web/api/workerglobalscope/navigator/index.md
+++ b/files/en-us/web/api/workerglobalscope/navigator/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerGlobalScope.navigator
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`navigator`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns the {{domxref("WorkerNavigator")}} associated with the worker. It is a specific navigator object, mostly a subset of the {{domxref("Navigator")}} for browsing scopes, but adapted to workers.
diff --git a/files/en-us/web/api/workerglobalscope/offline_event/index.md b/files/en-us/web/api/workerglobalscope/offline_event/index.md
index 2aebda66c0f1301..29b01f423d3824f 100644
--- a/files/en-us/web/api/workerglobalscope/offline_event/index.md
+++ b/files/en-us/web/api/workerglobalscope/offline_event/index.md
@@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.WorkerGlobalScope.offline_event
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`offline`** event of the {{domxref("WorkerGlobalScope")}} fires when the device loses connection to the internet.
diff --git a/files/en-us/web/api/workerglobalscope/online_event/index.md b/files/en-us/web/api/workerglobalscope/online_event/index.md
index 0154ff0baed2e78..aab51c1bf63d72b 100644
--- a/files/en-us/web/api/workerglobalscope/online_event/index.md
+++ b/files/en-us/web/api/workerglobalscope/online_event/index.md
@@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.WorkerGlobalScope.online_event
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`online`** event of the {{domxref("WorkerGlobalScope")}} fires when the device reconnects to the internet.
diff --git a/files/en-us/web/api/workerglobalscope/origin/index.md b/files/en-us/web/api/workerglobalscope/origin/index.md
index bb45b3bd82c1898..ce3f99b77126d14 100644
--- a/files/en-us/web/api/workerglobalscope/origin/index.md
+++ b/files/en-us/web/api/workerglobalscope/origin/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.origin
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`origin`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns the origin of the global scope, serialized as a string.
diff --git a/files/en-us/web/api/workerglobalscope/performance/index.md b/files/en-us/web/api/workerglobalscope/performance/index.md
index 75cefd2d5052f7a..34ab27729147422 100644
--- a/files/en-us/web/api/workerglobalscope/performance/index.md
+++ b/files/en-us/web/api/workerglobalscope/performance/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.performance
---
-{{APIRef("Performance API")}}
+{{APIRef("Performance API")}}{{AvailableInWorkers("worker")}}
The **`performance`** property of the {{domxref("WorkerGlobalScope")}} interface returns a {{domxref("Performance")}} object, which can be used to gather performance information about code running in the worker's scope.
diff --git a/files/en-us/web/api/workerglobalscope/rejectionhandled_event/index.md b/files/en-us/web/api/workerglobalscope/rejectionhandled_event/index.md
index 3acf8b5c6664778..7938b8a63f9d496 100644
--- a/files/en-us/web/api/workerglobalscope/rejectionhandled_event/index.md
+++ b/files/en-us/web/api/workerglobalscope/rejectionhandled_event/index.md
@@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.WorkerGlobalScope.rejectionhandled_event
---
-{{APIRef}}
+{{APIRef}}{{AvailableInWorkers("worker")}}
The **`rejectionhandled`** event is sent to the script's global scope (typically {{domxref("WorkerGlobalScope")}}) whenever a rejected {{jsxref("Promise")}} is handled late, i.e., when a handler is attached to the promise after its rejection had caused an {{domxref("WorkerGlobalScope.unhandledrejection_event", "unhandledrejection")}} event.
diff --git a/files/en-us/web/api/workerglobalscope/scheduler/index.md b/files/en-us/web/api/workerglobalscope/scheduler/index.md
index b084e8a1cab509e..7838143c441ff7d 100644
--- a/files/en-us/web/api/workerglobalscope/scheduler/index.md
+++ b/files/en-us/web/api/workerglobalscope/scheduler/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.scheduler
---
-{{APIRef("Prioritized Task Scheduling API")}}
+{{APIRef("Prioritized Task Scheduling API")}}{{AvailableInWorkers("worker")}}
The **`scheduler`** read-only property of the {{domxref("WorkerGlobalScope")}} interface is the entry point for using the [Prioritized Task Scheduling API](/en-US/docs/Web/API/Prioritized_Task_Scheduling_API).
diff --git a/files/en-us/web/api/workerglobalscope/securitypolicyviolation_event/index.md b/files/en-us/web/api/workerglobalscope/securitypolicyviolation_event/index.md
index d479d6747436702..9614ce07d7be169 100644
--- a/files/en-us/web/api/workerglobalscope/securitypolicyviolation_event/index.md
+++ b/files/en-us/web/api/workerglobalscope/securitypolicyviolation_event/index.md
@@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.WorkerGlobalScope.securitypolicyviolation_event
---
-{{APIRef}}
+{{APIRef}}{{AvailableInWorkers("worker")}}
The **`securitypolicyviolation`** event is fired when a [Content Security Policy](/en-US/docs/Web/HTTP/CSP) is violated in a worker.
diff --git a/files/en-us/web/api/workerglobalscope/self/index.md b/files/en-us/web/api/workerglobalscope/self/index.md
index 2dfbc94e4712abd..e4e7abe7503d88d 100644
--- a/files/en-us/web/api/workerglobalscope/self/index.md
+++ b/files/en-us/web/api/workerglobalscope/self/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerGlobalScope.self
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`self`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns a reference to the `WorkerGlobalScope` itself. Most of the time it is a specific scope like {{domxref("DedicatedWorkerGlobalScope")}}, {{domxref("SharedWorkerGlobalScope")}}, or {{domxref("ServiceWorkerGlobalScope")}}.
diff --git a/files/en-us/web/api/workerglobalscope/trustedtypes/index.md b/files/en-us/web/api/workerglobalscope/trustedtypes/index.md
index 282e1cce37d4128..cf77b077af8c8b7 100644
--- a/files/en-us/web/api/workerglobalscope/trustedtypes/index.md
+++ b/files/en-us/web/api/workerglobalscope/trustedtypes/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.trustedTypes
---
-{{APIRef("Trusted Types API")}}
+{{APIRef("Trusted Types API")}}{{AvailableInWorkers("worker")}}
The **`trustedTypes`** read-only property of the {{domxref("WorkerGlobalScope")}} interface returns the {{domxref("TrustedTypePolicyFactory")}} object associated with the global object, providing the entry point for using the {{domxref("Trusted Types API", "", "", "nocode")}}.
diff --git a/files/en-us/web/api/workerglobalscope/unhandledrejection_event/index.md b/files/en-us/web/api/workerglobalscope/unhandledrejection_event/index.md
index efc460dcf60858e..7ba4f53378addc7 100644
--- a/files/en-us/web/api/workerglobalscope/unhandledrejection_event/index.md
+++ b/files/en-us/web/api/workerglobalscope/unhandledrejection_event/index.md
@@ -6,7 +6,7 @@ page-type: web-api-event
browser-compat: api.WorkerGlobalScope.unhandledrejection_event
---
-{{APIRef}}
+{{APIRef}}{{AvailableInWorkers("worker")}}
The **`unhandledrejection`** event is sent to the global scope (typically {{domxref("WorkerGlobalScope")}}) of a script when a {{jsxref("Promise")}} that has no rejection handler is rejected.
diff --git a/files/en-us/web/api/workerlocation/hash/index.md b/files/en-us/web/api/workerlocation/hash/index.md
index 8f161e3451d9f52..3857c5eb3040661 100644
--- a/files/en-us/web/api/workerlocation/hash/index.md
+++ b/files/en-us/web/api/workerlocation/hash/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.hash
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`hash`** property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.hash", "hash")}} part of the worker's location.
diff --git a/files/en-us/web/api/workerlocation/host/index.md b/files/en-us/web/api/workerlocation/host/index.md
index 92a012e88efd854..f86d6f6ef1e0339 100644
--- a/files/en-us/web/api/workerlocation/host/index.md
+++ b/files/en-us/web/api/workerlocation/host/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.host
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`host`** property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.host", "host")}} part of the worker's location.
diff --git a/files/en-us/web/api/workerlocation/hostname/index.md b/files/en-us/web/api/workerlocation/hostname/index.md
index c129afc91a856ed..e4ef30635527a11 100644
--- a/files/en-us/web/api/workerlocation/hostname/index.md
+++ b/files/en-us/web/api/workerlocation/hostname/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.hostname
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`hostname`** property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.hostname", "hostname")}} part of the worker's location.
diff --git a/files/en-us/web/api/workerlocation/href/index.md b/files/en-us/web/api/workerlocation/href/index.md
index 8b82ebe5a61a913..022a22ccd35a544 100644
--- a/files/en-us/web/api/workerlocation/href/index.md
+++ b/files/en-us/web/api/workerlocation/href/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.href
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`href`** property of a {{domxref("WorkerLocation")}} object returns a string containing the serialized {{domxref("URL")}} for the worker's location.
diff --git a/files/en-us/web/api/workerlocation/index.md b/files/en-us/web/api/workerlocation/index.md
index 097250352b90f54..7872c9f8713030e 100644
--- a/files/en-us/web/api/workerlocation/index.md
+++ b/files/en-us/web/api/workerlocation/index.md
@@ -5,7 +5,7 @@ page-type: web-api-interface
browser-compat: api.WorkerLocation
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`WorkerLocation`** interface defines the absolute location of the script executed by the {{domxref("Worker")}}. Such an object is initialized for each worker and is available via the {{domxref("WorkerGlobalScope.location")}} property obtained by calling `self.location`.
diff --git a/files/en-us/web/api/workerlocation/origin/index.md b/files/en-us/web/api/workerlocation/origin/index.md
index 4358551b6cca869..d56a76b73479d9f 100644
--- a/files/en-us/web/api/workerlocation/origin/index.md
+++ b/files/en-us/web/api/workerlocation/origin/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.origin
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`origin`** property of a {{domxref("WorkerLocation")}} object returns the worker's {{domxref("URL.origin", "origin")}}.
diff --git a/files/en-us/web/api/workerlocation/pathname/index.md b/files/en-us/web/api/workerlocation/pathname/index.md
index 495354df76b5307..8614842639c0215 100644
--- a/files/en-us/web/api/workerlocation/pathname/index.md
+++ b/files/en-us/web/api/workerlocation/pathname/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.pathname
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`pathname`** property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.pathname", "pathname")}} part of the worker's location.
diff --git a/files/en-us/web/api/workerlocation/port/index.md b/files/en-us/web/api/workerlocation/port/index.md
index b0f48a339538256..eaf88a75d75e64e 100644
--- a/files/en-us/web/api/workerlocation/port/index.md
+++ b/files/en-us/web/api/workerlocation/port/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.port
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`port`** property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.port", "port")}} part of the worker's location.
diff --git a/files/en-us/web/api/workerlocation/protocol/index.md b/files/en-us/web/api/workerlocation/protocol/index.md
index d02936ee02d078a..151fda3439f9530 100644
--- a/files/en-us/web/api/workerlocation/protocol/index.md
+++ b/files/en-us/web/api/workerlocation/protocol/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.protocol
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`protocol`** property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.protocol", "protocol")}} part of the worker's location.
diff --git a/files/en-us/web/api/workerlocation/search/index.md b/files/en-us/web/api/workerlocation/search/index.md
index 0d59d6161a1a457..e398c01fd6b3387 100644
--- a/files/en-us/web/api/workerlocation/search/index.md
+++ b/files/en-us/web/api/workerlocation/search/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerLocation.search
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`search`** property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.search", "search")}} part of the worker's location.
diff --git a/files/en-us/web/api/workerlocation/tostring/index.md b/files/en-us/web/api/workerlocation/tostring/index.md
index a5a052e01a50b76..c32025bd7245779 100644
--- a/files/en-us/web/api/workerlocation/tostring/index.md
+++ b/files/en-us/web/api/workerlocation/tostring/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-method
browser-compat: api.WorkerLocation.toString
---
-{{ApiRef("WorkerLocation")}}
+{{ApiRef("WorkerLocation")}}{{AvailableInWorkers("worker")}}
The **`toString()`** {{Glossary("stringifier")}} method of a {{domxref("WorkerLocation")}} object returns a string containing the serialized {{domxref("URL")}} for the worker's location. It is a synonym for {{domxref("WorkerLocation.href")}}.
@@ -31,6 +31,10 @@ None ({{jsxref("undefined")}}).
const result = location.toString(); // Returns 'https://developer.mozilla.org/en-US/docs/Web'
```
+## Specifications
+
+{{Specifications}}
+
## Browser compatibility
{{Compat}}
diff --git a/files/en-us/web/api/workernavigator/appcodename/index.md b/files/en-us/web/api/workernavigator/appcodename/index.md
index 5cf13516aa37d22..fb42ccb8335a382 100644
--- a/files/en-us/web/api/workernavigator/appcodename/index.md
+++ b/files/en-us/web/api/workernavigator/appcodename/index.md
@@ -8,7 +8,7 @@ status:
browser-compat: api.WorkerNavigator.appCodeName
---
-{{APIRef("HTML DOM")}} {{Deprecated_Header}}
+{{APIRef("HTML DOM")}} {{Deprecated_Header}}{{AvailableInWorkers("worker")}}
The value of the **`WorkerNavigator.appCodeName`** property is
always "`Mozilla`", in any browser. This property is kept only for
diff --git a/files/en-us/web/api/workernavigator/appname/index.md b/files/en-us/web/api/workernavigator/appname/index.md
index 2a23c9dfc3e99d8..37a3aa3909446da 100644
--- a/files/en-us/web/api/workernavigator/appname/index.md
+++ b/files/en-us/web/api/workernavigator/appname/index.md
@@ -8,7 +8,7 @@ status:
browser-compat: api.WorkerNavigator.appName
---
-{{APIRef("HTML DOM")}} {{Deprecated_Header}}
+{{APIRef("HTML DOM")}} {{Deprecated_Header}}{{AvailableInWorkers("worker")}}
The value of the **`WorkerNavigator.appName`** property is always
"`Netscape`", in any browser. This property is kept only for compatibility
diff --git a/files/en-us/web/api/workernavigator/appversion/index.md b/files/en-us/web/api/workernavigator/appversion/index.md
index aa4c6a82d0ab7d9..749bdf644ee4acf 100644
--- a/files/en-us/web/api/workernavigator/appversion/index.md
+++ b/files/en-us/web/api/workernavigator/appversion/index.md
@@ -8,7 +8,7 @@ status:
browser-compat: api.WorkerNavigator.appVersion
---
-{{APIRef("HTML DOM")}} {{Deprecated_Header}}
+{{APIRef("HTML DOM")}} {{Deprecated_Header}}{{AvailableInWorkers("worker")}}
Returns either "`4.0`" or a string representing version information about
the browser.
diff --git a/files/en-us/web/api/workernavigator/connection/index.md b/files/en-us/web/api/workernavigator/connection/index.md
index f49d5d5d4f151ed..74d158a79656ccb 100644
--- a/files/en-us/web/api/workernavigator/connection/index.md
+++ b/files/en-us/web/api/workernavigator/connection/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.connection
---
-{{APIRef("Network Information API")}}
+{{APIRef("Network Information API")}}{{AvailableInWorkers("worker")}}
The **`connection`** read-only property of the {{domxref("WorkerNavigator")}} interface returns a {{domxref("NetworkInformation")}} object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.
This could be used to select high definition content or low definition content based on the user's connection.
diff --git a/files/en-us/web/api/workernavigator/devicememory/index.md b/files/en-us/web/api/workernavigator/devicememory/index.md
index d293f927882e0ed..b83430727a4d666 100644
--- a/files/en-us/web/api/workernavigator/devicememory/index.md
+++ b/files/en-us/web/api/workernavigator/devicememory/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.deviceMemory
---
-{{APIRef("Device Memory API")}}{{securecontext_header}}
+{{APIRef("Device Memory API")}}{{securecontext_header}}{{AvailableInWorkers("worker")}}
The **`deviceMemory`** read-only
property of the {{domxref("WorkerNavigator")}} interface returns the approximate amount of
diff --git a/files/en-us/web/api/workernavigator/globalprivacycontrol/index.md b/files/en-us/web/api/workernavigator/globalprivacycontrol/index.md
index ccc65cc8e0aefbf..d64034d39bcb3ee 100644
--- a/files/en-us/web/api/workernavigator/globalprivacycontrol/index.md
+++ b/files/en-us/web/api/workernavigator/globalprivacycontrol/index.md
@@ -9,7 +9,7 @@ status:
browser-compat: api.WorkerNavigator.globalPrivacyControl
---
-{{APIRef("DOM")}}{{SeeCompatTable}}{{non-standard_header}}
+{{APIRef("DOM")}}{{SeeCompatTable}}{{non-standard_header}}{{AvailableInWorkers("worker")}}
The **`WorkerNavigator.globalPrivacyControl`** read-only property returns the user's [Global Privacy Control](https://globalprivacycontrol.org/) setting for the current website.
This setting indicates whether the user consents to the website or service selling or sharing their personal information with third parties.
diff --git a/files/en-us/web/api/workernavigator/gpu/index.md b/files/en-us/web/api/workernavigator/gpu/index.md
index 60d4faca33097b1..588baaff3b5c88c 100644
--- a/files/en-us/web/api/workernavigator/gpu/index.md
+++ b/files/en-us/web/api/workernavigator/gpu/index.md
@@ -8,7 +8,7 @@ status:
browser-compat: api.WorkerNavigator.gpu
---
-{{APIRef("Web Workers API")}}{{SeeCompatTable}}{{SecureContext_Header}}
+{{APIRef("Web Workers API")}}{{SeeCompatTable}}{{SecureContext_Header}}{{AvailableInWorkers("worker")}}
The **`gpu`** read-only property of the {{domxref("WorkerNavigator")}} interface returns the {{domxref("GPU")}} object for the current worker context, which is the entry point for the {{domxref("WebGPU_API", "WebGPU API", "", "nocode")}}.
diff --git a/files/en-us/web/api/workernavigator/hardwareconcurrency/index.md b/files/en-us/web/api/workernavigator/hardwareconcurrency/index.md
index 54c3ce801d98d08..e3bf6c9a963460f 100644
--- a/files/en-us/web/api/workernavigator/hardwareconcurrency/index.md
+++ b/files/en-us/web/api/workernavigator/hardwareconcurrency/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.hardwareConcurrency
---
-{{APIRef("HTML DOM")}}
+{{APIRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The **`navigator.hardwareConcurrency`** read-only property
returns the number of logical processors available to run threads on the user's
diff --git a/files/en-us/web/api/workernavigator/index.md b/files/en-us/web/api/workernavigator/index.md
index 2d19a03fe7951e6..cd765c650427485 100644
--- a/files/en-us/web/api/workernavigator/index.md
+++ b/files/en-us/web/api/workernavigator/index.md
@@ -5,7 +5,7 @@ page-type: web-api-interface
browser-compat: api.WorkerNavigator
---
-{{APIRef("Web Workers API")}}
+{{APIRef("Web Workers API")}}{{AvailableInWorkers("worker")}}
The **`WorkerNavigator`** interface represents a subset of the {{DOMxRef("Navigator")}} interface allowed to be accessed from a {{DOMxRef("Worker")}}. Such an object is initialized for each worker and is available via the {{DOMxRef("WorkerGlobalScope.navigator", "self.navigator")}} property.
@@ -62,9 +62,9 @@ _The `WorkerNavigator` interface doesn't inherit any property._
_The `WorkerNavigator` interface doesn't inherit any method._
-- {{domxref("Navigator.clearAppBadge()")}} {{SecureContext_Inline}}
+- {{domxref("WorkerNavigator.clearAppBadge()")}} {{SecureContext_Inline}}
- : Clears a badge on the current app's icon and returns a {{jsxref("Promise")}} that resolves with {{jsxref("undefined")}}.
-- {{domxref("Navigator.setAppBadge()")}} {{SecureContext_Inline}}
+- {{domxref("WorkerNavigator.setAppBadge()")}} {{SecureContext_Inline}}
- : Sets a badge on the icon associated with this app and returns a {{jsxref("Promise")}} that resolves with {{jsxref("undefined")}}.
## Specifications
diff --git a/files/en-us/web/api/workernavigator/language/index.md b/files/en-us/web/api/workernavigator/language/index.md
index 450377bdf32562e..2c543154bb10f67 100644
--- a/files/en-us/web/api/workernavigator/language/index.md
+++ b/files/en-us/web/api/workernavigator/language/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.language
---
-{{APIRef("HTML DOM")}}
+{{APIRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The **`WorkerNavigator.language`** read-only property returns
a string representing the preferred language of the user, usually the language of the
diff --git a/files/en-us/web/api/workernavigator/languages/index.md b/files/en-us/web/api/workernavigator/languages/index.md
index a5829bc538c19d5..d49ca41aaedb777 100644
--- a/files/en-us/web/api/workernavigator/languages/index.md
+++ b/files/en-us/web/api/workernavigator/languages/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.languages
---
-{{APIRef("HTML DOM")}}
+{{APIRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The **`WorkerNavigator.languages`** read-only property
returns an array of strings representing the user's preferred
diff --git a/files/en-us/web/api/workernavigator/locks/index.md b/files/en-us/web/api/workernavigator/locks/index.md
index 534a91688b505af..e77641fd7033fe6 100644
--- a/files/en-us/web/api/workernavigator/locks/index.md
+++ b/files/en-us/web/api/workernavigator/locks/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.locks
---
-{{APIRef("Web Locks API")}}{{securecontext_header}}
+{{APIRef("Web Locks API")}}{{securecontext_header}}{{AvailableInWorkers("worker")}}
The **`locks`** read-only property of
the {{domxref("WorkerNavigator")}} interface returns a {{domxref("LockManager")}}
diff --git a/files/en-us/web/api/workernavigator/mediacapabilities/index.md b/files/en-us/web/api/workernavigator/mediacapabilities/index.md
index b73478e5484c611..297eb1301208148 100644
--- a/files/en-us/web/api/workernavigator/mediacapabilities/index.md
+++ b/files/en-us/web/api/workernavigator/mediacapabilities/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.mediaCapabilities
---
-{{APIRef("HTML DOM")}}
+{{APIRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The read-only **`mediaCapabilities`** property of the {{domxref("WorkerNavigator")}} interface references a {{domxref("MediaCapabilities")}} object that can expose information about the decoding and encoding capabilities for a given format and output capabilities (as defined by the [Media Capabilities API](/en-US/docs/Web/API/Media_Capabilities_API)).
diff --git a/files/en-us/web/api/workernavigator/online/index.md b/files/en-us/web/api/workernavigator/online/index.md
index 2ce7f8ca494f79d..5af7dae1bbb5b59 100644
--- a/files/en-us/web/api/workernavigator/online/index.md
+++ b/files/en-us/web/api/workernavigator/online/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.onLine
---
-{{ApiRef("HTML DOM")}}
+{{ApiRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
Returns the online status of the browser. The property returns a boolean value, with `true` meaning online and `false` meaning offline. The property sends updates whenever the browser's ability to connect to the network changes. The update occurs when the user follows links or when a script requests a remote page.
diff --git a/files/en-us/web/api/workernavigator/permissions/index.md b/files/en-us/web/api/workernavigator/permissions/index.md
index b2349e9e535611e..d58324ecd04cbac 100644
--- a/files/en-us/web/api/workernavigator/permissions/index.md
+++ b/files/en-us/web/api/workernavigator/permissions/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.permissions
---
-{{APIRef("Permissions API")}}
+{{APIRef("Permissions API")}}{{AvailableInWorkers("worker")}}
The **`permissions`** read-only property of the {{domxref("WorkerNavigator")}} interface
returns a {{domxref("Permissions")}} object that can be used to query and update
diff --git a/files/en-us/web/api/workernavigator/platform/index.md b/files/en-us/web/api/workernavigator/platform/index.md
index 37d4ae2c215ed0c..cd134c8cd454ef2 100644
--- a/files/en-us/web/api/workernavigator/platform/index.md
+++ b/files/en-us/web/api/workernavigator/platform/index.md
@@ -8,7 +8,7 @@ status:
browser-compat: api.WorkerNavigator.platform
---
-{{ APIRef("HTML DOM") }} {{Deprecated_Header}}
+{{ APIRef("HTML DOM") }} {{Deprecated_Header}}{{AvailableInWorkers("worker")}}
Returns a string representing the platform of the browser. The specification allows
browsers to always return the empty string, so don't rely on this property to get a
diff --git a/files/en-us/web/api/workernavigator/product/index.md b/files/en-us/web/api/workernavigator/product/index.md
index 200bfa2d4e385d6..9f8e685356bf2c2 100644
--- a/files/en-us/web/api/workernavigator/product/index.md
+++ b/files/en-us/web/api/workernavigator/product/index.md
@@ -8,7 +8,7 @@ status:
browser-compat: api.WorkerNavigator.product
---
-{{APIRef("HTML DOM")}} {{Deprecated_Header}}
+{{APIRef("HTML DOM")}} {{Deprecated_Header}}{{AvailableInWorkers("worker")}}
The value of the **`WorkerNavigator.product`** property is always
"`Gecko`", in any browser. This property is kept only for compatibility
diff --git a/files/en-us/web/api/workernavigator/serviceworker/index.md b/files/en-us/web/api/workernavigator/serviceworker/index.md
index 977c4f749f713b2..b70c541f63217e2 100644
--- a/files/en-us/web/api/workernavigator/serviceworker/index.md
+++ b/files/en-us/web/api/workernavigator/serviceworker/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.serviceWorker
---
-{{securecontext_header}}{{APIRef("Service Workers API")}}{{AvailableInWorkers}}
+{{securecontext_header}}{{APIRef("Service Workers API")}}{{AvailableInWorkers("worker")}}
The **`serviceWorker`** read-only property of the {{domxref("WorkerNavigator")}} interface returns the {{domxref("ServiceWorkerContainer")}} object for the [associated document](https://html.spec.whatwg.org/multipage/browsers.html#concept-document-window), which provides access to registration, removal, upgrade, and communication with the {{domxref("ServiceWorker")}}.
diff --git a/files/en-us/web/api/workernavigator/storage/index.md b/files/en-us/web/api/workernavigator/storage/index.md
index 11887fbede58823..3f42afbf27b6cee 100644
--- a/files/en-us/web/api/workernavigator/storage/index.md
+++ b/files/en-us/web/api/workernavigator/storage/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.storage
---
-{{securecontext_header}}{{APIRef("Storage")}}
+{{securecontext_header}}{{APIRef("Storage")}}{{AvailableInWorkers("worker")}}
The **`storage`** read-only property of the {{domxref("WorkerNavigator")}} interface
returns the singleton {{domxref("StorageManager")}} object used to
diff --git a/files/en-us/web/api/workernavigator/useragent/index.md b/files/en-us/web/api/workernavigator/useragent/index.md
index cd27bafa7fc76d9..73550af8b1a4472 100644
--- a/files/en-us/web/api/workernavigator/useragent/index.md
+++ b/files/en-us/web/api/workernavigator/useragent/index.md
@@ -6,7 +6,7 @@ page-type: web-api-instance-property
browser-compat: api.WorkerNavigator.userAgent
---
-{{ApiRef("HTML DOM")}}
+{{ApiRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The **`WorkerNavigator.userAgent`** read-only property returns the
user agent string for the current browser.
diff --git a/files/en-us/web/api/workernavigator/useragentdata/index.md b/files/en-us/web/api/workernavigator/useragentdata/index.md
index 6681d59a4390b38..6393c4cbaa7c799 100644
--- a/files/en-us/web/api/workernavigator/useragentdata/index.md
+++ b/files/en-us/web/api/workernavigator/useragentdata/index.md
@@ -8,7 +8,7 @@ status:
browser-compat: api.WorkerNavigator.userAgentData
---
-{{APIRef("User-Agent Client Hints API")}}{{SeeCompatTable}}{{securecontext_header}}
+{{APIRef("User-Agent Client Hints API")}}{{SeeCompatTable}}{{securecontext_header}}{{AvailableInWorkers("worker")}}
The **`userAgentData`** read-only property of the {{domxref("WorkerNavigator")}} interface returns an {{domxref("NavigatorUAData")}} object which can be used to access the {{domxref("User-Agent Client Hints API", "", "", "nocode")}}.
diff --git a/files/en-us/web/api/workletsharedstorage/get/index.md b/files/en-us/web/api/workletsharedstorage/get/index.md
index 02a4cbdd14bf99c..74d143534d02911 100644
--- a/files/en-us/web/api/workletsharedstorage/get/index.md
+++ b/files/en-us/web/api/workletsharedstorage/get/index.md
@@ -115,7 +115,7 @@ class KFreqMeasurementOperation {
register("k-freq-measurement", KFreqMeasurementOperation);
```
-For more details about this example, see [K+ frequency measurement](https://developers.google.com/privacy-sandbox/relevance/private-aggregation/k-freq-reach). See the [Shared Storage API](/en-US/docs/Web/API/Shared_Storage_API) landing page for links to other examples.
+For more details about this example, see [K+ frequency measurement](https://developers.google.com/privacy-sandbox/private-advertising/private-aggregation/k-freq-reach). See the [Shared Storage API](/en-US/docs/Web/API/Shared_Storage_API) landing page for links to other examples.
## Specifications
@@ -128,4 +128,4 @@ For more details about this example, see [K+ frequency measurement](https://deve
## See also
- [Shared Storage API](/en-US/docs/Web/API/Shared_Storage_API)
-- [Noise and scaling](https://developers.google.com/privacy-sandbox/relevance/private-aggregation/fundamentals#noise_and_scaling) on developers.google.com (2023)
+- [Noise and scaling](https://developers.google.com/privacy-sandbox/private-advertising/private-aggregation/fundamentals#noise_and_scaling) on developers.google.com (2023)
diff --git a/files/en-us/web/api/workletsharedstorage/index.md b/files/en-us/web/api/workletsharedstorage/index.md
index a9073ac01e51d35..955a6e3f9f2c7bf 100644
--- a/files/en-us/web/api/workletsharedstorage/index.md
+++ b/files/en-us/web/api/workletsharedstorage/index.md
@@ -44,9 +44,9 @@ _`WorkletSharedStorage` inherits properties from its parent interface, {{domxref
### Passing contextual data via `setSharedStorageContext()`
-You can use the [Private Aggregation API](https://developers.google.com/privacy-sandbox/relevance/private-aggregation) to create reports that combine event-level data inside fenced frames with contextual data from the embedding document. `setSharedStorageContext()` can be used to pass contextual data from the embedder to shared storage worklets initiated by the [Protected Audience API](https://developers.google.com/privacy-sandbox/relevance/protected-audience).
+You can use the [Private Aggregation API](https://developers.google.com/privacy-sandbox/private-advertising/private-aggregation) to create reports that combine event-level data inside fenced frames with contextual data from the embedding document. `setSharedStorageContext()` can be used to pass contextual data from the embedder to shared storage worklets initiated by the [Protected Audience API](https://developers.google.com/privacy-sandbox/private-advertising/protected-audience).
-In this example, we store data from both the embedding page and the fenced frame using [shared storage](https://developers.google.com/privacy-sandbox/relevance/shared-storage).
+In this example, we store data from both the embedding page and the fenced frame using [shared storage](https://developers.google.com/privacy-sandbox/private-advertising/shared-storage).
On the embedding page, we set a mock event ID as the shared storage context using `setSharedStorageContext()`:
diff --git a/files/en-us/web/api/xmlhttprequest/send/index.md b/files/en-us/web/api/xmlhttprequest/send/index.md
index ec8180b65254fcf..f2f35073d2f83ef 100644
--- a/files/en-us/web/api/xmlhttprequest/send/index.md
+++ b/files/en-us/web/api/xmlhttprequest/send/index.md
@@ -39,7 +39,7 @@ send(body)
- : A body of data to be sent in the XHR request. This can be:
- A {{domxref("Document")}}, in which case it is serialized before being sent.
- - An `XMLHttpRequestBodyInit`, which [per the Fetch spec](https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit) can be a {{domxref("Blob")}}, an {{jsxref("ArrayBuffer")}}, a {{jsxref("TypedArray")}}, a {{jsxref("DataView")}}, a {{domxref("FormData")}}, a {{domxref("URLSearchParams")}}, or a string literal or object.
+ - An `XMLHttpRequestBodyInit`, which [per the Fetch spec](https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit) can be a {{domxref("Blob")}}, an {{jsxref("ArrayBuffer")}}, a {{jsxref("TypedArray")}}, a {{jsxref("DataView")}}, a {{domxref("FormData")}}, a {{domxref("URLSearchParams")}}, or a string.
- `null`
If no value is specified for the body, a default value of `null` is used.
diff --git a/files/en-us/web/css/-webkit-mask-box-image/index.md b/files/en-us/web/css/-webkit-mask-box-image/index.md
index 4bdec31be1449e7..4bc6ff2c76c4a06 100644
--- a/files/en-us/web/css/-webkit-mask-box-image/index.md
+++ b/files/en-us/web/css/-webkit-mask-box-image/index.md
@@ -90,7 +90,7 @@ Border repeat styles, when included, are interpreted in the order of `
Where:
- = {{cssxref("url", "<uri>")}} | | none
+ = {{cssxref("url_value", "<url>")}} | | none
= | |
diff --git a/files/en-us/web/css/@color-profile/index.md b/files/en-us/web/css/@color-profile/index.md
index 240dc86be448c09..df869b201d01c36 100644
--- a/files/en-us/web/css/@color-profile/index.md
+++ b/files/en-us/web/css/@color-profile/index.md
@@ -2,7 +2,6 @@
title: "@color-profile"
slug: Web/CSS/@color-profile
page-type: css-at-rule
-browser-compat: css.at-rules.color-profile
spec-urls: https://www.w3.org/TR/css-color-5/#at-profile
---
diff --git a/files/en-us/web/css/@container/index.md b/files/en-us/web/css/@container/index.md
index 85f13c26f6133d3..189843063e7eed4 100644
--- a/files/en-us/web/css/@container/index.md
+++ b/files/en-us/web/css/@container/index.md
@@ -20,7 +20,7 @@ Once an eligible query container has been selected for an element, each containe
The `@container` at-rule has the following syntax:
```plain
-@container {
+@container # {
}
```
@@ -33,12 +33,27 @@ For example:
font-size: 1.5em;
}
}
+
/* with an optional */
@container tall (height > 30rem) {
h2 {
line-height: 1.6;
}
}
+
+/* multiple queries in a single condition */
+@container (width > 400px) and style(--responsive: true) {
+ h2 {
+ font-size: 1.5em;
+ }
+}
+
+/* condition list */
+@container card (width > 400px), style(--responsive: true) {
+ h2 {
+ font-size: 1.5em;
+ }
+}
```
### Values
diff --git a/files/en-us/web/css/@counter-style/symbols/index.md b/files/en-us/web/css/@counter-style/symbols/index.md
index 311fdfb7aff01d4..9a70ec488accc25 100644
--- a/files/en-us/web/css/@counter-style/symbols/index.md
+++ b/files/en-us/web/css/@counter-style/symbols/index.md
@@ -95,5 +95,5 @@ In this example, the list of values for the `symbols` descriptor include letters
- {{cssxref("@counter-style")}} descriptors: {{cssxref("@counter-style/system","system")}}, {{cssxref("@counter-style/additive-symbols", "additive-symbols")}}, {{cssxref("@counter-style/negative", "negative")}}, {{cssxref("@counter-style/prefix", "prefix")}}, {{cssxref("@counter-style/suffix", "suffix")}}, {{cssxref("@counter-style/range", "range")}}, {{cssxref("@counter-style/pad", "pad")}}, {{cssxref("@counter-style/speak-as", "speak-as")}}, {{cssxref("@counter-style/fallback", "fallback")}}
- List style properties: {{cssxref("list-style")}}, {{cssxref("list-style-image")}}, {{cssxref("list-style-position")}}
- {{cssxref("symbols", "symbols()")}} function
-- {{cssxref("url", "url()")}} function
+- {{cssxref("url_value", "<url>")}} type
- [CSS counter styles](/en-US/docs/Web/CSS/CSS_counter_styles) module
diff --git a/files/en-us/web/css/@font-feature-values/font-display/index.md b/files/en-us/web/css/@font-feature-values/font-display/index.md
index 7f27357b2a18ab6..12ffa5359d3865b 100644
--- a/files/en-us/web/css/@font-feature-values/font-display/index.md
+++ b/files/en-us/web/css/@font-feature-values/font-display/index.md
@@ -2,7 +2,6 @@
title: font-display
slug: Web/CSS/@font-feature-values/font-display
page-type: css-at-rule-descriptor
-browser-compat: css.at-rules.font-feature-values.font-display
spec-urls: https://drafts.csswg.org/css-fonts/#descdef-font-feature-values-font-display
---
diff --git a/files/en-us/web/css/@font-feature-values/index.md b/files/en-us/web/css/@font-feature-values/index.md
index 64f4638549a703e..81d314172dfd8ea 100644
--- a/files/en-us/web/css/@font-feature-values/index.md
+++ b/files/en-us/web/css/@font-feature-values/index.md
@@ -13,6 +13,8 @@ The `@font-feature-values` at-rule may be used either at the top level of your C
## Syntax
+Each `@font-feature-values` block contains a list of either feature value blocks (listed below), or the {{cssxref("@font-feature-values/font-display", "font-display")}} descriptor.
+
### Feature value blocks
- `@swash`
diff --git a/files/en-us/web/css/@import/index.md b/files/en-us/web/css/@import/index.md
index 40005113839d6f2..efe976db4ec79ee 100644
--- a/files/en-us/web/css/@import/index.md
+++ b/files/en-us/web/css/@import/index.md
@@ -27,7 +27,7 @@ An `@import` rule _must_ be defined at the top of the stylesheet, before any oth
where:
- _url_
- - : Is a {{CSSxRef("<string>")}}, a ``, or a {{CSSxRef("url")}} function representing the location of the resource to import. The URL may be absolute or relative.
+ - : Is a {{CSSxRef("string")}} or a {{cssxref("url_value", "<url>")}} type representing the location of the resource to import. The URL may be absolute or relative.
- _list-of-media-queries_
- : Is a comma-separated list of [media queries](/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries), which specify the media-dependent conditions for applying the CSS rules defined in the linked URL. If the browser does not support any of these queries, it does not load the linked resource.
- _layer-name_
@@ -37,6 +37,8 @@ where:
If the browser does not conform to the conditions specified in the _supports-condition_, it may not fetch the linked stylesheet, and even if downloaded through some other path, will not load it.
The syntax of `supports()` is almost identical to that described in {{CSSxRef("@supports")}}, and that topic can be used as a more complete reference.
+Use `@import` together with the `layer` keyword or `layer()` function to import external style sheets (from frameworks, widget stylesheets, libraries, etc.) into layers.
+
## Description
Imported rules must come before all other types of rules, except {{CSSxRef("@charset")}} rules and layer creating [`@layer`](/en-US/docs/Web/CSS/@layer) statements.
diff --git a/files/en-us/web/css/@import/layer_function/index.md b/files/en-us/web/css/@import/layer_function/index.md
new file mode 100644
index 000000000000000..29c7cc194c0dd33
--- /dev/null
+++ b/files/en-us/web/css/@import/layer_function/index.md
@@ -0,0 +1,41 @@
+---
+title: layer()
+slug: Web/CSS/@import/layer_function
+page-type: css-function
+browser-compat: css.at-rules.import.layer
+---
+
+{{CSSRef}}
+
+The **`layer()`** [CSS](/en-US/docs/Web/CSS) [function](/en-US/docs/Web/CSS/CSS_Functions) is used along with the [`@import`](/en-US/docs/Web/CSS/@import) [at-rule](/en-US/docs/Web/CSS/At-rule) to put the imported resource in a separate named [cascade layer](/en-US/docs/Web/CSS/@layer).
+
+## Syntax
+
+```css
+@import url layer(layer-name);
+@import "dark.css" layer(framework.themes.dark);
+```
+
+The `framework.themes.dark` is the layer into which the CSS file would be imported.
+
+## Formal syntax
+
+```plain
+layer() = layer( )
+
+ =
+ [ '.' ]*
+```
+
+## Specifications
+
+{{Specifications}}
+
+## Browser compatibility
+
+{{Compat}}
+
+## See also
+
+- {{CSSxRef("@import")}}
+- [CSS cascade and inheritance](/en-US/docs/Web/CSS/CSS_cascade) module
diff --git a/files/en-us/web/css/@media/-webkit-transition/index.md b/files/en-us/web/css/@media/-webkit-transition/index.md
index b1dd747a41e92a5..d97e9360e209864 100644
--- a/files/en-us/web/css/@media/-webkit-transition/index.md
+++ b/files/en-us/web/css/@media/-webkit-transition/index.md
@@ -13,7 +13,7 @@ browser-compat: css.at-rules.media.-webkit-transition
> [!NOTE]
> All browsers support the [`transition`](/en-US/docs/Web/CSS/animation#browser_compatibility) property without vendor prefixes. Only WebKit (Safari), and not Chromium, based browsers support the `-webkit-transition` media feature. No browsers support `transition` without the prefix as a media query (though some browsers do support - {{cssxref("@media/-webkit-transform-3d", "-webkit-transform-3d")}}). Use the [`@supports (transition)`](/en-US/docs/Web/CSS/@supports) feature query instead.
-The **`-webkit-transition`** Boolean non-standard[CSS](/en-US/docs/Web/CSS) [media feature](/en-US/docs/Web/CSS/@media#media_features) is a [WebKit extension](/en-US/docs/Web/CSS/WebKit_Extensions) whose value is `true` if the browsing context supports [CSS transitions](/en-US/docs/Web/CSS/CSS_transitions).
+The **`-webkit-transition`** Boolean non-standard [CSS](/en-US/docs/Web/CSS) [media feature](/en-US/docs/Web/CSS/@media#media_features) is a [WebKit extension](/en-US/docs/Web/CSS/WebKit_Extensions) whose value is `true` if the browsing context supports [CSS transitions](/en-US/docs/Web/CSS/CSS_transitions).
Apple has [a description in Safari CSS Reference](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariCSSRef/Articles/OtherStandardCSS3Features.html#//apple_ref/doc/uid/TP40007601-SW3); this is now called `transition` there.
diff --git a/files/en-us/web/css/@media/index.md b/files/en-us/web/css/@media/index.md
index 41397eea3b18db6..6bd039dc80fe07f 100644
--- a/files/en-us/web/css/@media/index.md
+++ b/files/en-us/web/css/@media/index.md
@@ -120,9 +120,13 @@ Media feature expressions test for their presence or value, and are entirely opt
- {{cssxref("@media/prefers-contrast", "prefers-contrast")}}
- : Detects if the user has requested the system increase or decrease the amount of contrast between adjacent colors.
Added in Media Queries Level 5.
+- {{cssxref("@media/prefers-reduced-data", "prefers-reduced-data")}}
+ - : Detects if the user has requested the web content that consumes less internet traffic.
- {{cssxref("@media/prefers-reduced-motion", "prefers-reduced-motion")}}
- : The user prefers less motion on the page.
Added in Media Queries Level 5.
+- {{cssxref("@media/prefers-reduced-transparency", "prefers-reduced-transparency")}}
+ - : Detects if a user has enabled a setting on their device to reduce the transparent or translucent layer effects used on the device.
- {{cssxref("@media/resolution", "resolution")}}
- : Pixel density of the output device.
- {{cssxref("@media/scan", "scan")}}
@@ -130,6 +134,8 @@ Media feature expressions test for their presence or value, and are entirely opt
- {{cssxref("@media/scripting", "scripting")}}
- : Detects whether scripting (i.e. JavaScript) is available.
Added in Media Queries Level 5.
+- {{cssxref("@media/shape", "shape")}}
+ - : Detects the shape of the device to distinguish rectangular and round displays.
- {{cssxref("@media/update", "update")}}
- : How frequently the output device can modify the appearance of content.
Added in Media Queries Level 4.
diff --git a/files/en-us/web/css/@media/prefers-color-scheme/index.md b/files/en-us/web/css/@media/prefers-color-scheme/index.md
index 3ea0b2d79d1c10e..4f7b661e559ae17 100644
--- a/files/en-us/web/css/@media/prefers-color-scheme/index.md
+++ b/files/en-us/web/css/@media/prefers-color-scheme/index.md
@@ -14,7 +14,7 @@ A user indicates their preference through an operating system setting (e.g. ligh
For SVG and iframes, `prefers-color-scheme` lets you set a CSS style for the SVG or iframe based on the [`color-scheme`](/en-US/docs/Web/CSS/color-scheme) of the parent element in the web page.
SVGs must be used embedded (i.e., ``) as opposed to [inlined in HTML](/en-US/docs/Web/SVG/Tutorial/SVG_In_HTML_Introduction#basic_example).
-An example of using `prefers-color-scheme` in SVGs can be found in the [Color scheme inheritance](#color_scheme_inheritance) section.
+An example of using `prefers-color-scheme` in SVGs can be found in the ["Inherited color scheme in embedded elements"](#inherited_color_scheme_in_embedded_elements) section.
Using `prefers-color-scheme` is allowed in [cross-origin](/en-US/docs/Web/Security/Same-origin_policy#cross-origin_network_access) `
The background is clipped to the foreground text.
+
+ The background is clipped to the area painted by the border.
+
```
### CSS
@@ -105,11 +111,16 @@ p {
background-clip: text;
color: rgb(0 0 0 / 20%);
}
+
+.border-area {
+ background-clip: border-area;
+ border-color: transparent;
+}
```
#### Result
-{{EmbedLiveSample('Examples', 600, 580)}}
+{{EmbedLiveSample('Examples', 600, 630)}}
## Specifications
diff --git a/files/en-us/web/css/background-image/index.md b/files/en-us/web/css/background-image/index.md
index bdf1d41d5b447ac..b01a30e01050711 100644
--- a/files/en-us/web/css/background-image/index.md
+++ b/files/en-us/web/css/background-image/index.md
@@ -134,7 +134,7 @@ div {
- {{cssxref("gradient/repeating-linear-gradient", "repeating-linear-gradient()")}}
- {{cssxref("gradient/repeating-radial-gradient", "repeating-radial-gradient()")}}
- {{cssxref("gradient/repeating-conic-gradient", "repeating-conic-gradient()")}}
- - {{cssxref("url", "url()")}}
+ - {{cssxref("url_value", "<url>")}}
- [Using CSS gradients](/en-US/docs/Web/CSS/CSS_images/Using_CSS_gradients)
- [Implementing image sprites in CSS](/en-US/docs/Web/CSS/CSS_images/Implementing_image_sprites_in_CSS)
- [CSS images](/en-US/docs/Web/CSS/CSS_images) module
diff --git a/files/en-us/web/css/basic-shape/index.md b/files/en-us/web/css/basic-shape/index.md
index d4b97a3ab5b0cd7..6a7bd6626b6d72c 100644
--- a/files/en-us/web/css/basic-shape/index.md
+++ b/files/en-us/web/css/basic-shape/index.md
@@ -13,7 +13,7 @@ The **``** [CSS](/en-US/docs/Web/CSS) [data type](/en-US/docs/Web/C
## Syntax
-The `` data type is used to create basic shapes including rectangles by [container inset](#syntax_for_rectangles_by_container_insets), by [coordinate distance](#syntax_for_rectangles_by_distance), or by [set dimensions](#syntax_for_rectangles_with_dimensions), [circles](#syntax_for_circles), [ellipses](#syntax_for_ellipses), [polygons](#syntax_for_polygons), [paths](#syntax_for_paths), and [author created shapes](#syntax_for_shapes_experimental). These basic shapes are defined using one `` CSS functions, with each value requiring a parameter that follows the shape's function-specific syntax.
+The `` data type is used to create basic shapes including rectangles by [container inset](#syntax_for_rectangles_by_container_insets), by [coordinate distance](#syntax_for_rectangles_by_distance), or by [set dimensions](#syntax_for_rectangles_with_dimensions), [circles](#syntax_for_circles), [ellipses](#syntax_for_ellipses), [polygons](#syntax_for_polygons), [paths](#syntax_for_paths), and [author created shapes](#syntax_for_shapes). These basic shapes are defined using one `` CSS functions, with each value requiring a parameter that follows the shape's function-specific syntax.
### Common parameters
@@ -35,7 +35,7 @@ The parameters common across the syntax of some basic shape functions include:
- ``
- - : Sets the {{SVGAttr("fill-rule")}} that is used to determine how the interior of the shape defined by the basic shapes [polygon](#syntax_for_polygons), [path](#syntax_for_paths), and [shape](#syntax_for_shapes_experimental) is to be filled. Possible values are `nonzero` (the default) and `evenodd`.
+ - : Sets the {{SVGAttr("fill-rule")}} that is used to determine how the interior of the shape defined by the basic shapes [polygon](#syntax_for_polygons), [path](#syntax_for_paths), and [shape](#syntax_for_shapes) is to be filled. Possible values are `nonzero` (the default) and `evenodd`.
> **Note:** `` is not supported in {{cssxref("offset-path")}} and using it invalidates the property.
diff --git a/files/en-us/web/css/basic-shape/polygon/index.md b/files/en-us/web/css/basic-shape/polygon/index.md
index 21f023c156f16d4..f7ff3db545766d2 100644
--- a/files/en-us/web/css/basic-shape/polygon/index.md
+++ b/files/en-us/web/css/basic-shape/polygon/index.md
@@ -14,7 +14,6 @@ The **`polygon()`** [CSS](/en-US/docs/Web/CSS) function is one of the {{cssxref(
## Syntax
```css-nolint
-
/* Specified as coordinate list */
/* polygon(, ... )*/
polygon(50% 2.4%, 34.5% 33.8%, 0% 38.8%, 25% 63.1%, 19.1% 97.6%)
@@ -52,10 +51,11 @@ The `polygon()` function accepts comma-separated coordinates or points as its va
polygon(x1 y1, x2 y2, x3 y3, x4 y4, xn yn)
Given the above, mapping the coordinates of the container can be visualized as:
-| axis | point 1 | point 2 | point 3 | point 4 | point n |
+
+| axis | point 1 | point 2 | point 3 | point 4 | point n |
| ---- | ------- | ------- | ------- | ------- | ------------- |
-| x | 0% | 100% | 100% | 0% | xn |
-| y | 0% | 0% | 100% | 100% | yn |
+| x | 0% | 100% | 100% | 0% | xn |
+| y | 0% | 0% | 100% | 100% | yn |
Applying those coordinates to the CSS {{cssxref("clip-path")}} property using the `polygon()` function:
diff --git a/files/en-us/web/css/border-image-source/index.md b/files/en-us/web/css/border-image-source/index.md
index 9f12d959c6732c3..1cd7400001062a5 100644
--- a/files/en-us/web/css/border-image-source/index.md
+++ b/files/en-us/web/css/border-image-source/index.md
@@ -70,5 +70,5 @@ border-image-source: unset;
- {{cssxref("outline")}}
- {{cssxref("box-shadow")}}
- {{cssxref("background-image")}}
-- {{cssxref("url", "url()")}} function
+- {{cssxref("url_value", "<url>")}} type
- [Border images in CSS: A key focus area for Interop 2023](/en-US/blog/border-images-interop-2023/) on MDN blog (2023)
diff --git a/files/en-us/web/css/border-image/index.md b/files/en-us/web/css/border-image/index.md
index b653469747fadcd..21b138c26d58ce7 100644
--- a/files/en-us/web/css/border-image/index.md
+++ b/files/en-us/web/css/border-image/index.md
@@ -191,6 +191,6 @@ To match the size of a single diamond, we will use a value of 81 divided by 3, o
- {{cssxref("outline")}}
- {{cssxref("box-shadow")}}
- {{cssxref("background-image")}}
-- {{cssxref("url", "url()")}} function
+- {{cssxref("url_value", "<url>")}} type
- Gradient functions: {{CSSxRef("gradient/conic-gradient", "conic-gradient()")}}, {{CSSxRef("gradient/repeating-conic-gradient", "repeating-conic-gradient()")}}, {{CSSxRef("gradient/linear-gradient", "linear-gradient()")}}, {{CSSxRef("gradient/repeating-linear-gradient", "repeating-linear-gradient()")}}, {{CSSxRef("gradient/radial-gradient", "radial-gradient()")}}, {{CSSxRef("gradient/repeating-radial-gradient", "repeating-radial-gradient()")}}
- [Border images in CSS: A key focus area for Interop 2023](/en-US/blog/border-images-interop-2023/) on MDN blog (2023)
diff --git a/files/en-us/web/css/clip-path/index.md b/files/en-us/web/css/clip-path/index.md
index 296d7d0de20eec1..796f0b377e9f789 100644
--- a/files/en-us/web/css/clip-path/index.md
+++ b/files/en-us/web/css/clip-path/index.md
@@ -56,7 +56,7 @@ The `clip-path` property is specified as one or a combination of the values list
### Values
- ``
- - : A {{cssxref("url", "url()")}} referencing an [SVG](/en-US/docs/Web/SVG) {{SVGElement("clipPath")}} element.
+ - : A {{cssxref("url_value", "<url>")}} referencing an [SVG](/en-US/docs/Web/SVG) {{SVGElement("clipPath")}} element.
- {{cssxref("<basic-shape>")}}
- : A shape whose size and position is defined by the `` value. If no geometry box is specified, the `border-box` will be used as the reference box. One of:
diff --git a/files/en-us/web/css/color-scheme/index.md b/files/en-us/web/css/color-scheme/index.md
index b051c284bbe9b42..0e2e544690df6b2 100644
--- a/files/en-us/web/css/color-scheme/index.md
+++ b/files/en-us/web/css/color-scheme/index.md
@@ -7,7 +7,14 @@ browser-compat: css.properties.color-scheme
{{CSSRef}}
-The **`color-scheme`** [CSS](/en-US/docs/Web/CSS) property allows an element to indicate which color schemes it can comfortably be rendered in.
+The **`color-scheme`** [CSS](/en-US/docs/Web/CSS) property allows an element to indicate which color schemes it can comfortably be rendered in. User agents change the following aspects of the UI chrome to match the used color scheme:
+
+- The color of the canvas surface.
+- The default colors of scrollbars and other interaction UI.
+- The default colors of form controls.
+- The default colors of other browser-provided UI, such as "spellcheck" underlines.
+
+Component authors must use the [`prefers-color-scheme`](/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature to support the color schemes on the rest of the elements.
Common choices for operating system color schemes are "light" and "dark", or "day mode" and "night mode". When a user selects one of these color schemes, the operating system makes adjustments to the user interface. This includes [form controls](/en-US/docs/Learn/Forms), [scrollbars](/en-US/docs/Web/CSS/CSS_scrollbars_styling), and the used values of [CSS system colors](/en-US/docs/Web/CSS/CSS_colors).
@@ -35,11 +42,11 @@ The `color-scheme` property's value must be one of the following keywords.
### Values
- `normal`
- - : Indicates that the element isn't aware of any color schemes, and so should be rendered using the browser's default color scheme.
+ - : Indicates that the element can be rendered using the page's [color scheme](/en-US/docs/Web/HTML/Element/meta/name#color-scheme) settings. If the page does not have a color scheme set, the element is rendered using the page's default color settings.
- `light`
- - : Indicates that the element can be rendered using the operating system light color scheme.
+ - : Indicates that the element can be rendered using the operating system _light_ color scheme.
- `dark`
- - : Indicates that the element can be rendered using the operating system dark color scheme.
+ - : Indicates that the element can be rendered using the operating system _dark_ color scheme.
- `only`
- : Forbids the user agent from overriding the color scheme for the element.
diff --git a/files/en-us/web/css/color/index.md b/files/en-us/web/css/color/index.md
index 4c0d5fab061a1f2..76e0514b4fd57e3 100644
--- a/files/en-us/web/css/color/index.md
+++ b/files/en-us/web/css/color/index.md
@@ -32,6 +32,7 @@ color: #090a;
color: #009900aa;
/* values and legacy values*/
+color: rgb(34, 12, 64);
color: rgb(34, 12, 64, 0.6);
color: rgba(34, 12, 64, 0.6);
color: rgb(34 12 64 / 0.6);
@@ -40,6 +41,7 @@ color: rgb(34.6 12 64 / 60%);
color: rgba(34.6 12 64 / 60%);
/* values and legacy values */
+color: hsl(30, 100%, 50%);
color: hsl(30, 100%, 50%, 0.6);
color: hsla(30, 100%, 50%, 0.6);
color: hsl(30 100% 50% / 0.6);
diff --git a/files/en-us/web/css/color_value/device-cmyk/index.md b/files/en-us/web/css/color_value/device-cmyk/index.md
index d2cb10f9b75a573..8be6dc98c48a233 100644
--- a/files/en-us/web/css/color_value/device-cmyk/index.md
+++ b/files/en-us/web/css/color_value/device-cmyk/index.md
@@ -2,7 +2,6 @@
title: device-cmyk()
slug: Web/CSS/color_value/device-cmyk
page-type: css-function
-browser-compat: css.types.color.device-cmyk
spec-urls: https://drafts.csswg.org/css-color-5/#device-cmyk
---
diff --git a/files/en-us/web/css/color_value/hsl/index.md b/files/en-us/web/css/color_value/hsl/index.md
index 99f3292d28a6bc1..ca7c73818a6c938 100644
--- a/files/en-us/web/css/color_value/hsl/index.md
+++ b/files/en-us/web/css/color_value/hsl/index.md
@@ -10,6 +10,9 @@ spec-urls:
{{CSSRef}}
+> [!NOTE]
+> The `hsla()` functional notation is an alias for `hsl()`. They are exactly equivalent. It is recommended to use `hsl()`.
+
The **`hsl()`** functional notation expresses a color in the {{glossary("RGB", "sRGB")}} {{glossary("color space")}} according to its _hue_, _saturation_, and _lightness_ components. An optional _alpha_ component represents the color's transparency.
{{EmbedInteractiveExample("pages/css/function-hsl.html")}}
@@ -29,9 +32,14 @@ hsl(none 75% 25%)
hsl(from green h s l / 0.5)
hsl(from #0000FF h s calc(l + 20))
hsl(from rgb(200 0 0) calc(h + 30) s calc(l + 30))
-```
-The `hsla()` function can also be used to express sRGB colors. This is an alias for `hsl()` that accepts the same parameters.
+/* Legacy 'hsla()' alias */
+hsla(120deg 75% 25% / 60%)
+
+/* Legacy format */
+hsl(120, 75%, 25%)
+hsl(120deg, 75%, 25%, 0.8)
+```
> **Note:** `hsl()`/`hsla()` can also be written in a legacy form in which all values are separated with commas, for example `hsl(120, 75%, 25%)` or `hsla(120deg, 75%, 25%, 0.8)`. The `none` value is not permitted in the comma-separated legacy syntax, the `deg` on the hue value is optional, and the `%` units are required for the saturation and lightness values.
@@ -86,9 +94,6 @@ The parameters are as follows:
- `A` {{optional_inline}}
- : An {{CSSXref("<alpha-value>")}} representing the alpha channel value of the output color, where the number `0` corresponds to `0%` (fully transparent) and `1` corresponds to `100%` (fully opaque). Additionally, the keyword `none` can be used to explicitly specify no alpha channel. If the `A` channel value is not explicitly specified, it defaults to the alpha channel value of the origin color. If included, the value is preceded by a slash (`/`).
-> [!NOTE]
-> The `hsla()` alias can also be used to output relative colors, and to specify origin colors. When using `hsla()` to output a relative color, you must use the comma-less modern syntax.
-
> [!NOTE]
> To fully enable the representation of the full spectrum of visible colors, the output of relative `hsl()` color functions is serialized to `color(srgb)`. That means that querying the output color value via the {{DOMxRef("HTMLElement.style")}} property or the {{DOMxRef("CSSStyleDeclaration.getPropertyValue()")}} method returns the output color as a [`color(srgb ...)`](/en-US/docs/Web/CSS/color_value/color) value.
diff --git a/files/en-us/web/css/color_value/index.md b/files/en-us/web/css/color_value/index.md
index f63c02f38fb8c0e..8e35f63872a2d52 100644
--- a/files/en-us/web/css/color_value/index.md
+++ b/files/en-us/web/css/color_value/index.md
@@ -76,6 +76,7 @@ A `` value can be specified using one of the methods listed below:
- Other color spaces: {{CSSXref("color_value/color", "color()")}}.
- By using [relative color](/en-US/docs/Web/CSS/CSS_colors/Relative_colors) syntax to output a new color based on an existing color. Any of the above color functions can take an **origin color** preceded by the `from` keyword and followed by definitions of the channel values for the new **output color**.
- By mixing two colors: {{CSSXref("color_value/color-mix", "color-mix()")}}.
+- By selecting a color based on contrast ratios: {{CSSXref("color_value/color-contrast", "color-contrast()")}}.
- By specifying two colors, using the first for light color-schemes and the second for dark color-schemes: {{CSSXref("color_value/light-dark", "light-dark()")}}.
### `currentcolor` keyword
diff --git a/files/en-us/web/css/color_value/rgb/index.md b/files/en-us/web/css/color_value/rgb/index.md
index a6308c1ff549da3..628356a984c69f9 100644
--- a/files/en-us/web/css/color_value/rgb/index.md
+++ b/files/en-us/web/css/color_value/rgb/index.md
@@ -10,6 +10,9 @@ spec-urls:
{{CSSRef}}
+> [!NOTE]
+> The `rgba()` functional notation is an alias for `rgb()`. They are exactly equivalent. It is recommended to use `rgb()`.
+
The **`rgb()`** functional notation expresses a color in the {{glossary("RGB", "sRGB")}} {{glossary("color space")}} according to its red, green, and blue components. An optional alpha component represents the color's transparency.
{{EmbedInteractiveExample("pages/css/function-rgb.html")}}
@@ -25,11 +28,17 @@ rgb(255 255 255 / 50%)
rgb(from green r g b / 0.5)
rgb(from #0000FF calc(r + 40) calc(g + 40) b)
rgb(from hwb(120deg 10% 20%) r g calc(b + 200))
-```
-The `rgba()` function can also be used to express sRGB colors. This is an alias for `rgb()` that accepts the same parameters.
+/* Legacy 'rgba()' alias */
+rgba(0 255 255)
-> **Note:** `rgb()`/`rgba()` can also be written in a legacy form in which all values are separated with commas, for example `rgb(255, 0, 0)`. Mixing number and percent value types is not valid in the comma-separated legacy syntax (i.e. the `R`, `G`, and `B` values must be either all numbers or all percentages), and the `none` value is also not permitted.
+/* Legacy format */
+rgb(0, 255, 255)
+rgb(0, 255, 255, 50%)
+```
+
+> [!NOTE]
+> For compatibility reasons, [Web API](/en-US/docs/Web/API/Window/getComputedStyle)-serialized color values are expressed as `rgb()` colors if the alpha channel value is exactly 1, and `rgba()` colors otherwise. In both cases, legacy syntax is used, with commas as separators (for example `rgb(255, 0, 0)`).
### Values
@@ -66,9 +75,6 @@ The parameters are as follows:
- `A` {{optional_inline}}
- : An {{CSSXref("<alpha-value>")}} representing the alpha channel value of the output color, where the number `0` corresponds to `0%` (fully transparent) and `1` corresponds to `100%` (fully opaque). Additionally, the keyword `none` can be used to explicitly specify no alpha channel. If the `A` channel value is not explicitly specified, it defaults to the alpha channel value of the origin color. If included, the value is preceded by a slash (`/`).
-> [!NOTE]
-> The `rgba()` alias can also be used to output relative colors, and to specify origin colors. When using `rgba()` to output a relative color, you must use the comma-less modern syntax.
-
> [!NOTE]
> To fully enable the representation of the full spectrum of visible colors, the output of relative `rgb()` color functions is serialized to `color(srgb)`. That means that querying the output color value via the {{DOMxRef("HTMLElement.style")}} property or the {{DOMxRef("CSSStyleDeclaration.getPropertyValue()")}} method returns the output color as a [`color(srgb ...)`](/en-US/docs/Web/CSS/color_value/color) value.
@@ -297,39 +303,6 @@ div.comma-separated {
{{EmbedLiveSample('Legacy syntax: comma-separated values', '100%', '150px')}}
-### rgba() syntax
-
-The `rgba()` syntax is an alias for `rgb()`.
-
-#### HTML
-
-```html
-
-
-```
-
-#### CSS
-
-```css
-div {
- width: 100px;
- height: 50px;
- margin: 1rem;
-}
-
-div.rgb {
- background-color: rgb(255 0 0 / 50%);
-}
-
-div.rgba {
- background-color: rgba(255 0 0 / 0.5);
-}
-```
-
-#### Result
-
-{{EmbedLiveSample('rgba() syntax', '100%', '150px')}}
-
## Specifications
{{Specifications}}
diff --git a/files/en-us/web/css/container-name/index.md b/files/en-us/web/css/container-name/index.md
index 1a5738596086a73..ce41aee103f7dfd 100644
--- a/files/en-us/web/css/container-name/index.md
+++ b/files/en-us/web/css/container-name/index.md
@@ -17,6 +17,8 @@ When a containment context is given a name, it can be specifically targeted usin
## Syntax
```css
+container-name: none;
+
/* A single name */
container-name: myLayout;
@@ -33,13 +35,16 @@ container-name: unset;
### Values
-- ``
+- `none`
- - : A case-sensitive string that is used to identify the container.
+ - : Default value. The query container has no name.
+- {{cssxref("custom-ident")}}
+
+ - : A case-sensitive string that is used to identify the container.
The following conditions apply:
- - The name can be any valid {{cssxref("custom-ident")}}, but must not equal `default`.
+ - The name must not equal `or`, `and`, `not`, or `default`.
- The name value must not be in quotes.
- The dashed ident intended to denote author-defined identifiers (e.g., `--container-name`) is permitted.
- A list of multiple names separated by a space is allowed.
diff --git a/files/en-us/web/css/container-type/index.md b/files/en-us/web/css/container-type/index.md
index 9a345b82da9ad48..338a18a82b2d9e4 100644
--- a/files/en-us/web/css/container-type/index.md
+++ b/files/en-us/web/css/container-type/index.md
@@ -49,7 +49,7 @@ container-type: unset;
Inline size containment is applied to the element. The inline size of the element can be computed in isolation, ignoring the child elements.
- `normal`
- - : The element is not a query container for any container size queries, but remains a query container for container style queries.
+ - : Default value. The element is not a query container for any container size queries, but remains a query container for [container style queries](/en-US/docs/Web/CSS/@container#container_style_queries).
## Formal definition
diff --git a/files/en-us/web/css/content/index.md b/files/en-us/web/css/content/index.md
index 07b1380e13b5d72..20a4ea44f6afb0b 100644
--- a/files/en-us/web/css/content/index.md
+++ b/files/en-us/web/css/content/index.md
@@ -90,7 +90,7 @@ The keywords and data types mentioned above are described in more detail below:
- {{cssxref("<image>")}}
- - : An {{cssxref("<image>")}}, representing an image to display. This can be equal to a {{cssxref("url", "url()")}}, {{cssxref("image/image-set", "image-set()")}}, or {{cssxref("<gradient>")}} data type, or a part of the webpage itself, defined by the {{cssxref("element", "element()")}} function.
+ - : An {{cssxref("<image>")}}, representing an image to display. This can be equal to a {{cssxref("url_value", "<url>")}}, {{cssxref("image/image-set", "image-set()")}}, or {{cssxref("<gradient>")}} data type, or a part of the webpage itself, defined by the {{cssxref("element", "element()")}} function.
- ``
@@ -343,9 +343,9 @@ If using a screen reader, it should speak the word "MOZILLA" when it reaches the
In browsers that don't support the alternative text syntax the whole declaration containing the alt text is invalid. In this case, the previous `content` value will be used, showing the image and "alt text is not supported" text.
-### Element replacement with `url()`
+### Element replacement with URL
-This example replaces a regular element! The element's contents are replaced with an SVG using the {{cssxref("url", "url()")}} image function.
+This example replaces a regular element! The element's contents are replaced with an SVG using the {{cssxref("url_value", "<url>")}} type.
Pseudo-elements aren't rendered on replaced elements. As this element is replaced, any matching `::after` or `::before` are not generated or applied. To demonstrate this, we include an `::after` declaration block, attempting to add the `id` as generated content. This pseudo-element will not be generated as the element is replaced.
@@ -461,7 +461,7 @@ div {
- {{Cssxref("quotes")}}
- {{cssxref("gradient", "<gradient>")}}
- {{cssxref("image/image-set", "image-set()")}}
-- {{cssxref("url", "url()")}}
+- {{cssxref("url_value", "<url>")}}
- [Replaced elements](/en-US/docs/Web/CSS/Replaced_element)
- [CSS generated content](/en-US/docs/Web/CSS/CSS_generated_content) module
- [CSS lists and counters](/en-US/docs/Web/CSS/CSS_lists) module
diff --git a/files/en-us/web/css/counter-reset/index.md b/files/en-us/web/css/counter-reset/index.md
index 4bcaeb373026b82..f879a4c0d7f2615 100644
--- a/files/en-us/web/css/counter-reset/index.md
+++ b/files/en-us/web/css/counter-reset/index.md
@@ -45,9 +45,9 @@ counter-reset: unset;
The `counter-reset` property accepts a list of one or more space-separated counter names or the keyword `none`. For counter names, regular counters use the format ``, and reversed counters use `reversed()`, where `` is a {{cssxref("custom-ident", "<custom-ident>")}} or `list-item` for the built-in {{HTMLElement("ol")}} counter. Optionally, each counter name can be followed by an `` to set its initial value.
- {{cssxref("custom-ident", "<custom-ident>")}}
- - : Specifies the counter name to create and initialize using the {{cssxref("custom-ident", "<custom-ident>")}} format.
+ - : Specifies the counter name to create and initialize using the {{cssxref("custom-ident", "<custom-ident>")}} format. The `reversed()` functional notation can be used to mark the counter reversed.
- {{cssxref("<integer>")}}
- - : The value to reset the counter to on each occurrence of the element.
+ - : The initial value to set on the newly created counter.
Defaults to `0` if not specified.
- `none`
- : Specifies that no counter initialization should occur.
@@ -57,7 +57,8 @@ The `counter-reset` property accepts a list of one or more space-separated count
The `counter-reset` property can create both regular and, in browsers that support it, reversed counters. You can create multiple regular and reversed counters, each separated by a space. Counters can be a standalone name or a space-separated name-value pair.
-After creating a counter using `counter-reset`, you can adjust its value by using the {{cssxref("counter-set")}} property. This is counterintuitive because, despite its name, the `counter-reset` property is used for creating and initializing counters, while the `counter-set` property is used for resetting the value of an existing counter.
+> [!WARNING]
+> There is [a difference between `counter-reset` and `counter-set` properties](/en-US/docs/Web/CSS/CSS_counter_styles/Using_CSS_counters#difference_between_counter-set_and_counter-reset). After creating a counter using `counter-reset`, you can adjust its value by using the {{cssxref("counter-set")}} property. This is counterintuitive because, despite its name, the `counter-reset` property is used for creating and initializing counters, while the `counter-set` property is used for resetting the value of an existing counter.
Setting `counter-increment: none` on a selector with greater specificity overrides the creation of the named counter set on selectors with lower specificity.
@@ -134,6 +135,47 @@ ol {
Using `counter-reset`, we set the implicit `list-item` counter to start counting at `3` for every `ol`. Then, the first item would be numbered 4, second would be numbered 5, etc., similar to the effect of writing [``](/en-US/docs/Web/HTML/Element/ol#start) in HTML.
+### Using a reverse counter
+
+In the following example, we've declared a reversed counter named 'priority'. The counter is being used to number five tasks.
+
+```html
+
+
Task A
+
Task B
+
Task C
+
Task D
+
Task E
+
+```
+
+```css hidden
+@supports not (counter-reset: reversed(priority)) {
+ .stack {
+ display: none;
+ }
+ body::after {
+ content: "Your browser doesn't support the reversed counters yet.";
+ }
+}
+```
+
+```css
+li::before {
+ content: counter(priority) ". ";
+ counter-increment: priority -1;
+}
+
+.stack {
+ counter-reset: reversed(priority);
+ list-style: none;
+}
+```
+
+{{EmbedLiveSample("Using a reverse counter", 140, 150)}}
+
+In the output, the items are numbered in reversed order from 5 to 1. Notice in the code we haven't specified the counter's initial value. The browser automatically calculates the initial value at layout-time using the counter increment value.
+
## Specifications
{{Specifications}}
diff --git a/files/en-us/web/css/counter-set/index.md b/files/en-us/web/css/counter-set/index.md
index 07ec5fce0bc47a5..ce5fa5248a12340 100644
--- a/files/en-us/web/css/counter-set/index.md
+++ b/files/en-us/web/css/counter-set/index.md
@@ -7,9 +7,11 @@ browser-compat: css.properties.counter-set
{{CSSRef}}
-The **`counter-set`** [CSS](/en-US/docs/Web/CSS) property sets [CSS counters](/en-US/docs/Web/CSS/CSS_counter_styles/Using_CSS_counters) to the given values.
+The **`counter-set`** [CSS](/en-US/docs/Web/CSS) property sets [CSS counters](/en-US/docs/Web/CSS/CSS_counter_styles/Using_CSS_counters) on the element to the given values.
-The `counter-set` property will create a new counter for each named counter in the list of space-separated counter and value pairs that doesn't already exist. If a named counter in the list is missing a value, the value of the counter will be set to `0`.
+If the counters don't exist the `counter-set` property creates a new counter for each named counter in the list of space-separated counter and value pairs. However, to create a new counter it is recommended to use the {{cssxref("counter-reset")}} CSS property.
+
+If a named counter in the list is missing a value, the value of the counter will be set to `0`.
{{EmbedInteractiveExample("pages/css/counter-set.html")}}
diff --git a/files/en-us/web/css/cross-fade/index.md b/files/en-us/web/css/cross-fade/index.md
index 6a96c0acec56c92..686f4d76195d0be 100644
--- a/files/en-us/web/css/cross-fade/index.md
+++ b/files/en-us/web/css/cross-fade/index.md
@@ -139,7 +139,7 @@ When using background images, make sure the contrast in color is great enough th
## See also
- {{cssxref("image")}}
-- {{cssxref("url")}}
+- {{cssxref("url_value", "<url>")}}
- {{cssxref("image/image", "image()")}}
- {{cssxref("image/image-set", "image-set()")}}
- {{cssxref("element")}}
diff --git a/files/en-us/web/css/css_anchor_positioning/index.md b/files/en-us/web/css/css_anchor_positioning/index.md
index a299695910bf4ab..37de59493d2a04b 100644
--- a/files/en-us/web/css/css_anchor_positioning/index.md
+++ b/files/en-us/web/css/css_anchor_positioning/index.md
@@ -44,7 +44,7 @@ In addition, the specification provides CSS-only mechanisms to:
- [``](/en-US/docs/Web/CSS/anchor#anchor-side)
- [``](/en-US/docs/Web/CSS/anchor-size#anchor-size)
- [``](/en-US/docs/Web/CSS/position-area_value)
-- [``](/en-US/docs/Web/CSS/position-try-order#try-side)
+- [``](/en-US/docs/Web/CSS/position-try-order#try-size)
- [``](/en-US/docs/Web/CSS/position-try-fallbacks#try-tactic)
### HTML attributes
diff --git a/files/en-us/web/css/css_anchor_positioning/try_options_hiding/index.md b/files/en-us/web/css/css_anchor_positioning/try_options_hiding/index.md
index 6c0a0f54aff8b77..a2de8935fede69c 100644
--- a/files/en-us/web/css/css_anchor_positioning/try_options_hiding/index.md
+++ b/files/en-us/web/css/css_anchor_positioning/try_options_hiding/index.md
@@ -22,7 +22,7 @@ If a tooltip is fixed to the top-right of a UI element, when the user scrolls th
Position-try fallback options can be specified using:
- [Predefined fallback options](#predefined_fallback_options).
-- [`position-area` values](#using-position-area_try_options).
+- [`position-area` values](#using_position-area_try_fallback_options).
- [Custom options](#custom_fallback_options) defined using the {{cssxref("@position-try")}} at-rule.
In addition, the {{cssxref("position-try-order")}} property allows you to specify various options that result in an available position try option being set in preference to the element's initial positioning. For example, you might want to initially display the element in a space that has more available height or width.
diff --git a/files/en-us/web/css/css_anchor_positioning/using/index.md b/files/en-us/web/css/css_anchor_positioning/using/index.md
index 1ff5503bcac2f3c..499838612717ab4 100644
--- a/files/en-us/web/css/css_anchor_positioning/using/index.md
+++ b/files/en-us/web/css/css_anchor_positioning/using/index.md
@@ -88,7 +88,7 @@ This will render as follows:
{{ EmbedLiveSample("CSS-only method", "100%", "120") }}
-The anchor and infobox are now associated, but for the moment you'll have to trust us on this. They are not tethered to each other yet — if you were to position the anchor and move it somewhere else on the page, it would move on its own, leaving the infobox in the same place. You'll see the actual tethering in action when we look at [positioning elements based on anchor position](#positioning_elements_based_on_anchor_position).
+The anchor and infobox are now associated, but for the moment you'll have to trust us on this. They are not tethered to each other yet — if you were to position the anchor and move it somewhere else on the page, it would move on its own, leaving the infobox in the same place. You'll see the actual tethering in action when we look at [positioning elements based on anchor position](#positioning_elements_relative_to_their_anchor).
### HTML method
@@ -145,10 +145,10 @@ We've associated the two elements, but they are not yet tethered. To tether them
## Positioning elements relative to their anchor
-As we saw above, associating a positioned element with an anchor is not really much use on its own. Our goal is to place the positioned element relative to its associated anchor element. This is done either by setting a [CSS `anchor()` function](#using-inset-properties-with-anchor-function-values) value on an [inset property](/en-US/docs/Glossary/Inset_properties), [specifying a `position-area`](#setting_a_position-area), or centering the positioned element with the [`anchor-center` placement value](#centering_on_the_anchor_using_anchor-center).
+As we saw above, associating a positioned element with an anchor is not really much use on its own. Our goal is to place the positioned element relative to its associated anchor element. This is done either by setting a [CSS `anchor()` function](#using_inset_properties_with_anchor_function_values) value on an [inset property](/en-US/docs/Glossary/Inset_properties), [specifying a `position-area`](#setting_a_position-area), or centering the positioned element with the [`anchor-center` placement value](#centering_on_the_anchor_using_anchor-center).
> [!NOTE]
-> The anchor element must be a visible DOM node for the association and positioning to work. If it is hidden (for example via [`display: none`](/en-US/docs/Web/CSS/display#none)), the positioned element will be positioned relative to its nearest positioned ancestor. We discuss how to hide an anchor-positioned element when its anchor disappears in [Conditional hiding using `position-visibility`](/en-US/docs/Web/CSS/CSS_anchor_positioning/Try_options_hiding#conditional_hiding_using_position-visibility).
+> The anchor element must be a visible DOM node for the association and positioning to work. If it is hidden (for example via [`display: none`](/en-US/docs/Web/CSS/display#none)), the positioned element will be positioned relative to its nearest positioned ancestor. We discuss how to hide an anchor-positioned element when its anchor disappears in [Conditional hiding using `position-visibility`](/en-US/docs/Web/CSS/CSS_anchor_positioning/Try_options_hiding#conditionally_hiding_anchor-positioned_elements).
### Using inset properties with `anchor()` function values
diff --git a/files/en-us/web/css/css_backgrounds_and_borders/index.md b/files/en-us/web/css/css_backgrounds_and_borders/index.md
index 44d3a7cde56938e..f44afe780728f48 100644
--- a/files/en-us/web/css/css_backgrounds_and_borders/index.md
+++ b/files/en-us/web/css/css_backgrounds_and_borders/index.md
@@ -122,7 +122,7 @@ To see the code for this sample, [view the source on GitHub](https://github.com/
- {{cssxref("box-decoration-break")}} property
- {{cssxref("text-shadow")}} property
-- {{cssxref("url", "url()")}} CSS function
+- {{cssxref("url_value", "<url>")}} CSS type
- [``](/en-US/docs/Web/CSS/color) data type
- [``](/en-US/docs/Web/CSS/image) data type
- [``](/en-US/docs/Web/CSS/position) data type
diff --git a/files/en-us/web/css/css_colors/index.md b/files/en-us/web/css/css_colors/index.md
index 01aa02b38725d1e..499cd454850188c 100644
--- a/files/en-us/web/css/css_colors/index.md
+++ b/files/en-us/web/css/css_colors/index.md
@@ -40,8 +40,8 @@ To see the code for this color syntax converter, [view the source on GitHub](htt
### Functions
- Color functions:
- - [`rgb()`](/en-US/docs/Web/CSS/color_value/rgb) and its `rgba()` alias
- - [`hsl()`](/en-US/docs/Web/CSS/color_value/hsl) and its `hsla()` alias
+ - [`rgb()`](/en-US/docs/Web/CSS/color_value/rgb)
+ - [`hsl()`](/en-US/docs/Web/CSS/color_value/hsl)
- [`hwb()`](/en-US/docs/Web/CSS/color_value/hwb)
- [`lab()`](/en-US/docs/Web/CSS/color_value/lab)
- [`lch()`](/en-US/docs/Web/CSS/color_value/lch)
diff --git a/files/en-us/web/css/css_colors/relative_colors/index.md b/files/en-us/web/css/css_colors/relative_colors/index.md
index c2045af97ea3f19..f28761fd670c689 100644
--- a/files/en-us/web/css/css_colors/relative_colors/index.md
+++ b/files/en-us/web/css/css_colors/relative_colors/index.md
@@ -171,9 +171,6 @@ rgb(from red r g b / alpha)
It is worth mentioning again that the color system of the origin color doesn't need to match the color system being used to create the output color. Again, this provides a lot of flexibility. Generally you won't be interested in and might not even know the system the origin color is defined in (you might just have a [custom property value](#using_custom_properties) to manipulate). You'll just want to input a color and, for example, create a lighter variant of it by putting it into an `hsl()` function and varying the lightness value.
-> [!NOTE]
-> Aliases such as `rgba()` or `hsla()` can be used to output relative colors, and to specify origin colors. When using legacy color functions to output a relative color, you must use the comma-less modern syntax and can't mix percentages and numbers.
-
## Using custom properties
When creating a relative color, you can use values defined in [CSS custom properties](/en-US/docs/Web/CSS/Using_CSS_custom_properties) both for the origin color and within the output color channel value definitions. Let's look at an example.
diff --git a/files/en-us/web/css/css_colors/using_color_wisely/index.md b/files/en-us/web/css/css_colors/using_color_wisely/index.md
index 28409ad193c5784..1e53c28c13053df 100644
--- a/files/en-us/web/css/css_colors/using_color_wisely/index.md
+++ b/files/en-us/web/css/css_colors/using_color_wisely/index.md
@@ -58,7 +58,7 @@ That said, ensure you have enough [color contrast](/en-US/docs/Web/Accessibility
In this example, we will create an appropriate color palette for a website for a game that takes place on the planet Mars. A [Google search for photos of Mars](https://www.google.com/search?q=Mars&tbm=isch) will output several color photos.
-Use a color picker tool to select a color sample for the base color. For this example, we've selected `#D79C7A`, which is a rusty orange-red color. We can use [Paletton](https://www.paletton.com/) to come up with the other colors for our palette. . Upon opening Paletton, we see:
+Use a color picker tool to select a color sample for the base color. For this example, we've selected `#D79C7A`, which is a rusty orange-red color. We can use [Paletton](https://www.paletton.com/) to come up with the other colors for our palette. Upon opening Paletton, we see:
![Right after loading Paletton.](paletton1.png)
diff --git a/files/en-us/web/css/css_containment/container_size_and_style_queries/index.md b/files/en-us/web/css/css_containment/container_size_and_style_queries/index.md
index 04e639284f3e917..7a3471e99da8ecb 100644
--- a/files/en-us/web/css/css_containment/container_size_and_style_queries/index.md
+++ b/files/en-us/web/css/css_containment/container_size_and_style_queries/index.md
@@ -12,7 +12,7 @@ browser-compat: css.at-rules.container
Container queries are similar to [media queries](/en-US/docs/Web/CSS/CSS_media_queries). The {{cssxref("@media")}} at-rule enables applying styles to elements based on viewport size or other device characteristics. Similarly, the {{cssxref("@container")}} at-rule enables applying styles to elements based on a containing element's size or other style features, rather than the viewport's. Container queries have the same syntax rules and logical operators as media queries.
```css
-@container {
+@container # {
/* */
}
```
@@ -66,38 +66,38 @@ The `` in this example contains a single `` —
## Naming containers
-A `` can include an optional case-sensitive {{cssxref("container-name")}}. In the form example, we could have limited the elements matched by the query by adding a name to the `` and then setting the {{cssxref("container-name")}} property with its value equal to the same name on the form elements we want to match.
+A `` can include an optional case-sensitive {{cssxref("container-name")}}. A container name makes the container condition more specific — it is evaluated only against elements that have that name set in the `container-name` property.
-The optional `` set within the query condition filters the set of query containers considered to just those with a matching query container name. The {{cssxref("container-name")}} property specifies a list of query container names that can be used by `@container` rules to filter which query containers are targeted. Names enable querying aspects of a specific container, even if the container is not a direct parent.
+The {{cssxref("container-name")}} property specifies a list of query `` values that can be used in `@container` rules; these are case-sensitive {{cssxref("ident")}} values. The container names enable targeting any container ancestor of the element. Without a container name, the query matches only the nearest container ancestor.
```css
-@container {
+@container [ [ ]? ]# {
/* */
}
```
-Once you've added names to your `@container` at rules, you can use the {{cssxref("container-name")}} property or the {{cssxref("container")}} shorthand to apply a space-separated list of names to container elements. Styles contained inside the named `@container` at rules will only be applied to matching elements inside size query containers with the same names set on them. The `` is a case-sensitive {{cssxref("ident")}}.
+After you add names to your `@container` at rules, you can use the {{cssxref("container-name")}} property or the {{cssxref("container")}} shorthand to target specific container elements. Styles inside the named `@container` at rules will be applied only to matching elements inside containers with those names set, which satisfy the container queries.
```css
@container card (orientation: landscape) {
/* styles */
}
-.cards li {
+.todo-panel > li {
container-type: inline-size;
container-name: card;
}
```
-This example size query is limited to elements with a `container-name` of `card` applied to them. In this example, the styles within the container query style block will apply to the descendants of all {{htmlelement("li")}} elements nested within an element with a class of `cards` with a width that is greater than their height. Note that if there are other elements with `container-name: card` applied to them that match the size query, the styles will also be applied to those elements' descendants.
+In the above example, the styles within the container query block will apply to the descendants of all {{htmlelement("li")}} elements with a width that is greater than their height. Note that other elements with `container-name: card` applied to them that match the size query will also have these styles applied to their elements' descendants.
```css
-@container wide (orientation: landscape) and (min-width: 20em) {
- /* styles applied to descendants of .sizeContainer if size features match */
+@container wide (min-width: 20em) {
+ /* styles applied to descendants of wide .sizeContainer */
}
-@container narrow (orientation: portrait) or (max-width: 20em) {
- /* styles applied to descendants of .sizeContainer if size features match */
+@container narrow (max-width: 20em) {
+ /* styles applied to descendants of narrow .sizeContainer */
}
.sizeContainer {
@@ -106,29 +106,9 @@ This example size query is limited to elements with a `container-name` of `card`
}
```
-In this container size query example, the element has two container names. The descendants of any elements with `class="sizeContainer"` will get the styles from the `wide` or `narrow` query applied (or both if that element is exactly a 20em square).
+In the above example, the element has two container names, `wide` and `narrow`. The descendants of any elements with `class="sizeContainer"` will get the styles from the `wide` or `narrow` query applied (or both if an element is precisely 20em wide).
-Container names also enable querying styles from elements that aren't a direct parent. When a containment context is given a name, it can be specifically targeted using the `@container` at-rule instead of the nearest ancestor with containment.
-
-Set `container-name: none` to prevent the container from matching any named container queries. That removes all associated container query names, but does not prevent the element from matching unnamed queries.
-
-To prevent an element from being a size container, set `container-type: normal`. This removes containment, meaning the element isn't a size container (it can still be a [style container](#container_style_queries)).
-
-To prevent an element from being matched by any container queries, provide it with an unused `container-name`.
-
-```css
-article {
- container-name: none;
- container-type: size;
-}
-
-main {
- container-name: neverUsedName;
- container-type: normal;
-}
-```
-
-In the above example, the {{htmlelement("article")}} element can match any unnamed container query. In other words, it will be tested by each `@container` query that doesn't include a name in the ``. On the other hand, assuming the `neverUsedName` is never used as a container query name, the {{htmlelement("main")}} element will never be queried. Even if that name was removed, it would still not be tested against any size queries as the `container-type` value of `normal` means it is not a size query container.
+The default value `container-type: normal` prevents the container from being a size container, but it can still be a [style container](#container_style_queries). The default value `container-name: none` states the container has no name, but it does not prevent the element from matching unnamed queries.
With container queries, we are not limited to size queries! You can also query a container's style features.
@@ -286,7 +266,7 @@ In this example, we have a {{htmlelement("fieldset")}} with four radio buttons.
```
-JavaScript updates the value of the CSS `--theme` variable on the {{htmlelement("body")}} element, which is an ancestor of the {{htmlelement("fieldset")}} and {{htmlelement("output")}} elements, whenever a radio button is selected. When the text `` is updated, the {{domxref("HTMLInputElement.value", "value")}} of the `other` radio button is updated only if the `other` radio button is {{domxref("HTMLInputElement.checked", "checked")}}, which in turn updates the value of `--theme`.
+JavaScript updates the value of the CSS `--theme` variable on the {{htmlelement("body")}} element, which is an ancestor of the {{htmlelement("fieldset")}} and {{htmlelement("output")}} elements, whenever a radio button is selected. When the text `` is updated, the {{domxref("HTMLInputElement.value", "value")}} of the `other` radio button is updated only if the `other` radio button is checked, which in turn updates the value of `--theme`.
```js
const radios = document.querySelectorAll('input[name="selection"]');
diff --git a/files/en-us/web/css/css_counter_styles/using_css_counters/index.md b/files/en-us/web/css/css_counter_styles/using_css_counters/index.md
index e2acf181ffb8ff1..958b102b118c1a7 100644
--- a/files/en-us/web/css/css_counter_styles/using_css_counters/index.md
+++ b/files/en-us/web/css/css_counter_styles/using_css_counters/index.md
@@ -8,15 +8,21 @@ spec-urls: https://drafts.csswg.org/css-lists/#auto-numbering
{{CSSRef}}
**CSS counters** let you adjust the appearance of content based on its location in a document.
-For example, you can use counters to automatically number the headings in a webpage, or to change the numbering on ordered lists.
+For example, you can use counters to automatically number the headings on a webpage or to change the numbering on ordered lists.
+
+Counters are, in essence, variables maintained by CSS whose values may be incremented or decremented by CSS rules that track how many times they're used. The following things affect the counter values on an element:
+
+1. Counters are [inherited](#counter_inheritance_and_propagation) from the parent element or received from a previous sibling.
+2. New counters are instantiated using {{cssxref("counter-reset")}} property.
+3. Counters are incremented using {{cssxref("counter-increment")}} property.
+4. Counters are directly set to a value using the {{cssxref("counter-set")}} property.
-Counters are, in essence, variables maintained by CSS whose values may be incremented or decremented by CSS rules that track how many times they're used.
You can define your own named counters, and you can also manipulate the `list-item` counter that is created by default for all ordered lists.
## Using counters
To use a counter it must first be initialized to a value with the {{cssxref("counter-reset")}} property.
-The counter's value can then be increased or decreased using {{cssxref("counter-increment")}} property.
+The counter's value can be increased or decreased using the {{cssxref("counter-increment")}} property and can be directly set to a specific value using the {{cssxref("counter-set")}} property.
The current value of a counter is displayed using the {{cssxref("counter", "counter()")}} or {{cssxref("counters", "counters()")}} function, typically within a [pseudo-element](/en-US/docs/Web/CSS/Pseudo-elements) {{CSSxRef("content")}} property.
Counters can only be set, reset, or incremented in elements that generate boxes.
@@ -51,7 +57,15 @@ h3::before {
}
```
-You can specify the value to increment or decrement the counter after the counter name, using a positive or negative number.
+You can specify the increment or decrement amount after the counter name. It can be a positive or negative number, but defaults to `1` if no integer is provided.
+
+Apart from being incremented or decremented, counters can also be explicitly set to a value using the {{cssxref("counter-set")}} property.
+
+```css
+.done::before {
+ counter-set: section 20;
+}
+```
The counter's name must not be `none`, `inherit`, or `initial`; otherwise the declaration is ignored.
@@ -129,6 +143,152 @@ The counter value is decreased by specifying a negative value for {{cssxref("cou
> You can also use {{cssxref("counter-increment")}} to decrement a non-reversed counter.
> The main benefit of using a reversed counter is the default initial value, and that the `list-item` counter automatically decrements reversed counters.
+### Counter inheritance and propagation
+
+Each element or pseudo-element has a set of counters in the scope of that element. Initial counters in the set are received from the element's parent and the preceding sibling. The counter values are received from the last descendent of the previous sibling, the last sibling, or the parent.
+
+When an element declares a counter, the counter is nested inside the counter with the same name received from the parent. If the parent doesn't have a counter with the same name then the counter is added to the element's counters set as it is. A counter with the same name received from the previous sibling is removed from the counters set.
+
+The {{cssxref("counter", "counter()")}} function retrieves the innermost counter with the provided name. And the {{cssxref("counters", "counters()")}} function retrieves the entire counter tree with the given name.
+
+In the following example, we are demoing an inherited counter named `primary` and a sibling counter named `secondary`. All the `
` elements display their counters using the `counters()` function. Note that all the counters have been created using `counter-reset` property, and none of the counters have been incremented.
+
+```html
+
+ counter-reset: primary 3
+
`s receive the inherited `primary` counter. The element 'D' creates a new `primary` (value `6`) counter which gets nested in the counter received from the parent, so the element has two counters named `primary` with values `3` and `6`.
+
+The element 'F' creates the `secondary` (value `5`) counter for the first time, and it passes the counter to the next sibling 'G'. The element 'G' passes the counter to the next element 'H' and so on. Next, the element 'I' creates a new counter with the same name `secondary` (value `10`), but it drops the `secondary` (value `5`) counter received from the previous sibling 'H' and passes its own counter to 'J'.
+
+### Difference between counter-set and counter-reset
+
+The {{cssxref("counter-set")}} property updates an existing counter and if no counter with the name exists then a new counter is instantiated. The {{cssxref("counter-reset")}} property _always_ creates a new counter.
+
+In the following example, we have two sub-lists inside a parent list. Each list item has been numbered using a counter named 'item'. The first sub-list uses {{cssxref("counter-set")}} property and the second sub-list uses {{cssxref("counter-reset")}} property to change the 'item' counter.
+
+```html
+
+
A
+
B
+
+ C (the counter updated using `counter-set`)
+
+
sub-A
+
sub-B
+
+
+
D
+
+ E (a new counter created using `counter-reset`)
+
+
sub-A
+
sub-B
+
sub-C
+
+
+
F
+
G
+
+```
+
+```css hidden
+ul {
+ list-style: none;
+}
+```
+
+```css
+/* create a new counter for the first time */
+.parent {
+ counter-reset: item 0;
+}
+
+/* increment the counter on each list item */
+li {
+ counter-increment: item;
+}
+
+/* show numbers on list items */
+li::before {
+ content: counter(item) " ";
+}
+
+/* change the existing counter value */
+.sub-list-one {
+ counter-set: item 10;
+}
+
+/* change the counter value */
+.sub-list-two {
+ counter-reset: item 0;
+}
+```
+
+{{EmbedLiveSample("Difference between counter-set and counter-reset", "100%", 300)}}
+
+Notice how the first sub-list items start receiving numbers from `11`, and the numbering is continued in the parent list. This is because the `counter-set` property updates the same 'item' counter declared on the `.parent` element. Then notice how the second sub-list items receive new numbering starting from '1' and the parent list items after it don't carry forward the numbering. This is because the `counter-reset` property created a new counter with the same name so the parent list items kept using the old counter.
+
### List item counters
Ordered lists, as created using {{HTMLElement("ol")}} elements, implicitly have a counter named `list-item`.
diff --git a/files/en-us/web/css/css_display/block_formatting_context/index.md b/files/en-us/web/css/css_display/block_formatting_context/index.md
index a2ea5019748118c..d286fb1811e5a07 100644
--- a/files/en-us/web/css/css_display/block_formatting_context/index.md
+++ b/files/en-us/web/css/css_display/block_formatting_context/index.md
@@ -51,7 +51,7 @@ The problem with using `overflow` to create a new BFC is that the `overflow` pro
**using `display: flow-root`**
-The `display: flow-root` value lets us create a new BFC without any other potentially problematic side-effects. Using `display: flow-root` on the containing block creates a new BFC .
+The `display: flow-root` value lets us create a new BFC without any other potentially problematic side-effects. Using `display: flow-root` on the containing block creates a new BFC.
With `display: flow-root;` on the `
`, everything inside that container participates in the block formatting context of that container, and floats will not poke out of the bottom of the element.
diff --git a/files/en-us/web/css/css_flexible_box_layout/aligning_items_in_a_flex_container/index.md b/files/en-us/web/css/css_flexible_box_layout/aligning_items_in_a_flex_container/index.md
index 5d4cd38c06ae35e..690dfb455ad27d4 100644
--- a/files/en-us/web/css/css_flexible_box_layout/aligning_items_in_a_flex_container/index.md
+++ b/files/en-us/web/css/css_flexible_box_layout/aligning_items_in_a_flex_container/index.md
@@ -89,7 +89,7 @@ The `align-content` property takes the following values:
- `align-content: flex-start`
- `align-content: flex-end`
- `align-content: start`
-- `align-content: fend`
+- `align-content: end`
- `align-content: center`
- `align-content: space-between`
- `align-content: space-around`
diff --git a/files/en-us/web/css/css_functions/index.md b/files/en-us/web/css/css_functions/index.md
index 319e7c44cdb881f..fe91068f12be3cc 100644
--- a/files/en-us/web/css/css_functions/index.md
+++ b/files/en-us/web/css/css_functions/index.md
@@ -229,7 +229,7 @@ The {{CSSxRef("<image>")}} CSS [data type](/en-US/docs/Web/CSS/CSS_Types)
### Image functions
- {{CSSxRef("image/image","image()")}}
- - : Defines an {{CSSxRef("<image>")}} in a similar fashion to the {{CSSxRef("url", "url()")}} function, but with added functionality including specifying the image's directionality and fallback images for when the preferred image is not supported.
+ - : Defines an {{CSSxRef("<image>")}} in a similar fashion to the {{cssxref("url_value", "<url>")}} type, but with added functionality including specifying the image's directionality and fallback images for when the preferred image is not supported.
- {{CSSxRef("image/image-set","image-set()")}}
- : Picks the most appropriate CSS image from a given set, primarily for high pixel density screens.
- {{CSSxRef("cross-fade", "cross-fade()")}}
@@ -279,7 +279,7 @@ The following functions are used as a value of properties to reference a value d
- : Uses the attributes defined on HTML element.
- {{CSSxRef("env", "env()")}}
- : Uses the user-agent defined as environment variable.
-- {{CSSxRef("url", "url()")}}
+- {{cssxref("url_value", "<url>")}}
- : Uses a file from the specified URL.
- {{CSSxRef("var", "var()")}}
- : Uses the custom property value instead of any part of a value of another property.
@@ -288,7 +288,7 @@ The following functions are used as a value of properties to reference a value d
The following functions are used to define a [CSS grid](/en-US/docs/Web/CSS/CSS_grid_layout).
-- {{CSSxRef("fit-content", "fit-content()")}}
+- {{CSSxRef("fit-content_function", "fit-content()")}}
- : Clamps a given size to an available size according to the formula `min(maximum size, max(minimum size, argument))`.
- {{CSSxRef("minmax", "minmax()")}}
- : Defines a size range greater-than or equal-to _min_ and less-than or equal-to _max_.
diff --git a/files/en-us/web/css/css_grid_layout/grids_logical_values_and_writing_modes/index.md b/files/en-us/web/css/css_grid_layout/grids_logical_values_and_writing_modes/index.md
index accd34ef7ac5353..11b307bf9e03ef7 100644
--- a/files/en-us/web/css/css_grid_layout/grids_logical_values_and_writing_modes/index.md
+++ b/files/en-us/web/css/css_grid_layout/grids_logical_values_and_writing_modes/index.md
@@ -35,7 +35,7 @@ We call these keywords and properties _physical_ because they relate to the scre
### Issues with physical properties
-This can become an issue when developing a site that has to work in multiple languages, including languages that have text starting on the right, rather than the left. Browsers are pretty good at dealing with text direction, and you don't even need to be working in a {{glossary("rtl")}} language to take a look. In the example below, I have two paragraphs. The first paragraph has {{cssxref("text-align")}} set to `left`, the second has no `text-align` property set. I have added `dir="rtl"` to the `html` element, which switches the writing mode from the default for an English language document of `ltr`. You can see that the first paragraph remains left to right, due to the `text-align` value being `left`. The second however, switches direction and the text runs from right to left .
+This can become an issue when developing a site that has to work in multiple languages, including languages that have text starting on the right, rather than the left. Browsers are pretty good at dealing with text direction, and you don't even need to be working in a {{glossary("rtl")}} language to take a look. In the example below, I have two paragraphs. The first paragraph has {{cssxref("text-align")}} set to `left`, the second has no `text-align` property set. I have added `dir="rtl"` to the `html` element, which switches the writing mode from the default for an English language document of `ltr`. You can see that the first paragraph remains left to right, due to the `text-align` value being `left`. The second however, switches direction and the text runs from right to left.
```html hidden