Skip to content

docs(multiple): fix links to theming guide sections that no longer exist - #34199

Open
andretorresdg wants to merge 1 commit into
angular:mainfrom
andretorresdg:theming-guide-anchors
Open

andretorresdg wants to merge 1 commit into
angular:mainfrom
andretorresdg:theming-guide-anchors

Conversation

@andretorresdg

Copy link
Copy Markdown

Two docs pages link to sections of the theming guide that were removed when the guide was rewritten
for the mat.theme API in v19:

  • src/material/form-field/form-field.md ("Theming") links to
    /guide/theming#using-component-color-variants
  • guides/material-2.md ("How to migrate...") links to
    https://material.angular.dev/guide/theming#theme-your-own-components-using-a-material-3-theme

Neither anchor exists in the current guides/theming.md, so both links land at the top of the
theming guide, which no longer covers these topics. Both topics, the $color-variant parameter of
the component theme mixins and reading values from a theme built with mat.define-theme, are still
documented in the v18 theming guide. The current theming guide already points readers there for
define-theme based themes (guides/theming.md, lines 10-14).

This points both links at the matching sections on v18.material.angular.dev. Docs-only change.

How I tested

  • Rendered the heading IDs of guides/theming.md on main with the same slug function the docs
    renderer uses (slugify(text, {lower: true, strict: true})). Neither anchor exists.
  • Rendered the heading IDs of guides/theming.md on the 18.2.x branch with the slugger the 18.x
    renderer used (marked@2 Slugger). Both anchors exist (## Using component color variants,
    ## Theme your own components using a Material 3 theme).
  • Rendered both changed files with the repo's tools/markdown-to-html renderer (locked
    marked/slugify versions): no errors, and the rendered hrefs are the new URLs. I did not run the
    Bazel docs build.

The form field overview links to `/guide/theming#using-component-color-variants`
and the Material 2 theming guide links to
`/guide/theming#theme-your-own-components-using-a-material-3-theme`. Both sections were
removed from the theming guide when it was rewritten for the `mat.theme` API in v19, so
the links land at the top of an unrelated page.

The content they describe (the `$color-variant` parameter and reading values from a theme
created with `mat.define-theme`) still lives in the v18 theming guide, which the current
theming guide already points to for `define-theme` based themes. Point both links there.
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Nov 29, 2026
@pullapprove
pullapprove Bot requested review from andrewseguin and ok7sai November 29, 2026 23:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant