Skip to content

Commit 377e667

Browse files
andrewseguinAndrew Seguin
andauthored
refactor: remove unused typography function (#31355)
Co-authored-by: Andrew Seguin <[email protected]>
1 parent c10f376 commit 377e667

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

src/material/core/theming/_inspection.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,3 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
279279
@return $theme;
280280
}
281281
}
282-
283-
/// Gets a version of the theme with a modified typography config that preserves old behavior in
284-
/// some components that previously used `private-typography-to-2014-config`.
285-
/// Do not introduce new usages of this, it should be cleaned up and removed.
286-
/// @deprecated
287-
@function private-get-typography-back-compat-theme($theme) {
288-
@return if(
289-
get-theme-version($theme) == 0,
290-
m2-inspection.private-get-typography-back-compat-theme($theme),
291-
$theme
292-
);
293-
}

src/material/core/theming/_m2-inspection.scss

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -235,36 +235,3 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
235235
}
236236
@return $theme;
237237
}
238-
239-
/// Gets a version of the theme with a modified typography config that preserves old behavior in
240-
/// some components that previously used `private-typography-to-2014-config`.
241-
/// Do not introduce new usages of this, it should be cleaned up and removed.
242-
/// @deprecated
243-
@function private-get-typography-back-compat-theme($theme) {
244-
// It is possible for a user to pass a "density theme" that is just a number.
245-
@if meta.type-of($theme) != 'map' {
246-
@return $theme;
247-
}
248-
$internal: map.get($theme, $_internals, m2-config);
249-
$theme: map.remove($theme, $_internals);
250-
@if theme-has($theme, typography) {
251-
$typography-config: m2-theming.get-typography-config($theme);
252-
// gmat configs have both 2018 and 2014 keys.
253-
@if (not typography-versioning.private-typography-is-2014-config($typography-config)) or
254-
(not typography-versioning.private-typography-is-2018-config($typography-config)) {
255-
@return $theme;
256-
}
257-
$new-typography-config: typography-versioning.private-typography-to-2018-config(
258-
$typography-config, true);
259-
// subtitle-2 is mapped differently by `private-typography-to-2014-config`.
260-
$new-typography-config: map.set(
261-
$new-typography-config, subtitle-2, map.get($new-typography-config, body-1));
262-
$theme: if($theme == $typography-config, $new-typography-config,
263-
map.set($theme, typography, $new-typography-config));
264-
}
265-
@if $internal {
266-
$internal: private-get-typography-back-compat-theme($internal);
267-
$theme: map.set($theme, $_internals, m2-config, $internal);
268-
}
269-
@return $theme;
270-
}

0 commit comments

Comments
 (0)