File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 226
226
@mixin density ($theme ) {
227
227
$density-scale : theming .clamp-density (inspection .get-theme-density ($theme ), -3 );
228
228
229
+ .mat-mdc-raised-button {
230
+ $density-tokens : tokens-mdc-button-protected .get-density-tokens ($theme );
231
+ @include mdc-button-protected-theme .theme ($density-tokens );
232
+ @include button-theme-private .touch-target-density ($density-scale );
233
+ }
234
+
229
235
.mat-mdc-button ,
230
- .mat-mdc-raised-button ,
231
236
.mat-mdc-unelevated-button ,
232
237
.mat-mdc-outlined-button {
233
238
// Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
Original file line number Diff line number Diff line change
1
+ @use ' sass:map' ;
1
2
@use ' ../../token-utils' ;
2
3
@use ' ../../../mdc-helpers/mdc-helpers' ;
3
4
@use ' ../../../style/sass-utils' ;
4
5
@use ' ../../../theming/inspection' ;
6
+ @use ' ../../../theming/theming' ;
5
7
6
8
// The prefix used to generate the fully qualified name for tokens in this file.
7
9
$prefix : (mdc, button- protected);
@@ -15,7 +17,6 @@ $prefix: (mdc, button-protected);
15
17
@function get-unthemable-tokens () {
16
18
@return (
17
19
container- shape: 4px ,
18
- container- height: 36px ,
19
20
keep- touch- target: false,
20
21
21
22
focus- ring- color: null,
@@ -79,7 +80,19 @@ $prefix: (mdc, button-protected);
79
80
80
81
// Tokens that can be configured through Angular Material's density theming API.
81
82
@function get-density-tokens ($theme ) {
82
- @return ();
83
+ $scale : theming .clamp-density (inspection .get-theme-density ($theme ), -3 );
84
+ @return (
85
+ container- height:
86
+ map .get (
87
+ (
88
+ 0 : 36px ,
89
+ -1 : 32px ,
90
+ -2 : 28px ,
91
+ -3 : 24px ,
92
+ ),
93
+ $scale
94
+ )
95
+ );
83
96
}
84
97
85
98
// Combines the tokens generated by the above functions into a single map with placeholder values.
You can’t perform that action at this time.
0 commit comments