Skip to content

Commit f1ed31a

Browse files
committed
fixup! fixup! fix(material/core): allow mixins to handle 2018 typography configs
1 parent 4fa908e commit f1ed31a

File tree

21 files changed

+31
-32
lines changed

21 files changed

+31
-32
lines changed

src/material-experimental/mdc-checkbox/_checkbox-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
}
8484

8585
@mixin mat-mdc-checkbox-typography($config-or-theme) {
86-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
86+
$config: mat-get-typography-config($config-or-theme);
8787
@include mat-using-mdc-typography($config) {
8888
@include mdc-checkbox-without-ripple($query: $mat-typography-styles-query);
8989
@include mdc-form-field-core-styles($query: $mat-typography-styles-query);

src/material-experimental/mdc-chips/_chips-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
}
5757

5858
@mixin mat-mdc-chips-typography($config-or-theme) {
59-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
59+
$config: mat-get-typography-config($config-or-theme);
6060
@include mdc-chip-set-core-styles($query: $mat-typography-styles-query);
6161
@include mat-using-mdc-typography($config) {
6262
@include mdc-chip-without-ripple($query: $mat-typography-styles-query);

src/material-experimental/mdc-core/option/_optgroup-theme.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
}
2020
}
2121

22-
@mixin mat-mdc-optgroup-typography($config-or-theme) {}
22+
@mixin mat-mdc-optgroup-typography($config-or-theme) {
23+
$config: mat-get-typography-config($config-or-theme);
24+
}
2325

2426
@mixin mat-mdc-optgroup-density($config-or-theme) {
2527
$density-scale: mat-get-density-config($config-or-theme);

src/material-experimental/mdc-dialog/_dialog-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
@mixin mat-mdc-dialog-typography($config-or-theme) {
12-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
12+
$config: mat-get-typography-config($config-or-theme);
1313
@include mat-using-mdc-typography($config) {
1414
@include mdc-dialog-core-styles($query: $mat-typography-styles-query);
1515
}

src/material-experimental/mdc-input/_input-theme.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
@include mat-using-mdc-theme($config) {}
66
}
77

8-
@mixin mat-mdc-input-typography($config-or-theme) {}
8+
@mixin mat-mdc-input-typography($config-or-theme) {
9+
$config: mat-get-typography-config($config-or-theme);
10+
@include mat-using-mdc-typography($config) {}
11+
}
912

1013
@mixin mat-mdc-input-density($config-or-theme) {}
1114

src/material-experimental/mdc-radio/_radio-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
}
4242

4343
@mixin mat-mdc-radio-typography($config-or-theme) {
44-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
44+
$config: mat-get-typography-config($config-or-theme);
4545
@include mat-using-mdc-typography($config) {
4646
@include mdc-radio-without-ripple($query: $mat-typography-styles-query);
4747
@include mdc-form-field-core-styles($query: $mat-typography-styles-query);

src/material-experimental/mdc-slide-toggle/_slide-toggle-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
}
8080

8181
@mixin mat-mdc-slide-toggle-typography($config-or-theme) {
82-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
82+
$config: mat-get-typography-config($config-or-theme);
8383
@include mat-using-mdc-typography($config) {
8484
@include mdc-switch-without-ripple($query: $mat-typography-styles-query);
8585
@include mdc-form-field-core-styles($query: $mat-typography-styles-query);

src/material-experimental/mdc-slider/_slider-theme.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222
}
2323
}
2424

25-
@mixin mat-mdc-slider-typography($config-or-theme) {}
25+
@mixin mat-mdc-slider-typography($config-or-theme) {
26+
$config: mat-get-typography-config($config-or-theme);
27+
@include mat-using-mdc-typography($config) {
28+
// TODO: disabled until we implement the new MDC slider.
29+
// @include mdc-slider-core-styles($query: $mat-typography-styles-query);
30+
}
31+
}
2632

2733
@mixin mat-mdc-slider-density($config-or-theme) {}
2834

src/material-experimental/mdc-snack-bar/_snack-bar-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535

3636
@mixin mat-mdc-snack-bar-typography($config-or-theme) {
37-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
37+
$config: mat-get-typography-config($config-or-theme);
3838
@include mat-using-mdc-typography($config) {
3939
@include mdc-snackbar-core-styles($query: $mat-typography-styles-query);
4040
}

src/material-experimental/mdc-table/_table-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
}
4444

4545
@mixin mat-mdc-table-typography($config-or-theme) {
46-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
46+
$config: mat-get-typography-config($config-or-theme);
4747
@include mat-using-mdc-typography($config) {
4848
@include mdc-data-table-core-styles($query: $mat-typography-styles-query);
4949
}

src/material-experimental/mdc-typography/_all-typography.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
@mixin angular-material-mdc-typography($config-or-theme: null) {
44
$config: if(mat-private-is-theme-object($config-or-theme),
5-
mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme)),
6-
$config-or-theme);
5+
mat-get-typography-config($config-or-theme), $config-or-theme);
76

87
// If no actual color configuration has been specified, create a default one.
98
@if $config == null {

src/material/checkbox/_checkbox-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@import '../core/theming/theming';
2-
@import '../core/typography/typography';
32
@import '../core/typography/typography-utils';
43

54

@@ -97,7 +96,7 @@
9796
}
9897

9998
@mixin mat-checkbox-typography($config-or-theme) {
100-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
99+
$config: mat-get-typography-config($config-or-theme);
101100
.mat-checkbox {
102101
font-family: mat-font-family($config);
103102
}

src/material/chips/_chips-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import '../core/style/private';
22
@import '../core/theming/palette';
33
@import '../core/theming/theming';
4-
@import '../core/typography/typography';
54
@import '../core/typography/typography-utils';
65

76
$mat-chip-remove-font-size: 18px;
@@ -88,7 +87,7 @@ $mat-chip-remove-font-size: 18px;
8887
}
8988

9089
@mixin mat-chips-typography($config-or-theme) {
91-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
90+
$config: mat-get-typography-config($config-or-theme);
9291
.mat-chip {
9392
font-size: mat-font-size($config, body-2);
9493
font-weight: mat-font-weight($config, body-2);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
// Includes all of the typographic styles.
4141
@mixin angular-material-typography($config-or-theme: null) {
4242
$config: if(mat-private-is-theme-object($config-or-theme),
43-
mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme)),
44-
$config-or-theme);
43+
mat-get-typography-config($config-or-theme), $config-or-theme);
4544

4645
// If no actual color configuration has been specified, create a default one.
4746
@if not $config {

src/material/core/typography/_typography.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@
103103
// Adds the base typography styles, based on a config.
104104
/* stylelint-disable-next-line material/theme-mixin-api */
105105
@mixin mat-base-typography($config, $selector: '.mat-typography') {
106-
$config: mat-private-typography-normalized-config($config);
107-
108106
.mat-h1, .mat-headline, #{$selector} h1 {
109107
@include mat-typography-level-to-styles($config, headline);
110108
margin: 0 0 16px;

src/material/dialog/_dialog-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import '../core/style/private';
22
@import '../core/theming/palette';
33
@import '../core/theming/theming';
4-
@import '../core/typography/typography';
54
@import '../core/typography/typography-utils';
65

76

@@ -18,7 +17,7 @@
1817
}
1918

2019
@mixin mat-dialog-typography($config-or-theme) {
21-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
20+
$config: mat-get-typography-config($config-or-theme);
2221
.mat-dialog-title {
2322
@include mat-typography-level-to-styles($config, title);
2423
}

src/material/expansion/_expansion-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@import '../core/theming/palette';
33
@import '../core/theming/theming';
44
@import '../core/style/private';
5-
@import '../core/typography/typography';
65
@import '../core/typography/typography-utils';
76
@import './expansion-variables';
87

@@ -60,7 +59,7 @@
6059
}
6160

6261
@mixin mat-expansion-panel-typography($config-or-theme) {
63-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
62+
$config: mat-get-typography-config($config-or-theme);
6463
.mat-expansion-panel-header {
6564
font: {
6665
family: mat-font-family($config, subheading-1);

src/material/radio/_radio-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import '../core/theming/palette';
22
@import '../core/theming/theming';
3-
@import '../core/typography/typography';
43
@import '../core/typography/typography-utils';
54

65
@mixin _mat-radio-color($palette) {
@@ -69,7 +68,7 @@
6968
}
7069

7170
@mixin mat-radio-typography($config-or-theme) {
72-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
71+
$config: mat-get-typography-config($config-or-theme);
7372
.mat-radio-button {
7473
font-family: mat-font-family($config);
7574
}

src/material/slide-toggle/_slide-toggle-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import '../core/style/private';
22
@import '../core/theming/palette';
33
@import '../core/theming/theming';
4-
@import '../core/typography/typography';
54
@import '../core/typography/typography-utils';
65

76
@mixin _mat-slide-toggle-checked($palette, $thumb-checked-hue) {
@@ -74,7 +73,7 @@
7473
}
7574

7675
@mixin mat-slide-toggle-typography($config-or-theme) {
77-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
76+
$config: mat-get-typography-config($config-or-theme);
7877
.mat-slide-toggle-content {
7978
font-family: mat-font-family($config);
8079
}

src/material/snack-bar/_snack-bar-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import '../core/typography/typography';
21
@import '../core/typography/typography-utils';
32
@import '../core/theming/theming';
43
@import '../core/theming/palette';
@@ -24,7 +23,7 @@
2423
}
2524

2625
@mixin mat-snack-bar-typography($config-or-theme) {
27-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
26+
$config: mat-get-typography-config($config-or-theme);
2827
.mat-simple-snackbar {
2928
font: {
3029
family: mat-font-family($config, body-1);

src/material/table/_table-theme.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@import '../core/theming/palette';
22
@import '../core/theming/theming';
3-
@import '../core/typography/typography';
43
@import '../core/typography/typography-utils';
54

65
@mixin mat-table-color($config-or-theme) {
@@ -34,7 +33,7 @@
3433
}
3534

3635
@mixin mat-table-typography($config-or-theme) {
37-
$config: mat-private-typography-normalized-config(mat-get-typography-config($config-or-theme));
36+
$config: mat-get-typography-config($config-or-theme);
3837
.mat-table {
3938
font-family: mat-font-family($config);
4039
}

0 commit comments

Comments
 (0)