|
5 | 5 | @use '../core/theming/validation';
|
6 | 6 | @use '../core/typography/typography';
|
7 | 7 | @use '../core/tokens/token-utils';
|
| 8 | +@use 'sass:map'; |
8 | 9 |
|
9 | 10 | /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
10 | 11 | /// for the mat-tab.
|
|
32 | 33 | .mat-mdc-tab-group,
|
33 | 34 | .mat-mdc-tab-nav-bar {
|
34 | 35 | @include token-utils.create-token-values-mixed(
|
35 |
| - m2-tabs.$prefix, m2-tabs.get-color-tokens($theme, primary)); |
| 36 | + m2-tabs.$prefix, m2-tabs.get-color-tokens($theme, primary, |
| 37 | + $exclude: (background-color, foreground-color))); |
36 | 38 |
|
37 |
| - &.mat-accent, &.mat-background-accent { |
| 39 | + &.mat-accent { |
38 | 40 | @include token-utils.create-token-values-mixed(
|
39 |
| - m2-tabs.$prefix, m2-tabs.get-color-tokens($theme, accent)); |
| 41 | + m2-tabs.$prefix, m2-tabs.get-color-tokens($theme, accent, |
| 42 | + $exclude: (background-color, foreground-color))); |
40 | 43 | }
|
41 | 44 |
|
42 |
| - &.mat-warn, &.mat-background-warn { |
| 45 | + &.mat-warn { |
43 | 46 | @include token-utils.create-token-values-mixed(
|
44 |
| - m2-tabs.$prefix, m2-tabs.get-color-tokens($theme, warn)); |
| 47 | + m2-tabs.$prefix, m2-tabs.get-color-tokens($theme, warn, |
| 48 | + $exclude: (background-color, foreground-color))); |
| 49 | + } |
| 50 | + |
| 51 | + &.mat-background-primary { |
| 52 | + $tokens: m2-tabs.get-color-tokens($theme, primary); |
| 53 | + @include token-utils.create-token-values-mixed( |
| 54 | + m2-tabs.$prefix, ( |
| 55 | + background-color: map.get($tokens, background-color), |
| 56 | + foreground-color: map.get($tokens, foreground-color), |
| 57 | + )); |
| 58 | + } |
| 59 | + |
| 60 | + &.mat-background-accent { |
| 61 | + $tokens: m2-tabs.get-color-tokens($theme, accent); |
| 62 | + @include token-utils.create-token-values-mixed( |
| 63 | + m2-tabs.$prefix, ( |
| 64 | + background-color: map.get($tokens, background-color), |
| 65 | + foreground-color: map.get($tokens, foreground-color), |
| 66 | + )); |
| 67 | + } |
| 68 | + |
| 69 | + &.mat-background-warn { |
| 70 | + $tokens: m2-tabs.get-color-tokens($theme, warn); |
| 71 | + @include token-utils.create-token-values-mixed( |
| 72 | + m2-tabs.$prefix, ( |
| 73 | + background-color: map.get($tokens, background-color), |
| 74 | + foreground-color: map.get($tokens, foreground-color), |
| 75 | + )); |
45 | 76 | }
|
46 | 77 | }
|
47 | 78 | }
|
|
118 | 149 | 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
|
119 | 150 | );
|
120 | 151 | $tabs-tokens: token-utils.get-tokens-for($tokens, m2-tabs.$prefix, $options...);
|
| 152 | + $tabs-tokens-without-options: token-utils.get-tokens-for($tokens, m2-tabs.$prefix); |
| 153 | + |
| 154 | + @include token-utils.create-token-values(m2-tabs.$prefix, $tabs-tokens-without-options); |
121 | 155 | @include token-utils.create-token-values(m2-tabs.$prefix, $tabs-tokens);
|
122 | 156 | }
|
0 commit comments