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/schematics): add typography and density to custom theme #28645

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions guides/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ $my-theme: mat.define-light-theme((
primary: $my-primary,
accent: $my-accent,
),
typography: mat.define-typography-config(),
density: 0,
));

Expand Down Expand Up @@ -536,14 +537,14 @@ the CSS in each shadow root, or by using [Constructable Stylesheets][constructab

## User preference media queries

Angular Material does not apply styles based on user preference media queries, such as
Angular Material does not apply styles based on user preference media queries, such as
`prefers-color-scheme` or `prefers-contrast`. Instead, Angular Material's Sass mixins give you the
flexibility to apply theme styles to based on the conditions that make the most sense for your
users. This may mean using media queries directly or reading a saved user preference.

## Style customization outside the theming system

Angular Material supports customizing color, typography, and density as outlined in this document.
Angular strongly discourages, and does not directly support, overriding component CSS outside the
theming APIs described above. Component DOM structure and CSS classes are considered private
Angular Material supports customizing color, typography, and density as outlined in this document.
Angular strongly discourages, and does not directly support, overriding component CSS outside the
theming APIs described above. Component DOM structure and CSS classes are considered private
implementation details that may change at any time.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ $${name}-theme: mat.define-light-theme((
primary: $${name}-primary,
accent: $${name}-accent,
warn: $${name}-warn,
)
),
typography: mat.define-typography-config(),
density: 0
));

// Include theme styles for core and each component used in your app.
Expand Down
Loading