@@ -51,6 +51,7 @@ $_light-theme: (
51
51
container-height : 56px ,
52
52
container-shadow-color : black ,
53
53
container-shape : $shape-radius ,
54
+ container-surface-tint-layer-color : null,
54
55
container-width : 56px ,
55
56
focus-container-elevation : null,
56
57
focus-icon-color : null,
@@ -159,13 +160,25 @@ $custom-property-prefix: 'fab';
159
160
@include _container-elevation (
160
161
map .get ($resolvers , elevation ),
161
162
map .get ($theme , container-shadow-color ),
163
+ map .get ($theme , container-surface-tint-layer-color ),
162
164
(
163
165
default : map .get ($theme , container-elevation ),
164
166
hover: map .get ($theme , hover-container-elevation ),
165
167
focus: map .get ($theme , focus-container-elevation ),
166
168
pressed: map .get ($theme , pressed-container-elevation ),
167
169
)
168
170
);
171
+ @include _lowered-container-elevation (
172
+ map .get ($resolvers , elevation ),
173
+ map .get ($theme , container-shadow-color ),
174
+ map .get ($theme , container-surface-tint-layer-color ),
175
+ (
176
+ default : map .get ($theme , lowered-container-elevation ),
177
+ hover: map .get ($theme , lowered-hover-container-elevation ),
178
+ focus: map .get ($theme , lowered-focus-container-elevation ),
179
+ pressed: map .get ($theme , lowered-pressed-container-elevation ),
180
+ )
181
+ );
169
182
@include _container-height (map .get ($theme , container-height ));
170
183
@include _container-width (map .get ($theme , container-width ));
171
184
@include icon-size (map .get ($theme , icon-size ));
@@ -299,20 +312,22 @@ $custom-property-prefix: 'fab';
299
312
}
300
313
}
301
314
302
- @mixin _container-elevation ($resolver , $shadow-color , $map ) {
315
+ @mixin _container-elevation ($resolver , $shadow-color , $container-color , $ map ) {
303
316
& :not (:disabled ) {
304
317
@include elevation-theme .with-resolver (
305
318
$resolver ,
306
319
$elevation : state .get-default-state ($map ),
307
320
$shadow-color : $shadow-color
308
321
);
322
+ @include elevation-theme .overlay-container-color ($container-color );
309
323
310
324
& :hover {
311
325
@include elevation-theme .with-resolver (
312
326
$resolver ,
313
327
$elevation : state .get-hover-state ($map ),
314
328
$shadow-color : $shadow-color
315
329
);
330
+ @include elevation-theme .overlay-container-color ($container-color );
316
331
}
317
332
318
333
& :focus {
@@ -321,6 +336,7 @@ $custom-property-prefix: 'fab';
321
336
$elevation : state .get-focus-state ($map ),
322
337
$shadow-color : $shadow-color
323
338
);
339
+ @include elevation-theme .overlay-container-color ($container-color );
324
340
}
325
341
326
342
& :active {
@@ -329,6 +345,7 @@ $custom-property-prefix: 'fab';
329
345
$elevation : state .get-pressed-state ($map ),
330
346
$shadow-color : $shadow-color
331
347
);
348
+ @include elevation-theme .overlay-container-color ($container-color );
332
349
}
333
350
}
334
351
@@ -342,6 +359,49 @@ $custom-property-prefix: 'fab';
342
359
}
343
360
}
344
361
362
+ @mixin _lowered-container-elevation (
363
+ $resolver ,
364
+ $shadow-color ,
365
+ $container-color ,
366
+ $map
367
+ ) {
368
+ & .mdc-fab--lowered :not (:disabled ) {
369
+ @include elevation-theme .with-resolver (
370
+ $resolver ,
371
+ $elevation : state .get-default-state ($map ),
372
+ $shadow-color : $shadow-color
373
+ );
374
+ @include elevation-theme .overlay-container-color ($container-color );
375
+
376
+ & :hover {
377
+ @include elevation-theme .with-resolver (
378
+ $resolver ,
379
+ $elevation : state .get-hover-state ($map ),
380
+ $shadow-color : $shadow-color
381
+ );
382
+ @include elevation-theme .overlay-container-color ($container-color );
383
+ }
384
+
385
+ & :focus {
386
+ @include elevation-theme .with-resolver (
387
+ $resolver ,
388
+ $elevation : state .get-focus-state ($map ),
389
+ $shadow-color : $shadow-color
390
+ );
391
+ @include elevation-theme .overlay-container-color ($container-color );
392
+ }
393
+
394
+ & :active {
395
+ @include elevation-theme .with-resolver (
396
+ $resolver ,
397
+ $elevation : state .get-pressed-state ($map ),
398
+ $shadow-color : $shadow-color
399
+ );
400
+ @include elevation-theme .overlay-container-color ($container-color );
401
+ }
402
+ }
403
+ }
404
+
345
405
///
346
406
/// Sets outline width only when button is in focus. Also sets padding to
347
407
/// include outline on focus (Helps prevent size jump on focus).
0 commit comments