[6a3a178] | 1 | @use 'sass:map';
|
---|
| 2 | @use '../core/theming/theming';
|
---|
| 3 | @use '../core/typography/typography';
|
---|
| 4 | @use '../core/typography/typography-utils';
|
---|
| 5 |
|
---|
| 6 | @mixin color($config-or-theme) {
|
---|
| 7 | $config: theming.get-color-config($config-or-theme);
|
---|
| 8 | $background: map.get($config, background);
|
---|
| 9 | $foreground: map.get($config, foreground);
|
---|
| 10 |
|
---|
| 11 | .mat-table {
|
---|
| 12 | background: theming.get-color-from-palette($background, 'card');
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | .mat-table thead, .mat-table tbody, .mat-table tfoot,
|
---|
| 16 | mat-header-row, mat-row, mat-footer-row,
|
---|
| 17 | [mat-header-row], [mat-row], [mat-footer-row],
|
---|
| 18 | .mat-table-sticky {
|
---|
| 19 | background: inherit;
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | mat-row, mat-header-row, mat-footer-row,
|
---|
| 23 | th.mat-header-cell, td.mat-cell, td.mat-footer-cell {
|
---|
| 24 | border-bottom-color: theming.get-color-from-palette($foreground, divider);
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | .mat-header-cell {
|
---|
| 28 | color: theming.get-color-from-palette($foreground, secondary-text);
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | .mat-cell, .mat-footer-cell {
|
---|
| 32 | color: theming.get-color-from-palette($foreground, text);
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | @mixin typography($config-or-theme) {
|
---|
| 37 | $config: typography.private-typography-to-2014-config(
|
---|
| 38 | theming.get-typography-config($config-or-theme));
|
---|
| 39 | .mat-table {
|
---|
| 40 | font-family: typography-utils.font-family($config);
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | .mat-header-cell {
|
---|
| 44 | font-size: typography-utils.font-size($config, caption);
|
---|
| 45 | font-weight: typography-utils.font-weight($config, body-2);
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | .mat-cell, .mat-footer-cell {
|
---|
| 49 | font-size: typography-utils.font-size($config, body-1);
|
---|
| 50 | }
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | @mixin _density($config-or-theme) {}
|
---|
| 54 |
|
---|
| 55 | @mixin theme($theme-or-color-config) {
|
---|
| 56 | $theme: theming.private-legacy-get-theme($theme-or-color-config);
|
---|
| 57 | @include theming.private-check-duplicate-theme-styles($theme, 'mat-table') {
|
---|
| 58 | $color: theming.get-color-config($theme);
|
---|
| 59 | $density: theming.get-density-config($theme);
|
---|
| 60 | $typography: theming.get-typography-config($theme);
|
---|
| 61 |
|
---|
| 62 | @if $color != null {
|
---|
| 63 | @include color($color);
|
---|
| 64 | }
|
---|
| 65 | @if $density != null {
|
---|
| 66 | @include _density($density);
|
---|
| 67 | }
|
---|
| 68 | @if $typography != null {
|
---|
| 69 | @include typography($typography);
|
---|
| 70 | }
|
---|
| 71 | }
|
---|
| 72 | }
|
---|