|
44 | 44 | @function get-color-tokens($theme) { |
45 | 45 | $system: m2-utils.get-system($theme); |
46 | 46 | $is-dark: inspection.get-theme-type($theme) == dark; |
47 | | - |
48 | | - // Ideally we would derive all values directly from the theme, but it causes a lot of regressions |
49 | | - // internally. For now we fall back to the old hardcoded behavior only for internal apps. |
50 | | - $outline: if(m2-utils.$private-is-internal-build, |
51 | | - rgba(if($is-dark, #fff, #000), 0.12), |
52 | | - inspection.get-theme-color($theme, system, outline) |
53 | | - ); |
54 | | - |
| 47 | + $outline: inspection.get-theme-color($theme, system, outline); |
55 | 48 | @return ( |
56 | 49 | button-filled-container-color: map.get($system, surface), |
57 | 50 | button-filled-disabled-container-color: |
|
126 | 119 | $label-text-color: inspection.get-theme-color($theme, $palette-name, default-contrast, 1); |
127 | 120 | $ripple-opacity: 0.1; |
128 | 121 |
|
129 | | - // Ideally we would derive all values directly from the theme, but it causes a lot of regressions |
130 | | - // internally. For now we fall back to the old hardcoded behavior only for internal apps. |
131 | | - @if (m2-utils.$private-is-internal-build or |
132 | | - meta.type-of($contrast-color) != 'color') { |
133 | | - $is-dark: inspection.get-theme-type($theme) == dark; |
134 | | - $container-color: inspection.get-theme-color($theme, $palette-name); |
135 | | - $contrast-tone: m2-utils.contrast-tone($container-color, $is-dark); |
136 | | - $color: if($contrast-tone == 'dark', #000, #fff); |
137 | | - $state-layer-color: $color; |
138 | | - $ripple-color: rgba($color, 0.1); |
139 | | - $label-text-color: if($contrast-tone == 'dark', #000, #fff); |
140 | | - } |
141 | | - |
142 | 122 | // outlined-outline-color: |
143 | 123 | // TODO: we shouldn't have to set this since it's the same as the non-palette version, however |
144 | 124 | // there are a bunch of tests internally that depend on it. We should remove this and clean |
|
0 commit comments