|
7 | 7 |
|
8 | 8 | @use './md-ref-palette';
|
9 | 9 |
|
| 10 | +// Indicates whether alternative tokens should be used |
| 11 | +$_alternate-tokens: false; |
| 12 | + |
10 | 13 | $_default-dark: (
|
11 | 14 | 'md-ref-palette': md-ref-palette.values(),
|
12 | 15 | );
|
13 | 16 |
|
14 | 17 | @function values-dark($deps: $_default-dark) {
|
15 |
| - @return ( |
| 18 | + $values: ( |
16 | 19 | 'background': map.get($deps, 'md-ref-palette', 'neutral6'),
|
17 | 20 | 'error': map.get($deps, 'md-ref-palette', 'error80'),
|
18 | 21 | 'error-container': map.get($deps, 'md-ref-palette', 'error30'),
|
@@ -64,14 +67,32 @@ $_default-dark: (
|
64 | 67 | 'tertiary-fixed': map.get($deps, 'md-ref-palette', 'tertiary90'),
|
65 | 68 | 'tertiary-fixed-dim': map.get($deps, 'md-ref-palette', 'tertiary80')
|
66 | 69 | );
|
| 70 | + |
| 71 | + @if ($_alternate-tokens) { |
| 72 | + $values: map.merge($values, ( |
| 73 | + 'background': map.get($deps, 'md-ref-palette', 'neutral10'), |
| 74 | + 'on-surface-variant': map.get($deps, 'md-ref-palette', 'neutral-variant80'), |
| 75 | + 'surface': map.get($deps, 'md-ref-palette', 'neutral10'), |
| 76 | + 'surface-bright': #37393b, |
| 77 | + 'surface-container': #1e1f20, |
| 78 | + 'surface-container-high': #282a2c, |
| 79 | + 'surface-container-highest': #333537, |
| 80 | + 'surface-container-low': #1b1b1b, |
| 81 | + 'surface-container-lowest': #0e0e0e, |
| 82 | + 'surface-dim': #131313, |
| 83 | + 'surface-tint': #d1e1ff, |
| 84 | + )); |
| 85 | + } |
| 86 | + |
| 87 | + @return $values; |
67 | 88 | }
|
68 | 89 |
|
69 | 90 | $_default-light: (
|
70 | 91 | 'md-ref-palette': md-ref-palette.values(),
|
71 | 92 | );
|
72 | 93 |
|
73 | 94 | @function values-light($deps: $_default-light) {
|
74 |
| - @return ( |
| 95 | + $values: ( |
75 | 96 | 'background': map.get($deps, 'md-ref-palette', 'neutral98'),
|
76 | 97 | 'error': map.get($deps, 'md-ref-palette', 'error40'),
|
77 | 98 | 'error-container': map.get($deps, 'md-ref-palette', 'error90'),
|
@@ -123,4 +144,25 @@ $_default-light: (
|
123 | 144 | 'tertiary-fixed': map.get($deps, 'md-ref-palette', 'tertiary90'),
|
124 | 145 | 'tertiary-fixed-dim': map.get($deps, 'md-ref-palette', 'tertiary80')
|
125 | 146 | );
|
| 147 | + |
| 148 | + @if ($_alternate-tokens) { |
| 149 | + $values: map.merge($values, ( |
| 150 | + 'background': map.get($deps, 'md-ref-palette', 'neutral100'), |
| 151 | + 'on-error-container': map.get($deps, 'md-ref-palette', 'error10'), |
| 152 | + 'on-primary-container': map.get($deps, 'md-ref-palette', 'primary10'), |
| 153 | + 'on-secondary-container': map.get($deps, 'md-ref-palette', 'secondary10'), |
| 154 | + 'on-tertiary-container': map.get($deps, 'md-ref-palette', 'tertiary10'), |
| 155 | + 'surface': map.get($deps, 'md-ref-palette', 'neutral100'), |
| 156 | + 'surface-bright': map.get($deps, 'md-ref-palette', 'neutral100'), |
| 157 | + 'surface-container': #f0f4f9, |
| 158 | + 'surface-container-high': #e9eef6, |
| 159 | + 'surface-container-highest': #dde3ea, |
| 160 | + 'surface-container-low': #f8fafd, |
| 161 | + 'surface-container-lowest': map.get($deps, 'md-ref-palette', 'primary100'), |
| 162 | + 'surface-dim': #d3dbe5, |
| 163 | + 'surface-tint': #6991d6, |
| 164 | + )); |
| 165 | + } |
| 166 | + |
| 167 | + @return $values; |
126 | 168 | }
|
0 commit comments