|
2 | 2 | @use '@material/data-table/data-table-cell' as mdc-data-table-cell;
|
3 | 3 | @use '@material/data-table/data-table-header-cell' as mdc-data-table-header-cell;
|
4 | 4 | @use '@material/data-table' as mdc-data-table-theme;
|
5 |
| -@use '@material/theme/custom-properties' as mdc-custom-properties; |
6 | 5 | @use '../core/mdc-helpers/mdc-helpers';
|
7 | 6 | @use '../core/tokens/token-utils';
|
8 | 7 | @use '../core/tokens/m2/mat/table' as tokens-mat-table;
|
|
25 | 24 | }
|
26 | 25 | }
|
27 | 26 |
|
28 |
| -@include mdc-custom-properties.configure($emit-fallback-values: false, $emit-fallback-vars: false) { |
29 |
| - @include mdc-data-table.static-styles($query: mdc-helpers.$mdc-base-styles-query); |
30 |
| - @include mdc-data-table-cell.static-styles($query: mdc-helpers.$mdc-base-styles-query); |
31 |
| - @include mdc-data-table-header-cell.static-styles($query: mdc-helpers.$mdc-base-styles-query); |
32 |
| - @include mdc-data-table-theme.cell-padding( |
33 |
| - $leading-padding: mdc-data-table-theme.$cell-leading-padding, |
34 |
| - $trailing-padding: mdc-data-table-theme.$cell-trailing-padding, |
35 |
| - $query: mdc-helpers.$mdc-base-styles-query |
36 |
| - ); |
37 |
| - @include table-flex-styles.private-table-flex-styles(); |
38 |
| - |
39 |
| - .mat-mdc-table { |
40 |
| - @include token-utils.create-token-values( |
41 |
| - tokens-mat-table.$prefix, tokens-mat-table.get-unthemable-tokens()); |
42 |
| - |
43 |
| - // MDC Table applies `table-layout: fixed`, but this is a backwards incompatible |
44 |
| - // change since the table did not previously apply it. |
45 |
| - // TODO: Add a mixin to MDC to set the layout instead of including this override, |
46 |
| - // see this issue: https://github.com/material-components/material-components-web/issues/6412 |
47 |
| - table-layout: auto; |
48 |
| - |
49 |
| - // The MDC table does not allow text to wrap within the cell. This allows for text to |
50 |
| - // wrap when the cell reaches its maximum width. |
51 |
| - white-space: normal; |
52 |
| - |
53 |
| - @include token-utils.use-tokens(tokens-mat-table.$prefix, tokens-mat-table.get-token-slots()) { |
54 |
| - @include token-utils.create-token-slot(background-color, background-color); |
55 |
| - } |
| 27 | +@include mdc-data-table.static-styles($query: mdc-helpers.$mdc-base-styles-query); |
| 28 | +@include mdc-data-table-cell.static-styles($query: mdc-helpers.$mdc-base-styles-query); |
| 29 | +@include mdc-data-table-header-cell.static-styles($query: mdc-helpers.$mdc-base-styles-query); |
| 30 | +@include mdc-data-table-theme.cell-padding( |
| 31 | + $leading-padding: mdc-data-table-theme.$cell-leading-padding, |
| 32 | + $trailing-padding: mdc-data-table-theme.$cell-trailing-padding, |
| 33 | + $query: mdc-helpers.$mdc-base-styles-query |
| 34 | +); |
| 35 | +@include table-flex-styles.private-table-flex-styles(); |
| 36 | + |
| 37 | +.mat-mdc-table { |
| 38 | + @include token-utils.create-token-values( |
| 39 | + tokens-mat-table.$prefix, tokens-mat-table.get-unthemable-tokens()); |
| 40 | + |
| 41 | + // MDC Table applies `table-layout: fixed`, but this is a backwards incompatible |
| 42 | + // change since the table did not previously apply it. |
| 43 | + // TODO: Add a mixin to MDC to set the layout instead of including this override, |
| 44 | + // see this issue: https://github.com/material-components/material-components-web/issues/6412 |
| 45 | + table-layout: auto; |
| 46 | + |
| 47 | + // The MDC table does not allow text to wrap within the cell. This allows for text to |
| 48 | + // wrap when the cell reaches its maximum width. |
| 49 | + white-space: normal; |
| 50 | + |
| 51 | + @include token-utils.use-tokens(tokens-mat-table.$prefix, tokens-mat-table.get-token-slots()) { |
| 52 | + @include token-utils.create-token-slot(background-color, background-color); |
56 | 53 | }
|
| 54 | +} |
57 | 55 |
|
| 56 | +@include mdc-helpers.disable-mdc-fallback-declarations { |
58 | 57 | @include token-utils.use-tokens(tokens-mat-table.$prefix, tokens-mat-table.get-token-slots()) {
|
59 | 58 | .mat-mdc-header-row {
|
60 |
| - @include token-utils.create-token-slot(height, header-container-height); |
| 59 | + @include token-utils.create-token-slot(height, header-container-height, true); |
61 | 60 | }
|
62 | 61 |
|
63 | 62 | .mat-mdc-row {
|
64 |
| - @include token-utils.create-token-slot(height, row-item-container-height); |
| 63 | + @include token-utils.create-token-slot(height, row-item-container-height, true); |
65 | 64 | }
|
66 | 65 |
|
67 | 66 | .mat-mdc-footer-row {
|
68 |
| - @include token-utils.create-token-slot(height, footer-container-height); |
| 67 | + @include token-utils.create-token-slot(height, footer-container-height, true); |
69 | 68 | }
|
70 | 69 |
|
71 | 70 | .mat-mdc-header-cell {
|
|
75 | 74 | @include token-utils.create-token-slot(line-height, header-headline-line-height);
|
76 | 75 | @include token-utils.create-token-slot(font-size, header-headline-size);
|
77 | 76 | @include token-utils.create-token-slot(letter-spacing, header-headline-tracking);
|
78 |
| - @include token-utils.create-token-slot(font-weight, header-headline-weight); |
| 77 | + @include token-utils.create-token-slot(font-weight, header-headline-weight, true); |
79 | 78 | }
|
80 | 79 |
|
81 | 80 | .mat-mdc-cell {
|
|
0 commit comments