Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

feat(chips): Add mdc-chip-icon-color mixin #2477

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion packages/mdc-chips/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ Mixin | Description
`mdc-chip-corner-radius($radius)` | Customizes the corner radius for a chip
`mdc-chip-fill-color-accessible($color)` | Customizes the background fill color for a chip, and updates the chip's ink and ripple color to meet accessibility standards
`mdc-chip-fill-color($color)` | Customizes the background fill color for a chip
`mdc-chip-ink-color($color)` | Customizes the text ink color for a chip, and updates the chip's ripple color to match
`mdc-chip-ink-color($color)` | Customizes the text ink color for a chip, and updates the chip's ripple color to match. This affects both text and icon, unless `mdc-chip-icon-color` is also used.
`mdc-chip-icon-color($color)` | Customizes the icon color for a chip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing period.

`mdc-chip-selected-ink-color($color)` | Customizes text ink and ripple color of a chip in the _selected_ state
`mdc-chip-stroke($width, $style, $color)` | Customizes the border stroke properties for a chip
`mdc-chip-stroke-width($width)` | Customizes the border stroke width for a chip
Expand Down
6 changes: 6 additions & 0 deletions packages/mdc-chips/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
}
}

@mixin mdc-chip-icon-color($color) {
.mdc-chip__icon {
@include mdc-theme-prop(color, $color);
}
}

@mixin mdc-chip-selected-ink-color($color) {
&.mdc-chip {
@include mdc-states-selected($color);
Expand Down