Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs-bug(Typography): Confusion under what element add @mat.theme((...)), html or body #31074

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

Closed
stasberkov opened this issue May 9, 2025 · 2 comments
Labels
docs This issue is related to documentation needs triage This issue needs to be triaged by the team

Comments

@stasberkov
Copy link

stasberkov commented May 9, 2025

Documentation Feedback

Your guide https://material.angular.dev/guide/theming#getting-started suggests adding @mat.theme right under html element. While your examples on https://material.angular.dev/components/categories pages have @mat.theme under body element.

This causes significant difference: placing @mat.theme under html adds 13px font-size (by default it is 16px) that makes text labels tangibly smaller (since body text is set as 0.875rem).

Fonts in your https://material.angular.dev/components/categories pages looks way larger than if you place @mat.theme under html element.

Please resolve the confusion (fix documentation guide or the examples), what is the correct place for @mat.theme: html or body.

Affected documentation page

https://material.angular.dev/guide/theming#getting-started

@stasberkov stasberkov added docs This issue is related to documentation needs triage This issue needs to be triaged by the team labels May 9, 2025
@andrewseguin
Copy link
Contributor

Can you provide more info about how the font size is changing between the two? I couldnt find a difference on the docs site when changing html to body. The mat.theme mixin is just adding variables - I don't follow how it is changing the font size

@stasberkov
Copy link
Author

You are right. My bad. This is ag-grid's ag-theme-material that did the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is related to documentation needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

2 participants