Skip to content

Commit 85d7d28

Browse files
committed
fixup! refactor(material/theming): normalize config in all typography mixins for mdc components
1 parent 99b3dc8 commit 85d7d28

File tree

21 files changed

+46
-23
lines changed

21 files changed

+46
-23
lines changed

src/material-experimental/mdc-autocomplete/_autocomplete-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
}
1414

1515
@mixin typography($config-or-theme) {
16-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
16+
$config: typography.private-typography-to-2018-config(
17+
theming.get-typography-config($config-or-theme));
1718
@include mdc-helpers.mat-using-mdc-typography($config) {
1819
@include mdc-menu-surface-core-styles(mdc-helpers.$mat-typography-styles-query);
1920

src/material-experimental/mdc-button/_button-theme.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ $mat-fab-state-target: '.mdc-fab__ripple';
175175
}
176176

177177
@mixin typography($config-or-theme) {
178-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
178+
$config: typography.private-typography-to-2018-config(
179+
theming.get-typography-config($config-or-theme));
179180
@include mdc-helpers.mat-using-mdc-typography($config) {
180181
@include mdc-button-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
181182
}
@@ -262,7 +263,8 @@ $mat-fab-state-target: '.mdc-fab__ripple';
262263
}
263264

264265
@mixin fab-typography($config-or-theme) {
265-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
266+
$config: typography.private-typography-to-2018-config(
267+
theming.get-typography-config($config-or-theme));
266268
@include mdc-helpers.mat-using-mdc-typography($config) {
267269
@include mdc-fab-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
268270
}
@@ -335,7 +337,8 @@ $mat-fab-state-target: '.mdc-fab__ripple';
335337
}
336338

337339
@mixin icon-button-typography($config-or-theme) {
338-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
340+
$config: typography.private-typography-to-2018-config(
341+
theming.get-typography-config($config-or-theme));
339342
@include mdc-helpers.mat-using-mdc-typography($config) {
340343
@include mdc-icon-button-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
341344
}

src/material-experimental/mdc-card/_card-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
}
3737

3838
@mixin typography($config-or-theme) {
39-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
39+
$config: typography.private-typography-to-2018-config(
40+
theming.get-typography-config($config-or-theme));
4041
@include mdc-helpers.mat-using-mdc-typography($config) {
4142
@include mdc-card-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
4243

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@
111111
}
112112

113113
@mixin typography($config-or-theme) {
114-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
114+
$config: typography.private-typography-to-2018-config(
115+
theming.get-typography-config($config-or-theme));
115116
@include mdc-helpers.mat-using-mdc-typography($config) {
116117
@include mdc-checkbox-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
117118
@include mdc-form-field-core-styles($query: mdc-helpers.$mat-typography-styles-query);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
}
7777

7878
@mixin typography($config-or-theme) {
79-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
79+
$config: typography.private-typography-to-2018-config(
80+
theming.get-typography-config($config-or-theme));
8081
@include mdc-chip-set-core-styles($query: mdc-helpers.$mat-typography-styles-query);
8182
@include mdc-helpers.mat-using-mdc-typography($config) {
8283
@include mdc-chip-without-ripple($query: mdc-helpers.$mat-typography-styles-query);

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

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

2424
@mixin typography($config-or-theme) {
25-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
25+
$config: typography.private-typography-to-2018-config(
26+
theming.get-typography-config($config-or-theme));
2627
}
2728

2829
@mixin density($config-or-theme) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
}
4848

4949
@mixin option-typography($config-or-theme) {
50-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
50+
$config: typography.private-typography-to-2018-config(
51+
theming.get-typography-config($config-or-theme));
5152

5253
@include mdc-helpers.mat-using-mdc-typography($config) {
5354
// MDC uses the `subtitle1` level for list items, but the spec shows `body1` as the correct

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
}
1212

1313
@mixin typography($config-or-theme) {
14-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
14+
$config: typography.private-typography-to-2018-config(
15+
theming.get-typography-config($config-or-theme));
1516
@include mdc-helpers.mat-using-mdc-typography($config) {
1617
@include mdc-dialog-core-styles($query: mdc-helpers.$mat-typography-styles-query);
1718
}

src/material-experimental/mdc-form-field/_form-field-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
}
6565

6666
@mixin typography($config-or-theme) {
67-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
67+
$config: typography.private-typography-to-2018-config(
68+
theming.get-typography-config($config-or-theme));
6869
@include mdc-helpers.mat-using-mdc-typography($config) {
6970
@include mdc-text-field-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
7071
@include mdc-floating-label-core-styles($query: mdc-helpers.$mat-typography-styles-query);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
}
99

1010
@mixin typography($config-or-theme) {
11-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
11+
$config: typography.private-typography-to-2018-config(
12+
theming.get-typography-config($config-or-theme));
1213
@include mdc-helpers.mat-using-mdc-typography($config) {}
1314
}
1415

src/material-experimental/mdc-list/_list-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
}
5555

5656
@mixin typography($config-or-theme) {
57-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
57+
$config: typography.private-typography-to-2018-config(
58+
theming.get-typography-config($config-or-theme));
5859
@include mdc-helpers.mat-using-mdc-typography($config) {
5960
@include mdc-list-deprecated-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
6061
@include list-option-theme.private-list-option-typography-styles();

src/material-experimental/mdc-menu/_menu-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
}
4747

4848
@mixin typography($config-or-theme) {
49-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
49+
$config: typography.private-typography-to-2018-config(
50+
theming.get-typography-config($config-or-theme));
5051
@include mdc-helpers.mat-using-mdc-typography($config) {
5152
@include mdc-menu-surface-core-styles(mdc-helpers.$mat-typography-styles-query);
5253

src/material-experimental/mdc-paginator/_paginator-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
}
5151

5252
@mixin typography($config-or-theme) {
53-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
53+
$config: typography.private-typography-to-2018-config(
54+
theming.get-typography-config($config-or-theme));
5455

5556
@include mdc-helpers.mat-using-mdc-typography($config) {
5657
.mat-mdc-paginator {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
}
4646

4747
@mixin typography($config-or-theme) {
48-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
48+
$config: typography.private-typography-to-2018-config(
49+
theming.get-typography-config($config-or-theme));
4950
@include mdc-helpers.mat-using-mdc-typography($config) {
5051
@include mdc-radio-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
5152
@include mdc-form-field-core-styles($query: mdc-helpers.$mat-typography-styles-query);

src/material-experimental/mdc-select/_select-theme.scss

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

8585
@mixin typography($config-or-theme) {
86-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
86+
$config: typography.private-typography-to-2018-config(
87+
theming.get-typography-config($config-or-theme));
8788
@include mdc-helpers.mat-using-mdc-typography($config) {
8889
@include mdc-menu-surface-core-styles(mdc-helpers.$mat-typography-styles-query);
8990

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

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

8585
@mixin typography($config-or-theme) {
86-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
86+
$config: typography.private-typography-to-2018-config(
87+
theming.get-typography-config($config-or-theme));
8788
@include mdc-helpers.mat-using-mdc-typography($config) {
8889
@include mdc-switch-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
8990
@include mdc-form-field-core-styles($query: mdc-helpers.$mat-typography-styles-query);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
}
2626

2727
@mixin typography($config-or-theme) {
28-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
28+
$config: typography.private-typography-to-2018-config(
29+
theming.get-typography-config($config-or-theme));
2930
@include mdc-helpers.mat-using-mdc-typography($config) {
3031
// TODO: disabled until we implement the new MDC slider.
3132
// @include mdc-slider-core-styles($query: $mat-typography-styles-query);

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
}
4545

4646
@mixin typography($config-or-theme) {
47-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
47+
$config: typography.private-typography-to-2018-config(
48+
theming.get-typography-config($config-or-theme));
4849
@include mdc-helpers.mat-using-mdc-typography($config) {
4950
@include mdc-snackbar-core-styles($query: mdc-helpers.$mat-typography-styles-query);
5051
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
}
4646

4747
@mixin typography($config-or-theme) {
48-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
48+
$config: typography.private-typography-to-2018-config(
49+
theming.get-typography-config($config-or-theme));
4950
@include mdc-helpers.mat-using-mdc-typography($config) {
5051
@include mdc-data-table-core-styles($query: mdc-helpers.$mat-typography-styles-query);
5152
}

src/material-experimental/mdc-tabs/_tabs-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@
104104
}
105105

106106
@mixin typography($config-or-theme) {
107-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
107+
$config: typography.private-typography-to-2018-config(
108+
theming.get-typography-config($config-or-theme));
108109
@include mdc-helpers.mat-using-mdc-typography($config) {
109110
@include mdc-tab-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
110111
@include mdc-tab-indicator-core-styles($query: mdc-helpers.$mat-typography-styles-query);

src/material-experimental/mdc-tooltip/_tooltip-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
}
1212

1313
@mixin typography($config-or-theme) {
14-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
14+
$config: typography.private-typography-to-2018-config(
15+
theming.get-typography-config($config-or-theme));
1516
@include mdc-helpers.mat-using-mdc-typography($config) {
1617
@include tooltip.core-styles($query: mdc-helpers.$mat-typography-styles-query);
1718
}

0 commit comments

Comments
 (0)