|
34 | 34 | }
|
35 | 35 |
|
36 | 36 | @mixin styles() {
|
37 |
| - $tokens: tokens.md-comp-dialog-values(); |
38 | 37 | $md-sys-color: tokens.md-sys-color-values-light();
|
39 | 38 | $md-sys-motion: tokens.md-sys-motion-values();
|
| 39 | + $tokens: tokens.md-comp-dialog-values(); |
| 40 | + @each $token, $value in $tokens { |
| 41 | + $tokens: map.set($tokens, $token, var(--md-dialog-#{$token}, #{$value})); |
| 42 | + } |
40 | 43 |
|
41 |
| - :host { |
42 |
| - @each $token, $value in $tokens { |
43 |
| - --_#{$token}: var(--md-dialog-#{$token}, #{$value}); |
44 |
| - } |
| 44 | + // Support logical shape properties |
| 45 | + $tokens: map.merge( |
| 46 | + $tokens, |
| 47 | + ( |
| 48 | + 'container-shape-start-start': |
| 49 | + var( |
| 50 | + --md-dialog-container-shape-start-start, |
| 51 | + map.get($tokens, 'container-shape') |
| 52 | + ), |
| 53 | + 'container-shape-start-end': |
| 54 | + var( |
| 55 | + --md-dialog-container-shape-start-end, |
| 56 | + map.get($tokens, 'container-shape') |
| 57 | + ), |
| 58 | + 'container-shape-end-end': |
| 59 | + var( |
| 60 | + --md-dialog-container-shape-end-end, |
| 61 | + map.get($tokens, 'container-shape') |
| 62 | + ), |
| 63 | + 'container-shape-end-start': |
| 64 | + var( |
| 65 | + --md-dialog-container-shape-end-start, |
| 66 | + map.get($tokens, 'container-shape') |
| 67 | + ), |
| 68 | + ) |
| 69 | + ); |
45 | 70 |
|
46 |
| - // Support logical shape properties |
47 |
| - --_container-shape-start-start: var( |
48 |
| - --md-dialog-container-shape-start-start, |
49 |
| - var(--_container-shape) |
50 |
| - ); |
51 |
| - --_container-shape-start-end: var( |
52 |
| - --md-dialog-container-shape-start-end, |
53 |
| - var(--_container-shape) |
54 |
| - ); |
55 |
| - --_container-shape-end-end: var( |
56 |
| - --md-dialog-container-shape-end-end, |
57 |
| - var(--_container-shape) |
58 |
| - ); |
59 |
| - --_container-shape-end-start: var( |
60 |
| - --md-dialog-container-shape-end-start, |
61 |
| - var(--_container-shape) |
62 |
| - ); |
63 |
| - |
64 |
| - border-start-start-radius: var(--_container-shape-start-start); |
65 |
| - border-start-end-radius: var(--_container-shape-start-end); |
66 |
| - border-end-end-radius: var(--_container-shape-end-end); |
67 |
| - border-end-start-radius: var(--_container-shape-end-start); |
| 71 | + :host { |
| 72 | + border-start-start-radius: map.get($tokens, 'container-shape-start-start'); |
| 73 | + border-start-end-radius: map.get($tokens, 'container-shape-start-end'); |
| 74 | + border-end-end-radius: map.get($tokens, 'container-shape-end-end'); |
| 75 | + border-end-start-radius: map.get($tokens, 'container-shape-end-start'); |
68 | 76 | display: contents;
|
69 | 77 | margin: auto;
|
70 | 78 | max-height: min(560px, calc(100% - 48px));
|
|
123 | 131 |
|
124 | 132 | .headline {
|
125 | 133 | align-items: center;
|
126 |
| - color: var(--_headline-color); |
| 134 | + color: map.get($tokens, 'headline-color'); |
127 | 135 | display: flex;
|
128 | 136 | flex-direction: column;
|
129 |
| - font-family: var(--_headline-font); |
130 |
| - font-size: var(--_headline-size); |
131 |
| - line-height: var(--_headline-line-height); |
132 |
| - font-weight: var(--_headline-weight); |
| 137 | + font-family: map.get($tokens, 'headline-font'); |
| 138 | + font-size: map.get($tokens, 'headline-size'); |
| 139 | + line-height: map.get($tokens, 'headline-line-height'); |
| 140 | + font-weight: map.get($tokens, 'headline-weight'); |
133 | 141 | position: relative;
|
134 | 142 | }
|
135 | 143 |
|
|
147 | 155 | }
|
148 | 156 |
|
149 | 157 | slot[name='icon']::slotted(*) {
|
150 |
| - color: var(--_icon-color); |
| 158 | + color: map.get($tokens, 'icon-color'); |
151 | 159 | fill: currentColor;
|
152 |
| - font-size: var(--_icon-size); |
| 160 | + font-size: map.get($tokens, 'icon-size'); |
153 | 161 | margin-top: 24px;
|
154 |
| - height: var(--_icon-size); |
155 |
| - width: var(--_icon-size); |
| 162 | + height: map.get($tokens, 'icon-size'); |
| 163 | + width: map.get($tokens, 'icon-size'); |
156 | 164 | }
|
157 | 165 |
|
158 | 166 | .has-icon slot[name='headline']::slotted(*) {
|
|
181 | 189 | }
|
182 | 190 |
|
183 | 191 | .container::before {
|
184 |
| - background: var(--_container-color); |
| 192 | + background: map.get($tokens, 'container-color'); |
185 | 193 | border-radius: inherit;
|
186 | 194 | content: '';
|
187 | 195 | inset: 0;
|
|
208 | 216 | }
|
209 | 217 |
|
210 | 218 | .content {
|
211 |
| - color: var(--_supporting-text-color); |
212 |
| - font-family: var(--_supporting-text-font); |
213 |
| - font-size: var(--_supporting-text-size); |
214 |
| - line-height: var(--_supporting-text-line-height); |
215 |
| - font-weight: var(--_supporting-text-weight); |
| 219 | + color: map.get($tokens, 'supporting-text-color'); |
| 220 | + font-family: map.get($tokens, 'supporting-text-font'); |
| 221 | + font-size: map.get($tokens, 'supporting-text-size'); |
| 222 | + line-height: map.get($tokens, 'supporting-text-line-height'); |
| 223 | + font-weight: map.get($tokens, 'supporting-text-weight'); |
216 | 224 | height: min-content; // Needed for Safari
|
217 | 225 | position: relative;
|
218 | 226 | }
|
|
0 commit comments