File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 1
1
@use ' @material/button/button' as mdc-button ;
2
- @use ' @material/button/button-theme' as mdc-button-theme ;
3
2
@use ' @material/button/button-text-theme' as mdc-button-text-theme ;
4
3
@use ' @material/button/button-filled-theme' as mdc-button-filled-theme ;
5
4
@use ' @material/button/button-protected-theme' as mdc-button-protected-theme ;
256
255
}
257
256
258
257
.mat-mdc-outlined-button {
259
- // Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
260
- & .mat-mdc-button-base {
261
- @include mdc-button-theme .density ($density-scale , $query : mdc-helpers .$mdc-base-styles-query );
262
- @include button-theme-private .touch-target-density ($density-scale );
263
- }
258
+ $density-tokens : tokens-mdc-outlined-button .get-density-tokens ($theme );
259
+ @include mdc-button-outlined-theme .theme ($density-tokens );
260
+ @include button-theme-private .touch-target-density ($density-scale );
264
261
}
265
262
}
266
263
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, outlined- button);
@@ -49,9 +51,7 @@ $prefix: (mdc, outlined-button);
49
51
label- text- font: null,
50
52
label- text- weight: null,
51
53
label- text- tracking: null,
52
- label- text- transform: null,
53
-
54
- container- height: 36px
54
+ label- text- transform: null
55
55
);
56
56
}
57
57
@@ -82,7 +82,20 @@ $prefix: (mdc, outlined-button);
82
82
83
83
// Tokens that can be configured through Angular Material's density theming API.
84
84
@function get-density-tokens ($theme ) {
85
- @return ();
85
+ $scale : theming .clamp-density (inspection .get-theme-density ($theme ), -3 );
86
+
87
+ @return (
88
+ container- height:
89
+ map .get (
90
+ (
91
+ 0 : 36px ,
92
+ -1 : 32px ,
93
+ -2 : 28px ,
94
+ -3 : 24px ,
95
+ ),
96
+ $scale
97
+ )
98
+ );
86
99
}
87
100
88
101
// 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