File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
src/material-experimental/mdc-radio Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 16
16
));
17
17
18
18
// TODO(crisbeto): this should be included by MDC's `theme-styles`, but it isn't currently.
19
- @include mdc-radio-theme .focus-indicator-color ($color-palette );
19
+ & .mat-mdc-radio-checked {
20
+ @include mdc-radio-theme .focus-indicator-color ($color-palette );
21
+ }
20
22
}
21
23
22
24
@mixin color ($config-or-theme ) {
30
32
31
33
.mat-mdc-radio-button {
32
34
@include mdc-form-field .core-styles ($query : mdc-helpers .$mat-theme-styles-query );
35
+ @include mdc-radio-theme .focus-indicator-color (mdc-theme-color .prop-value (on-surface ));
33
36
@include mdc-radio-theme .theme ((
34
37
// The disabled colors don't use the `rgba` version, because
35
38
// MDC applies a separate opacity to disabled buttons.
Original file line number Diff line number Diff line change 3
3
@use ' @material/radio/radio-theme' as mdc-radio-theme ;
4
4
@use ' @material/form-field' as mdc-form-field ;
5
5
@use ' @material/touch-target' as mdc-touch-target ;
6
+ @use ' @material/ripple' as mdc-ripple ;
6
7
@use ' ../mdc-helpers/mdc-helpers' ;
7
8
@use ' ../../cdk/a11y' ;
8
9
@use ' ../../material/core/style/layout-common' ;
34
35
unselected- pressed- state- layer- opacity: null,
35
36
)));
36
37
}
38
+
39
+ & :hover .mdc-radio__native-control :not ([disabled ]):not (:focus ) {
40
+ & ~ .mdc-radio__background ::before {
41
+ opacity : map .get (mdc-ripple .$dark-ink-opacities , hover );
42
+ transform : scale (1 );
43
+ }
44
+ }
37
45
}
38
46
39
47
// This is necessary because we do not depend on MDC's ripple, but have our own that should be
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export class MatRadioGroup extends _MatRadioGroupBase<MatRadioButton> {
90
90
'[class.mat-primary]' : 'color === "primary"' ,
91
91
'[class.mat-accent]' : 'color === "accent"' ,
92
92
'[class.mat-warn]' : 'color === "warn"' ,
93
+ '[class.mat-mdc-radio-checked]' : 'checked' ,
93
94
'[class._mat-animation-noopable]' : '_noopAnimations' ,
94
95
// Needs to be removed since it causes some a11y issues (see #21266).
95
96
'[attr.tabindex]' : 'null' ,
You can’t perform that action at this time.
0 commit comments