Skip to content
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

AAE-25326 Fix custom theme #10100

Merged
merged 2 commits into from
Aug 19, 2024
Merged
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
13 changes: 7 additions & 6 deletions lib/core/custom-theme/theme/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@import '../variables/font-family';

@function get-mat-typography($base-font-size, $font-family) {
$custom-typography: mat.define-legacy-typography-configmat.define-typography-config(
$custom-typography: mat.define-typography-config(
$font-family: 'Muli, Roboto, "Helvetica Neue", sans-serif',
$headline-1: mat.define-typography-level(112px, 112px, 300),
$headline-2: mat.define-typography-level(56px, 56px, 400),
Expand All @@ -21,7 +21,7 @@
);

@if $base-font-size {
$custom-typography: mat.define-legacy-typography-configmat.define-typography-config(
$custom-typography: mat.define-typography-config(
$headline-1: mat.define-typography-level(8rem, 8rem, 300),
$headline-2: mat.define-typography-level(4rem, 4rem, 400),
$headline-3: mat.define-typography-level(3.21rem, 3.21rem, 400),
Expand All @@ -34,23 +34,24 @@
$body-2: mat.define-typography-level(1rem, 1.42rem, 400),
$caption: mat.define-typography-level(0.86rem, 1.42rem, 400),
$button: mat.define-typography-level(1rem, 1rem, 500),
$font-family: $default-font-family,
$font-family: $default-font-family
);
}

@if $font-family {
@each $key, $level in $custom-typography {
/* stylelint-disable-next-line scss/no-global-function-names */
@if type-of($level) == 'map' {
$new-level: map.merge(
$level,
(
font-family: $font-family,
font-family: $font-family
)
);
$custom-typography: map.merge(
$custom-typography,
(
$key: $new-level,
$key: $new-level
)
);
}
Expand All @@ -59,7 +60,7 @@
$custom-typography: map.merge(
$custom-typography,
(
font-family: $font-family,
font-family: $font-family
)
);
}
Expand Down
Loading