File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 1
1
@use ' sass:map' ;
2
- @use ' @material/fab/fab' as mdc-fab ;
3
2
@use ' @material/fab/fab-theme' as mdc-fab-theme ;
4
3
@use ' @material/fab/extended-fab-theme' as mdc-extended-fab-theme ;
5
- @use ' ../core/mdc-helpers/mdc-helpers' ;
6
4
@use ' ../core/style/sass-utils' ;
7
5
@use ' ../core/theming/theming' ;
8
6
@use ' ../core/theming/inspection' ;
73
71
@include _theme-from-tokens (inspection .get-theme-tokens ($theme , typography ));
74
72
}
75
73
@else {
76
- @include mdc-helpers .using-mdc-typography ($theme ) {
77
- @include mdc-fab .without-ripple ($query : mdc-helpers .$mdc-typography-styles-query );
78
- }
79
-
80
- $typography-tokens : tokens-mdc-extended-fab .get-typography-tokens ($theme );
81
74
@include sass-utils .current-selector-or-root () {
82
- @include mdc-extended-fab-theme .theme ($ typography-tokens );
75
+ @include mdc-extended-fab-theme .theme (tokens-mdc-extended-fab . get- typography-tokens( $theme ) );
83
76
}
84
77
}
85
78
}
Original file line number Diff line number Diff line change 1
1
@use ' @material/fab' as mdc-fab ;
2
2
@use ' @material/fab/extended-fab-theme' as mdc-extended-fab-theme ;
3
3
@use ' @material/fab/fab-theme' as mdc-fab-theme ;
4
+ @use ' @material/typography/typography' as mdc-typography ;
4
5
@use ' @material/theme/custom-properties' as mdc-custom-properties ;
5
6
6
7
@use ' ./button-base' ;
17
18
$mdc-fab-token-slots : tokens-mdc-fab .get-token-slots ();
18
19
$mdc-extended-fab-token-slots : tokens-mdc-extended-fab .get-token-slots ();
19
20
20
- // Add the MDC fab static styles.
21
- @include mdc-fab .static-styles ();
21
+ // Note: it's important to pass the query here, otherwise MDC generates
22
+ // some unnecessary typography styles for the extended FAB.
23
+ @include mdc-fab .static-styles ($query : mdc-helpers .$mdc-base-styles-query );
22
24
23
- // Add default values for tokens that aren't outputted by the theming API.
24
25
.mat-mdc-fab , .mat-mdc-mini-fab {
25
- // Add the official slots for the MDC fab.
26
26
@include mdc-fab-theme .theme-styles ($mdc-fab-token-slots );
27
27
}
28
28
29
29
.mat-mdc-extended-fab {
30
- // Add the official slots for the MDC fab.
30
+ // Before tokens MDC included the font smoothing automatically, but with
31
+ // tokens it doesn't. We add it since it can cause tiny differences in
32
+ // screenshot tests and it generally looks better.
33
+ @include mdc-typography .smooth-font ();
31
34
@include mdc-extended-fab-theme .theme-styles ($mdc-extended-fab-token-slots );
32
35
}
33
36
}
You can’t perform that action at this time.
0 commit comments