Skip to content

Conversation

@dipikabh
Copy link
Contributor

Search: \[`([^`]+?)`\]\(/en-US/docs/Web/CSS/Reference/Properties/\1\)
Replace: {{cssxref("$1")}}
Search: \[`([^`]+?)`\]\(/en-US/docs/Web/CSS/Reference/Selectors/\1\)
Replace: {{cssxref("$1")}}
Search: \[`([^`]+?)`\]\(/en-US/docs/Web/CSS/Reference/At-rules/\1\)
Replace: {{cssxref("$1")}}
Search: \[`([^/]+)\(\)`\]\(/en-US/docs/Web/CSS/Reference/Values/(filter-function)/\1\)
Replace: {{cssxref("$2/$1", "$1()")}}
Search: \[`([^/]+)\(\)`\]\(/en-US/docs/Web/CSS/Reference/Values/(transform-function)/\1\)
Replace: {{cssxref("$2/$1", "$1()")}}
Search: \[`([^/]+)\(\)`\]\(/en-US/docs/Web/CSS/Reference/Values/\1\)
Replace: {{cssxref("$1()")}}
    Search: [`<color>`](/en-US/docs/Web/CSS/Reference/Values/color_value)
    Replace: {{cssxref("&lt;color&gt;")}}
Search: {{CSSXref(":host_function", ":host()")}}
Replace: {{cssxref(":host()")}}

manual update for `host-context()` macro usage
Search:
  for pseudo-class: \[`(:[a-z-]+(?:\(\))?)`\]\(/en-US/docs/Web/CSS/Reference/Selectors/[^)]+\)
  for pseudo-element: \[`(::[a-z-]+(?:\(\))?)`\]\(/en-US/docs/Web/CSS/Reference/Selectors/[^)]+\)
Replace: {{cssxref("$1")}}
Search: \[`([^`]+)`\]\(/en-US/docs/Web/CSS/Reference/At-rules/(@media/[^)]+)\)
Replace: {{cssxref("$2")}}
Search: \[`([^`]+)\(\)`\]\(/en-US/docs/Web/CSS/Reference/Values/(color_value/[^)]+)\)
Replace: {{cssxref("$2", "$1()")}}
Search: \[`<([^>]+)>`\]\(/en-US/docs/Web/CSS/Reference/Values/[^)]+\)
Replace: {{cssxref("&1")}}
… (missing code fence in link text)

Search: \[([a-z-]+\(\))\]\(/en-US/docs/Web/CSS/Reference/Values/(transform-function/[^)]+)\)
Replace: {{cssxref("$2", "$1")}}
@dipikabh dipikabh requested a review from a team as a code owner December 16, 2025 19:59
@dipikabh dipikabh requested review from hamishwillee and removed request for a team December 16, 2025 19:59
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Dec 16, 2025
@github-actions
Copy link
Contributor

Preview URLs (63 pages)
Flaws (10)

Note! 57 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/CSSFunctionDeclarations
Title: CSSFunctionDeclarations
Flaw count: 1

  • macros:
    • Macro cssxref produces link /en-US/docs/Web/CSS/color which is a redirect

URL: /en-US/docs/Web/API/CSSFunctionDescriptors
Title: CSSFunctionDescriptors
Flaw count: 1

  • macros:
    • Macro cssxref produces link /en-US/docs/Web/CSS/color which is a redirect

URL: /en-US/docs/Web/API/CSSFunctionRule
Title: CSSFunctionRule
Flaw count: 1

  • macros:
    • Macro cssxref produces link /en-US/docs/Web/CSS/color which is a redirect

URL: /en-US/docs/Web/API/CSSMathValue/operator
Title: CSSMathValue: operator property
Flaw count: 1

  • macros:
    • Macro domxref produces link /en-US/docs/Web/API/CSSMathClamp which doesn't resolve

URL: /en-US/docs/Web/API/Web_components/Using_custom_elements
Title: Using custom elements
Flaw count: 3

  • macros:
    • Macro defaultapisidebar produces link /en-US/docs/Web/Web_Components/Using_custom_elements which is a redirect
    • Macro defaultapisidebar produces link /en-US/docs/Web/Web_Components/Using_shadow_DOM which is a redirect
    • Macro defaultapisidebar produces link /en-US/docs/Web/Web_Components/Using_templates_and_slots which is a redirect

URL: /en-US/docs/Web/API/Web_components/Using_shadow_DOM
Title: Using shadow DOM
Flaw count: 3

  • macros:
    • Macro defaultapisidebar produces link /en-US/docs/Web/Web_Components/Using_custom_elements which is a redirect
    • Macro defaultapisidebar produces link /en-US/docs/Web/Web_Components/Using_shadow_DOM which is a redirect
    • Macro defaultapisidebar produces link /en-US/docs/Web/Web_Components/Using_templates_and_slots which is a redirect
External URLs (1)

URL: /en-US/docs/Web/API/Element/animate
Title: Element: animate() method

of the following filter functions in a string.

- [`url()`](/en-US/docs/Web/CSS/Reference/Values/url_function)
- {{cssxref("url_function", "url()")}}
Copy link
Member

Choose a reason for hiding this comment

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

Note the next line specifies that it expects a URL, which I guess is <url> not url().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this had tripped me up as well and I checked Blame which suggested its been url() in both places: 592bea2

The `getSubStringLength()` method of the {{domxref("SVGTextContentElement")}} interface represents the computed length of the formatted text advance distance for a substring of text within the element.

Note that this method only accounts for the widths of the glyphs in the substring and any extra spacing inserted by the CSS [`letter-spacing`](/en-US/docs/Web/CSS/Reference/Properties/letter-spacing) and [`word-spacing`](/en-US/docs/Web/CSS/Reference/Properties/word-spacing) properties. Visual spacing adjustments made by the [`x`](/en-US/docs/Web/CSS/Reference/Properties/x) attribute are ignored.
Note that this method only accounts for the widths of the glyphs in the substring and any extra spacing inserted by the CSS {{cssxref("letter-spacing")}} and {{cssxref("word-spacing")}} properties. Visual spacing adjustments made by the {{cssxref("x")}} attribute are ignored.
Copy link
Member

Choose a reason for hiding this comment

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

I think x is referring to Web/SVG/Reference/Attribute/x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original addition has a link to /en-US/docs/Web/CSS/x. See #37378.

Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Two comments, but otherwise LGTM, thanks 👍🏻

@dipikabh
Copy link
Contributor Author

Thanks a lot for the review!
Both your comments are plausible, and perhaps we can take them up outside this PR.

@dipikabh dipikabh merged commit 0c13af5 into mdn:main Dec 17, 2025
7 checks passed
@dipikabh dipikabh deleted the cssxref-api branch December 17, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants