From 4cfa20e285e1f108739d86266a2676f7c6de4f1e Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya Date: Tue, 16 Dec 2025 07:42:23 -0500 Subject: [PATCH 1/3] Replace at-rule links with cssxref in web/http Search string: \[`([^`]+?)`\]\(/en-US/docs/Web/CSS/Reference/At-rules/\1\) Replace string: {{cssxref("$1")}} --- .../http/guides/browser_detection_using_the_user_agent/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/http/guides/browser_detection_using_the_user_agent/index.md b/files/en-us/web/http/guides/browser_detection_using_the_user_agent/index.md index 559dc2cc4f90923..b2e2f44f9863757 100644 --- a/files/en-us/web/http/guides/browser_detection_using_the_user_agent/index.md +++ b/files/en-us/web/http/guides/browser_detection_using_the_user_agent/index.md @@ -94,7 +94,7 @@ if ("virtualKeyboard" in navigator) { } ``` -For styles, you can also do feature detection in CSS using the [`@supports`](/en-US/docs/Web/CSS/Reference/At-rules/@supports) at-rule, combined with the `not` keyword if you want to check for the absence of a feature. +For styles, you can also do feature detection in CSS using the {{cssxref("@supports")}} at-rule, combined with the `not` keyword if you want to check for the absence of a feature. See [Using feature queries](/en-US/docs/Web/CSS/Guides/Conditional_rules/Using_feature_queries) for information on using this in CSS. ```css From 9868d18bd42e6ef82a51f43ccf5a03d3f121d08e Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya Date: Tue, 16 Dec 2025 07:44:39 -0500 Subject: [PATCH 2/3] Replace media at-rule features with cssxref macro in /web/http Search: \[`([^`]+)`\]\(/en-US/docs/Web/CSS/Reference/At-rules/(@media/[^)]+)\) Replace: {{cssxref("$2")}} --- files/en-us/web/http/reference/headers/save-data/index.md | 2 +- .../http/reference/headers/sec-ch-prefers-color-scheme/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/http/reference/headers/save-data/index.md b/files/en-us/web/http/reference/headers/save-data/index.md index c9063555ec28efe..377c0b536728e18 100644 --- a/files/en-us/web/http/reference/headers/save-data/index.md +++ b/files/en-us/web/http/reference/headers/save-data/index.md @@ -115,7 +115,7 @@ Content-Type: image/jpeg ## See also -- CSS `@media` feature [`prefers-reduced-data`](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-data) {{experimental_inline}} +- CSS `@media` feature {{cssxref("@media/prefers-reduced-data")}} {{experimental_inline}} - {{HTTPHeader("Vary")}} header which indicates that the content served varies depending on the value of `Save-Data` (see [HTTP Caching: Vary](/en-US/docs/Web/HTTP/Guides/Caching#vary)) - {{domxref("NetworkInformation.saveData")}} - [Help Your Users `Save-Data`](https://css-tricks.com/help-users-save-data/) on css-tricks.com diff --git a/files/en-us/web/http/reference/headers/sec-ch-prefers-color-scheme/index.md b/files/en-us/web/http/reference/headers/sec-ch-prefers-color-scheme/index.md index 06c59785ce3ea21..b4bbd3a7d9e94d8 100644 --- a/files/en-us/web/http/reference/headers/sec-ch-prefers-color-scheme/index.md +++ b/files/en-us/web/http/reference/headers/sec-ch-prefers-color-scheme/index.md @@ -38,7 +38,7 @@ This header is modeled on the {{cssxref("@media/prefers-color-scheme", "prefers- The **`Sec-CH-Prefers-Color-Scheme`** header allows sites to obtain user color scheme preference at request time; they could then choose to provide the relevant CSS for the user's preference inline, for performance reasons. If the server inlines the CSS, it might want to include a {{HTTPHeader("Vary")}} response header specifying `Sec-CH-Prefers-Color-Scheme`, to indicate that the response is tailored for a particular color scheme. -If performance is not a critical consideration in this context, you could instead handle the user's color scheme preference using the [`prefers-color-scheme`](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme) media query, and/or the {{domxref("Window.matchMedia()")}} API. +If performance is not a critical consideration in this context, you could instead handle the user's color scheme preference using the {{cssxref("@media/prefers-color-scheme")}} media query, and/or the {{domxref("Window.matchMedia()")}} API. `Sec-CH-Prefers-Color-Scheme` is a high entropy hint so the site needs to opt into receiving it by sending an appropriate {{HTTPHeader("Accept-CH")}} response header. A user agent may intentionally omit the `Sec-CH-Prefers-Color-Scheme` header to preserve user privacy since the user's preference could, in theory, be used for fingerprinting. From 15cae416216b44aa5a38516eb68836b790498dba Mon Sep 17 00:00:00 2001 From: Dipika Bhattacharya Date: Tue, 16 Dec 2025 07:48:23 -0500 Subject: [PATCH 3/3] manual media at-rule link replacements --- .../http/reference/headers/sec-ch-prefers-color-scheme/index.md | 2 +- .../reference/headers/sec-ch-prefers-reduced-motion/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/http/reference/headers/sec-ch-prefers-color-scheme/index.md b/files/en-us/web/http/reference/headers/sec-ch-prefers-color-scheme/index.md index b4bbd3a7d9e94d8..a9c1f104533c0ab 100644 --- a/files/en-us/web/http/reference/headers/sec-ch-prefers-color-scheme/index.md +++ b/files/en-us/web/http/reference/headers/sec-ch-prefers-color-scheme/index.md @@ -103,5 +103,5 @@ The client will include the header in subsequent requests in the current session - [User-Agent Client Hints API](/en-US/docs/Web/API/User-Agent_Client_Hints_API) - {{HTTPHeader("Accept-CH")}} - [HTTP Caching varying responses](/en-US/docs/Web/HTTP/Guides/Caching#vary) and {{HTTPHeader("Vary")}} header -- [`prefers-color-scheme` CSS Media Query](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme) +- {{cssxref("@media/prefers-color-scheme")}} CSS media query - [Improving user privacy and developer experience with User-Agent Client Hints](https://developer.chrome.com/docs/privacy-security/user-agent-client-hints) (developer.chrome.com) diff --git a/files/en-us/web/http/reference/headers/sec-ch-prefers-reduced-motion/index.md b/files/en-us/web/http/reference/headers/sec-ch-prefers-reduced-motion/index.md index 7973fc709bf64bf..210619ee5860f08 100644 --- a/files/en-us/web/http/reference/headers/sec-ch-prefers-reduced-motion/index.md +++ b/files/en-us/web/http/reference/headers/sec-ch-prefers-reduced-motion/index.md @@ -91,6 +91,6 @@ The client will include the header in subsequent requests in the current session - [Client hints](/en-US/docs/Web/HTTP/Guides/Client_hints) - [User-Agent Client Hints API](/en-US/docs/Web/API/User-Agent_Client_Hints_API) - {{HTTPHeader("Accept-CH")}} -- [`prefers-reduced-motion` CSS Media Query](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion) +- {{cssxref("@media/prefers-reduced-motion")}} CSS media query - [HTTP Caching: Vary](/en-US/docs/Web/HTTP/Guides/Caching#vary) and {{HTTPHeader("Vary")}} header - [Improving user privacy and developer experience with User-Agent Client Hints](https://developer.chrome.com/docs/privacy-security/user-agent-client-hints) (developer.chrome.com)