Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/core): change ng-add to use mat.theme #29990

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

andrewseguin
Copy link
Contributor

No description provided.

@andrewseguin andrewseguin requested a review from a team as a code owner November 8, 2024 21:22
@andrewseguin andrewseguin requested review from crisbeto and wagnermaciel and removed request for a team November 8, 2024 21:22
@andrewseguin andrewseguin added the target: rc This PR is targeted for the next release-candidate label Nov 8, 2024

// Comment out the line below if you want to use the pre-defined typography utility classes.
// For more information: https://material.angular.io/guide/typography#using-typography-styles-in-your-application.
// @include mat.typography-hierarchy($${name}-theme);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there an equivalent for these optional bits with the new system? Or are we changing to a more opinionated stance of either automatically including these as part of the new mixin or just recommending not to use them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer recommending that clients just depend on the system variables where they want them. For example they can make their own custom setup like:

h1 {
  font: var(--mat-sys-headline-large);
}

h2 {
  font: var(--mat-sys-headline-medium);
}

h3 {
  font: var(--mat-sys-headline-small);
}

My hope is that we can get folks to generally just need to know about mat.theme and the available variables. This also seems to match with Material's departure from their previous opinionated typography names: https://m2.material.io/develop/web/guides/typography

@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Nov 11, 2024
@andrewseguin andrewseguin merged commit 0a5b036 into angular:main Nov 11, 2024
24 checks passed
andrewseguin added a commit that referenced this pull request Nov 11, 2024
* fix(material/core): change ng-add to use mat.theme

* fix(material/core): tests

---------

Co-authored-by: Andrew Seguin <[email protected]>
(cherry picked from commit 0a5b036)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants