Skip to content

Commit

Permalink
fix(material/core): fix swapped units in define-typography functions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed Sep 9, 2022
1 parent dabbff4 commit 7021954
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/dev-app/theme.scss
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
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

0 comments on commit 7021954

Please sign in to comment.