Skip to content

fix(material/core): fix swapped units in define-typography functions #25615

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

Merged
merged 1 commit into from
Sep 9, 2022
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
2 changes: 0 additions & 2 deletions src/dev-app/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ $candy-app-theme: mat.define-light-theme((
accent: $candy-app-accent
),
// Define the default typography for our app.
// TODO(mmalerba): Update to `mat-mdc-typography-config()` once non-MDC components can handle
// 2018 configs.
typography: mat.define-typography-config(),
// Define the default density level for our app.
density: 0,
Expand Down
8 changes: 4 additions & 4 deletions src/material/core/typography/_all-typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
/// Design spec implementation (MDC Web). All arguments are optional, but may be passed to override
/// the default values. The `mat-typography-level` function can be used to generate a custom
/// typography level map which can be passed to this function to override one of the default levels.
/// All default typography sizing generated by this function is in `rem` units.
/// All default typography sizing generated by this function is in `px` units.
///
/// @param {String} $font-family The font family to use for levels where it is not explicitly
/// specified.
Expand All @@ -85,7 +85,7 @@
/// @param {Map} $button The font settings for the button font level.
/// @param {Map} $overline The font settings for the overline font level.
/// @return {Map} A map containing font settings for each of the levels in the Material Design spec.
@function define-rem-typography-config(
@function define-typography-config(
// TODO(mmalerba): rename this function to define-typography-config,
// and create a predefined px based config for people that need it.
$font-family: mdc-typography.$font-family,
Expand Down Expand Up @@ -137,7 +137,7 @@
/// Design spec implementation (MDC Web). All arguments are optional, but may be passed to override
/// the default values. The `mat-typography-level` function can be used to generate a custom
/// typography level map which can be passed to this function to override one of the default levels.
/// All default typography sizing generated by this function is in `px` units.
/// All default typography sizing generated by this function is in `rem` units.
///
/// @param {String} $font-family The font family to use for levels where it is not explicitly
/// specified.
Expand All @@ -155,7 +155,7 @@
/// @param {Map} $button The font settings for the button font level.
/// @param {Map} $overline The font settings for the overline font level.
/// @return {Map} A map containing font settings for each of the levels in the Material Design spec.
@function define-typography-config(
@function define-rem-typography-config(
// TODO(mmalerba): rename this function to define-typography-config,
// and create a predefined px based config for people that need it.
$font-family: mdc-typography.$font-family,
Expand Down