@@ -19,7 +19,7 @@ $mat-button-state-target: '.mdc-button__ripple';
19
19
$mat-fab-state-target : ' .mdc-fab__ripple' ;
20
20
21
21
// Applies the disabled theme color to the text color.
22
- @mixin _mat-button-disabled -color () {
22
+ @mixin _disabled -color () {
23
23
@include mdc-theme .prop (color ,
24
24
mdc-theme-color .ink-color-for-fill_ (disabled , mdc-theme-color .$background ));
25
25
}
@@ -30,7 +30,7 @@ $mat-fab-state-target: '.mdc-fab__ripple';
30
30
// previously set theme color, so it must be ordered after the theme styles.
31
31
// TODO(andrewseguin): Discuss with the MDC team to see if we can avoid the :not(:disabled) by
32
32
// manually styling disabled buttons with a [disabled] selector.
33
- @mixin _mat-button-apply -disabled-style () {
33
+ @mixin _apply -disabled-style () {
34
34
& [disabled ][disabled ] {
35
35
@content ;
36
36
}
@@ -39,7 +39,7 @@ $mat-fab-state-target: '.mdc-fab__ripple';
39
39
// The MDC button's ripple ink color is based on the theme color, not on the foreground base
40
40
// which is what the ripple mixin uses. This creates a new theme that sets the color to the
41
41
// foreground base to appropriately color the ink.
42
- @mixin _mat-button-ripple-ink -color ($mdcColor ) {
42
+ @mixin _ripple -color ($mdcColor ) {
43
43
@include ripple-theme .theme ((
44
44
foreground: (
45
45
base: mdc-theme-color .prop-value ($mdcColor )
@@ -51,7 +51,7 @@ $mat-fab-state-target: '.mdc-fab__ripple';
51
51
// mixin `mdc-button--filled`.
52
52
// TODO(andrewseguin): Discuss with the MDC team about providing a variable for the 0.12 value
53
53
// or otherwise have a mixin we can call to apply this style for both button and anchors.
54
- @mixin _mat-button-disabled -background () {
54
+ @mixin _disabled -background () {
55
55
@include mdc-theme .prop (background-color ,
56
56
rgba (mdc-theme-color .prop-value (on-surface ), 0.12 ));
57
57
}
@@ -78,23 +78,23 @@ $mat-fab-state-target: '.mdc-fab__ripple';
78
78
@include mdc-ripple-theme .states-base-color (primary,
79
79
$query : mdc-helpers .$mat-theme-styles-query ,
80
80
$ripple-target : $mat-button-state-target );
81
- @include _mat-button-ripple-ink -color (primary);
81
+ @include _ripple -color (primary);
82
82
}
83
83
84
84
& .mat-accent {
85
85
@include mdc-button-theme .ink-color (secondary, $query : mdc-helpers .$mat-theme-styles-query );
86
86
@include mdc-ripple-theme .states-base-color (secondary,
87
87
$query : mdc-helpers .$mat-theme-styles-query ,
88
88
$ripple-target : $mat-button-state-target );
89
- @include _mat-button-ripple-ink -color (secondary);
89
+ @include _ripple -color (secondary);
90
90
}
91
91
92
92
& .mat-warn {
93
93
@include mdc-button-theme .ink-color (error, $query : mdc-helpers .$mat-theme-styles-query );
94
94
@include mdc-ripple-theme .states-base-color (error,
95
95
$query : mdc-helpers .$mat-theme-styles-query ,
96
96
$ripple-target : $mat-button-state-target );
97
- @include _mat-button-ripple-ink -color (error);
97
+ @include _ripple -color (error);
98
98
}
99
99
}
100
100
@@ -117,7 +117,7 @@ $mat-fab-state-target: '.mdc-fab__ripple';
117
117
@include mdc-ripple-theme .states-base-color (on- primary,
118
118
$query : mdc-helpers .$mat-theme-styles-query ,
119
119
$ripple-target : $mat-button-state-target );
120
- @include _mat-button-ripple-ink -color (on- primary);
120
+ @include _ripple -color (on- primary);
121
121
}
122
122
123
123
& .mat-accent {
@@ -128,7 +128,7 @@ $mat-fab-state-target: '.mdc-fab__ripple';
128
128
@include mdc-ripple-theme .states-base-color (on- secondary,
129
129
$query : mdc-helpers .$mat-theme-styles-query ,
130
130
$ripple-target : $mat-button-state-target );
131
- @include _mat-button-ripple-ink -color (on- secondary);
131
+ @include _ripple -color (on- secondary);
132
132
}
133
133
134
134
& .mat-warn {
@@ -138,11 +138,11 @@ $mat-fab-state-target: '.mdc-fab__ripple';
138
138
@include mdc-ripple-theme .states-base-color (on- error,
139
139
$query : mdc-helpers .$mat-theme-styles-query ,
140
140
$ripple-target : $mat-button-state-target );
141
- @include _mat-button-ripple-ink -color (on- error);
141
+ @include _ripple -color (on- error);
142
142
}
143
143
144
- @include _mat-button-apply -disabled-style () {
145
- @include _mat-button-disabled -background ();
144
+ @include _apply -disabled-style () {
145
+ @include _disabled -background ();
146
146
}
147
147
}
148
148
@@ -167,21 +167,21 @@ $mat-fab-state-target: '.mdc-fab__ripple';
167
167
$query : mdc-helpers .$mat-theme-styles-query );
168
168
}
169
169
170
- @include _mat-button-apply -disabled-style () {
170
+ @include _apply -disabled-style () {
171
171
@include mdc-theme .prop (border-color ,
172
172
mdc-theme-color .ink-color-for-fill_ (disabled , mdc-theme-color .$background ));
173
173
}
174
174
}
175
175
176
176
.mat-mdc-raised-button {
177
- @include _mat-button-apply -disabled-style () {
177
+ @include _apply -disabled-style () {
178
178
@include mdc-elevation-theme .elevation (0 , $query : mdc-helpers .$mat-theme-styles-query );
179
179
}
180
180
}
181
181
182
182
.mat-mdc-button , .mat-mdc-raised-button , .mat-mdc-unelevated-button , .mat-mdc-outlined-button {
183
- @include _mat-button-apply -disabled-style () {
184
- @include _mat-button-disabled -color ();
183
+ @include _apply -disabled-style () {
184
+ @include _disabled -color ();
185
185
}
186
186
}
187
187
@@ -249,7 +249,7 @@ $mat-fab-state-target: '.mdc-fab__ripple';
249
249
@include mdc-fab-theme .container-color (primary,
250
250
$query : mdc-helpers .$mat-theme-styles-query );
251
251
@include mdc-fab-theme .ink-color (on- primary, $query : mdc-helpers .$mat-theme-styles-query );
252
- @include _mat-button-ripple-ink -color (on- primary);
252
+ @include _ripple -color (on- primary);
253
253
}
254
254
255
255
& .mat-accent {
@@ -259,7 +259,7 @@ $mat-fab-state-target: '.mdc-fab__ripple';
259
259
@include mdc-fab-theme .container-color (secondary,
260
260
$query : mdc-helpers .$mat-theme-styles-query );
261
261
@include mdc-fab-theme .ink-color (on- secondary, $query : mdc-helpers .$mat-theme-styles-query );
262
- @include _mat-button-ripple-ink -color (on- secondary);
262
+ @include _ripple -color (on- secondary);
263
263
}
264
264
265
265
& .mat-warn {
@@ -268,12 +268,12 @@ $mat-fab-state-target: '.mdc-fab__ripple';
268
268
$ripple-target : $mat-fab-state-target );
269
269
@include mdc-fab-theme .container-color (error, $query : mdc-helpers .$mat-theme-styles-query );
270
270
@include mdc-fab-theme .ink-color (on- error, $query : mdc-helpers .$mat-theme-styles-query );
271
- @include _mat-button-ripple-ink -color (on- error);
271
+ @include _ripple -color (on- error);
272
272
}
273
273
274
- @include _mat-button-apply -disabled-style () {
275
- @include _mat-button-disabled -color ();
276
- @include _mat-button-disabled -background ();
274
+ @include _apply -disabled-style () {
275
+ @include _disabled -color ();
276
+ @include _disabled -background ();
277
277
@include mdc-elevation-theme .elevation (0 , $query : mdc-helpers .$mat-theme-styles-query );
278
278
}
279
279
}
@@ -324,27 +324,27 @@ $mat-fab-state-target: '.mdc-fab__ripple';
324
324
$query : mdc-helpers .$mat-theme-styles-query ,
325
325
$ripple-target : $mat-button-state-target );
326
326
@include mdc-icon-button .ink-color (primary, $query : mdc-helpers .$mat-theme-styles-query );
327
- @include _mat-button-ripple-ink -color (primary);
327
+ @include _ripple -color (primary);
328
328
}
329
329
330
330
& .mat-accent {
331
331
@include mdc-ripple-theme .states-base-color (secondary,
332
332
$query : mdc-helpers .$mat-theme-styles-query ,
333
333
$ripple-target : $mat-button-state-target );
334
334
@include mdc-icon-button .ink-color (secondary, $query : mdc-helpers .$mat-theme-styles-query );
335
- @include _mat-button-ripple-ink -color (secondary);
335
+ @include _ripple -color (secondary);
336
336
}
337
337
338
338
& .mat-warn {
339
339
@include mdc-ripple-theme .states-base-color (error,
340
340
$query : mdc-helpers .$mat-theme-styles-query ,
341
341
$ripple-target : $mat-button-state-target );
342
342
@include mdc-icon-button .ink-color (error, $query : mdc-helpers .$mat-theme-styles-query );
343
- @include _mat-button-ripple-ink -color (error);
343
+ @include _ripple -color (error);
344
344
}
345
345
346
- @include _mat-button-apply -disabled-style () {
347
- @include _mat-button-disabled -color ();
346
+ @include _apply -disabled-style () {
347
+ @include _disabled -color ();
348
348
}
349
349
}
350
350
0 commit comments