Skip to content

Commit 7021954

Browse files
authored
fix(material/core): fix swapped units in define-typography functions (#25615)
1 parent dabbff4 commit 7021954

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/dev-app/theme.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ $candy-app-theme: mat.define-light-theme((
1313
accent: $candy-app-accent
1414
),
1515
// Define the default typography for our app.
16-
// TODO(mmalerba): Update to `mat-mdc-typography-config()` once non-MDC components can handle
17-
// 2018 configs.
1816
typography: mat.define-typography-config(),
1917
// Define the default density level for our app.
2018
density: 0,

src/material/core/typography/_all-typography.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
/// Design spec implementation (MDC Web). All arguments are optional, but may be passed to override
6868
/// the default values. The `mat-typography-level` function can be used to generate a custom
6969
/// typography level map which can be passed to this function to override one of the default levels.
70-
/// All default typography sizing generated by this function is in `rem` units.
70+
/// All default typography sizing generated by this function is in `px` units.
7171
///
7272
/// @param {String} $font-family The font family to use for levels where it is not explicitly
7373
/// specified.
@@ -85,7 +85,7 @@
8585
/// @param {Map} $button The font settings for the button font level.
8686
/// @param {Map} $overline The font settings for the overline font level.
8787
/// @return {Map} A map containing font settings for each of the levels in the Material Design spec.
88-
@function define-rem-typography-config(
88+
@function define-typography-config(
8989
// TODO(mmalerba): rename this function to define-typography-config,
9090
// and create a predefined px based config for people that need it.
9191
$font-family: mdc-typography.$font-family,
@@ -137,7 +137,7 @@
137137
/// Design spec implementation (MDC Web). All arguments are optional, but may be passed to override
138138
/// the default values. The `mat-typography-level` function can be used to generate a custom
139139
/// typography level map which can be passed to this function to override one of the default levels.
140-
/// All default typography sizing generated by this function is in `px` units.
140+
/// All default typography sizing generated by this function is in `rem` units.
141141
///
142142
/// @param {String} $font-family The font family to use for levels where it is not explicitly
143143
/// specified.
@@ -155,7 +155,7 @@
155155
/// @param {Map} $button The font settings for the button font level.
156156
/// @param {Map} $overline The font settings for the overline font level.
157157
/// @return {Map} A map containing font settings for each of the levels in the Material Design spec.
158-
@function define-typography-config(
158+
@function define-rem-typography-config(
159159
// TODO(mmalerba): rename this function to define-typography-config,
160160
// and create a predefined px based config for people that need it.
161161
$font-family: mdc-typography.$font-family,

0 commit comments

Comments
 (0)