Skip to content

feat(material/core): add mixins for Material Design typography#32959

Open
mikzat wants to merge 1 commit intoangular:mainfrom
mikzat:main
Open

feat(material/core): add mixins for Material Design typography#32959
mikzat wants to merge 1 commit intoangular:mainfrom
mikzat:main

Conversation

@mikzat
Copy link

@mikzat mikzat commented Mar 20, 2026

Angular provides CSS system variables for Material typography, but the variable for "font" is not able to set letter-spacing, which requires users to remember to set letter-spacing separately:

  .mat-font-body-sm {
    font: var(--mat-sys-body-small);
    letter-spacing: var(--mat-sys-body-small-tracking);
  }

This change introduces typography mixins that ensure that both properties are set together, so the above snippet becomes:

  .mat-font-body-sm {
    @include typography.body-small();
  }

End-users can apply these mixins from the mat. entrypoint with a typography- prefix:

  .mat-font-body-sm {
    @include mat.typography-body-small();
  }

@pullapprove pullapprove bot requested review from crisbeto and ok7sai March 20, 2026 22:26
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: material/core labels Mar 20, 2026
@andrewseguin andrewseguin added target: major This PR is targeted for the next major release dev-app preview When applied, previews of the dev-app are deployed to Firebase docs: preview When applied, a preview of the documentation site is deployed to Firebase labels Mar 20, 2026
@ok7sai ok7sai requested a review from andrewseguin March 20, 2026 22:35
@github-actions
Copy link

Deployed dev-app for 8d3ba6c to: https://ng-dev-previews-comp--pr-angular-components-32959-dev-w27na8v1.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@github-actions
Copy link

Deployed docs-preview for 8d3ba6c to: https://ng-dev-previews-comp--pr-angular-components-32959-docs-9y7jc320.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

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

Labels

area: material/core detected: feature PR contains a feature commit dev-app preview When applied, previews of the dev-app are deployed to Firebase docs: preview When applied, a preview of the documentation site is deployed to Firebase target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants