Skip to content

Commit

Permalink
feat(switch): add disabled icon opacity tokens
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 530925315
  • Loading branch information
asyncLiz authored and copybara-github committed May 10, 2023
1 parent ae9fc76 commit 61550d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
10 changes: 6 additions & 4 deletions switch/lib/_icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,25 @@ $_easing-standard: map.get($_md-sys-motion, easing-standard);
transform: rotate(-45deg);
}

.switch--selected .icon {
.icon--on {
width: var(--_selected-icon-size);
height: var(--_selected-icon-size);
fill: var(--_selected-icon-color);
}

.switch--unselected .icon {
.icon--off {
width: var(--_unselected-icon-size);
height: var(--_unselected-icon-size);
fill: var(--_unselected-icon-color);
}

.switch--selected:disabled .icon {
.switch--selected:disabled .icon--on {
fill: var(--_disabled-selected-icon-color);
opacity: var(--_disabled-selected-icon-opacity);
}

.switch--unselected:disabled .icon {
.switch--unselected:disabled .icon--off {
fill: var(--_disabled-unselected-icon-color);
opacity: var(--_disabled-unselected-icon-opacity);
}
}
9 changes: 0 additions & 9 deletions switch/lib/_switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,6 @@ $_forced-colors-theme: (
(
color-key: disabled-unselected-track-outline-color,
opacity-key: disabled-track-opacity
),
// Disabled Icon
(
color-key: disabled-selected-icon-color,
opacity-key: disabled-selected-icon-opacity
),
(
color-key: disabled-unselected-icon-color,
opacity-key: disabled-unselected-icon-opacity
)
)
);
Expand Down

0 comments on commit 61550d2

Please sign in to comment.