File tree Expand file tree Collapse file tree 4 files changed +16
-15
lines changed
src/material-experimental/mdc-chips Expand file tree Collapse file tree 4 files changed +16
-15
lines changed Original file line number Diff line number Diff line change
1
+ < span class ="mdc-chip__ripple "> </ span >
1
2
< ng-content select ="mat-chip-avatar, [matChipAvatar] "> </ ng-content >
2
3
< div class ="mdc-chip__checkmark " *ngIf ="_chipListMultiple ">
3
4
< svg class ="mdc-chip__checkmark-svg " viewBox ="-2 -3 30 30 ">
Original file line number Diff line number Diff line change 1
1
< div role ="gridcell ">
2
2
< div #chipContent tabindex ="-1 " class ="mat-chip-row-focusable-text-content ">
3
+ < span class ="mdc-chip__ripple "> </ span >
3
4
< ng-content select ="mat-chip-avatar, [matChipAvatar] "> </ ng-content >
4
5
< span class ="mdc-chip__text "> < ng-content > </ ng-content > </ span >
5
6
< ng-content select ="mat-chip-trailing-icon,[matChipTrailingIcon] "> </ ng-content >
Original file line number Diff line number Diff line change
1
+ < span class ="mdc-chip__ripple "> </ span >
1
2
< ng-content select ="mat-chip-avatar, [matChipAvatar] "> </ ng-content >
2
3
< div class ="mdc-chip__text mdc-chip__action--primary "> < ng-content > </ ng-content > </ div >
3
4
< ng-content select ="mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon] "> </ ng-content >
Original file line number Diff line number Diff line change 1
1
@import ' @material/chips/mixins' ;
2
+ @import ' ../../material/core/style/layout-common' ;
2
3
@import ' ../../material/core/style/noop-animation' ;
3
4
@import ' ../../cdk/a11y/a11y' ;
4
5
@import ' ../mdc-helpers/mdc-helpers' ;
28
29
// The MDC chip styles related to hover and focus states are intertwined with the MDC ripple styles.
29
30
// We currently don't use the MDC ripple due to size concerns, therefore we need to add some
30
31
// additional styles to restore these states.
31
- .mat-mdc-chip :not (.mat-mdc-chip-disabled ) {
32
- & :hover , & :focus , div :focus {
33
- .mdc-chip__text ::after {
34
- content : ' ' ;
35
- position : absolute ;
36
- width : 100% ;
37
- height : 100% ;
32
+ .mdc-chip__ripple {
33
+ @include mdc-ripple-target-common ($query : structure);
38
34
39
- // Note that we use a `background` and `opacity`, instead of an `rgba` background, because
40
- // `rgba` backgrounds get converted into solid colors in high contrast mode.
41
- background : #000 ;
42
- opacity : 0.2 ;
43
- top : 0 ;
44
- left : 0 ;
45
- pointer-events : none ;
46
- }
35
+ & ::after , & ::before {
36
+ @include mat-fill ;
37
+ content : ' ' ;
38
+ pointer-events : none ;
39
+ opacity : 0 ;
47
40
}
48
41
}
49
42
55
48
.mat-mdc-chip-trailing-icon , .mat-chip-row-focusable-text-content {
56
49
pointer-events : none ;
57
50
}
51
+
52
+ // Do not show state interactions for disabled chips.
53
+ .mdc-chip__ripple ::after , .mdc-chip__ripple ::before {
54
+ display : none ;
55
+ }
58
56
}
59
57
60
58
// Angular Material supports vertically-stacked chips, which MDC does not.
You can’t perform that action at this time.
0 commit comments