Skip to content

Commit 38c9104

Browse files
committed
fixup! refactor(material/theming): normalize config in all typography mixins for mdc components
1 parent 6d356c9 commit 38c9104

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
@@ -190,7 +190,8 @@ $mat-fab-state-target: '.mdc-fab__ripple';
190190
}
191191

192192
@mixin typography($config-or-theme) {
193-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
193+
$config: typography.private-typography-to-2018-config(
194+
theming.get-typography-config($config-or-theme));
194195
@include mdc-helpers.mat-using-mdc-typography($config) {
195196
@include mdc-button.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
196197
}
@@ -282,7 +283,8 @@ $mat-fab-state-target: '.mdc-fab__ripple';
282283
}
283284

284285
@mixin fab-typography($config-or-theme) {
285-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
286+
$config: typography.private-typography-to-2018-config(
287+
theming.get-typography-config($config-or-theme));
286288
@include mdc-helpers.mat-using-mdc-typography($config) {
287289
@include mdc-fab.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
288290
}
@@ -351,7 +353,8 @@ $mat-fab-state-target: '.mdc-fab__ripple';
351353
}
352354

353355
@mixin icon-button-typography($config-or-theme) {
354-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
356+
$config: typography.private-typography-to-2018-config(
357+
theming.get-typography-config($config-or-theme));
355358
@include mdc-helpers.mat-using-mdc-typography($config) {
356359
@include mdc-icon-button.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
357360
}

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

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

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

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

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

111111
@mixin typography($config-or-theme) {
112-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
112+
$config: typography.private-typography-to-2018-config(
113+
theming.get-typography-config($config-or-theme));
113114
@include mdc-helpers.mat-using-mdc-typography($config) {
114115
@include mdc-checkbox.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
115116
@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-chips.set-core-styles($query: mdc-helpers.$mat-typography-styles-query);
8182
@include mdc-helpers.mat-using-mdc-typography($config) {
8283
@include mdc-chips.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
@@ -19,7 +19,8 @@
1919
}
2020

2121
@mixin typography($config-or-theme) {
22-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
22+
$config: typography.private-typography-to-2018-config(
23+
theming.get-typography-config($config-or-theme));
2324
}
2425

2526
@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
@@ -55,7 +55,8 @@
5555
}
5656

5757
@mixin typography($config-or-theme) {
58-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
58+
$config: typography.private-typography-to-2018-config(
59+
theming.get-typography-config($config-or-theme));
5960

6061
@include mdc-helpers.mat-using-mdc-typography($config) {
6162
// 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-textfield.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
@@ -53,7 +53,8 @@
5353
}
5454

5555
@mixin typography($config-or-theme) {
56-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
56+
$config: typography.private-typography-to-2018-config(
57+
theming.get-typography-config($config-or-theme));
5758
@include mdc-helpers.mat-using-mdc-typography($config) {
5859
@include mdc-list.deprecated-without-ripple($query: mdc-helpers.$mat-typography-styles-query);
5960
@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
@@ -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-menu-surface.core-styles(mdc-helpers.$mat-typography-styles-query);
5152

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

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

5151
@mixin typography($config-or-theme) {
52-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
52+
$config: typography.private-typography-to-2018-config(
53+
theming.get-typography-config($config-or-theme));
5354

5455
@include mdc-helpers.mat-using-mdc-typography($config) {
5556
.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
@@ -81,7 +81,8 @@
8181
}
8282

8383
@mixin typography($config-or-theme) {
84-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
84+
$config: typography.private-typography-to-2018-config(
85+
theming.get-typography-config($config-or-theme));
8586
@include mdc-helpers.mat-using-mdc-typography($config) {
8687
@include mdc-switch.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
8788
@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
@@ -49,7 +49,8 @@
4949
}
5050

5151
@mixin typography($config-or-theme) {
52-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
52+
$config: typography.private-typography-to-2018-config(
53+
theming.get-typography-config($config-or-theme));
5354
@include mdc-helpers.mat-using-mdc-typography($config) {
5455
@include mdc-snackbar.core-styles($query: mdc-helpers.$mat-typography-styles-query);
5556
}

src/material-experimental/mdc-table/_table-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-data-table.core-styles($query: mdc-helpers.$mat-typography-styles-query);
5051
}

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

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

105105
@mixin typography($config-or-theme) {
106-
$config: typography.typography-to-2018-config(theming.get-typography-config($config-or-theme));
106+
$config: typography.private-typography-to-2018-config(
107+
theming.get-typography-config($config-or-theme));
107108
@include mdc-helpers.mat-using-mdc-typography($config) {
108109
@include mdc-tab.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
109110
@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)