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