Skip to content

Comments

docs(theming): fix incorrect M2 API names in theming-your-components guide#32834

Open
yogeshwaran-c wants to merge 1 commit intoangular:mainfrom
yogeshwaran-c:docs/fix-m2-api-names-theming-guide
Open

docs(theming): fix incorrect M2 API names in theming-your-components guide#32834
yogeshwaran-c wants to merge 1 commit intoangular:mainfrom
yogeshwaran-c:docs/fix-m2-api-names-theming-guide

Conversation

@yogeshwaran-c
Copy link

What kind of change does this PR introduce?

Documentation fix

What is the current behavior?

The M2 Support section of the theming-your-components guide uses incorrect
Sass API names:

  • mat.define-palette instead of mat.m2-define-palette
  • mat.$indigo-palette instead of mat.$m2-indigo-palette

These names do not exist in the flat @angular/material namespace. Since v19,
M2 APIs are re-exported with the m2- prefix
(@forward './core/m2' as m2-* in _index.scss), so the correct names are
mat.m2-define-palette and mat.$m2-indigo-palette.

What is the new behavior?

Updates the code example in the M2 Support section to use the correct prefixed
API names that match the current @angular/material public API.

Additional context

The material-2.md guide already uses the correct m2- prefixed names
throughout. This change aligns the theming-your-components.md guide with that
convention.

@pullapprove pullapprove bot requested review from andrewseguin and ok7sai February 23, 2026 20:32
@angular-robot angular-robot bot added area: docs Related to the documentation area: theming labels Feb 23, 2026
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 area: theming

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant