File tree Expand file tree Collapse file tree 4 files changed +20
-10
lines changed
src/material-experimental/mdc-checkbox Expand file tree Collapse file tree 4 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ sass_binary(
52
52
deps = [
53
53
"//src/material-experimental/mdc-helpers:mdc_helpers_scss_lib" ,
54
54
"//src/material-experimental/mdc-helpers:mdc_scss_deps_lib" ,
55
+ "//src/material/core:core_scss_lib" ,
55
56
],
56
57
)
57
58
Original file line number Diff line number Diff line change 77
77
}
78
78
}
79
79
80
- @mixin mat-mdc-checkbox-density ($density-scale ) {}
80
+ @mixin mat-mdc-checkbox-density ($density-scale ) {
81
+ .mat-mdc-checkbox .mdc-checkbox {
82
+ @include mdc-checkbox-density ($density-scale );
83
+ }
84
+ }
81
85
82
86
@mixin mat-mdc-checkbox-theme ($theme ) {
83
87
$color : mat-get-color-config ($theme );
Original file line number Diff line number Diff line change 31
31
[matRippleTrigger] ="checkbox "
32
32
[matRippleDisabled] ="disableRipple || disabled "
33
33
[matRippleCentered] ="true "
34
- [matRippleRadius] ="20 "
35
34
[matRippleAnimation] ="_rippleAnimation "> </ div >
36
35
</ div >
37
36
< label #label
Original file line number Diff line number Diff line change 3
3
@import ' @material/form-field/mixins.import' ;
4
4
@import ' @material/ripple/variables.import' ;
5
5
@import ' ../mdc-helpers/mdc-helpers' ;
6
+ @import ' ../../material/core/style/_layout-common.scss' ;
6
7
7
8
@include mdc-checkbox-without-ripple ($query : $mat-base-styles-query );
8
9
@include mdc-form-field-core-styles ($query : $mat-base-styles-query );
51
52
}
52
53
}
53
54
54
- .mat-mdc-checkbox-ripple , .mat-mdc-checkbox .mdc-checkbox__background ::before {
55
- $ripple-size : 40px ;
56
- position : absolute ;
57
- width : $ripple-size ;
58
- height : $ripple-size ;
59
- top : 50% ;
60
- left : 50% ;
61
- margin : (- $ripple-size / 2 ) 0 0 (- $ripple-size / 2 );
55
+ .mat-mdc-checkbox-ripple {
56
+ @include mat-fill ();
57
+
58
+ // Usually the ripple radius would be specified through the MatRipple input, but
59
+ // since we dynamically adjust the size of the ripple container, we cannot use a
60
+ // fixed ripple radius.
61
+ border-radius : 50% ;
62
62
pointer-events : none ;
63
+
64
+ // Fixes the ripples not clipping to the border radius on Safari. Uses `:not(:empty)`
65
+ // in order to avoid creating extra layers when there aren't any ripples.
66
+ & :not (:empty ) {
67
+ transform : translateZ (0 );
68
+ }
63
69
}
You can’t perform that action at this time.
0 commit comments