Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/demo-app/chips/chips-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h4>With avatar and icons</h4>


<mat-chip-list>
<mat-chip>
<mat-chip disabled>
<mat-icon matChipAvatar>home</mat-icon>
Home
<mat-icon matChipRemove>cancel</mat-icon>
Expand Down
19 changes: 12 additions & 7 deletions src/lib/chips/_chips-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ $mat-chip-remove-font-size: 18px;
color: $foreground;
opacity: 0.4;
}

.mat-chip-remove:hover {
opacity: 0.54;
}
}

@mixin mat-chips-theme-color($palette) {
Expand All @@ -38,12 +34,21 @@ $mat-chip-remove-font-size: 18px;
$unselected-background: mat-color($background, unselected-chip);
$unselected-foreground: mat-color($foreground, text);


.mat-chip.mat-standard-chip {
@include mat-chips-color($unselected-foreground, $unselected-background);

&:focus {
@include _mat-theme-elevation(3, $theme);
&:not(.mat-chip-disabled) {
&:active {
@include _mat-theme-elevation(3, $theme);
}

.mat-chip-remove:hover {
opacity: 0.54;
}
}

&.mat-chip-disabled {
opacity: 0.4;
}
}

Expand Down
15 changes: 11 additions & 4 deletions src/lib/chips/chips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ $mat-chip-remove-size: 18px;
}
}

&:active {
@include mat-elevation(3);
}

@include cdk-high-contrast {
outline: solid 1px;

Expand All @@ -89,6 +85,17 @@ $mat-chip-remove-size: 18px;
}
}

&.mat-chip-disabled {
&::after {
opacity: 0;
}

.mat-chip-remove,
.mat-chip-trailing-icon {
cursor: default;
}
}

&.mat-chip-with-trailing-icon.mat-chip-with-avatar,
&.mat-chip-with-avatar {
padding-top: $mat-chip-avatar-vertical-padding;
Expand Down