@@ -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