Skip to content

Commit

Permalink
fix(iconbutton): fix HCM disabled opacity and outlined
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 565089379
  • Loading branch information
AndrewJakubowicz authored and copybara-github committed Sep 13, 2023
1 parent fe79d2a commit 1163315
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 7 additions & 3 deletions iconbutton/internal/_outlined-icon-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,20 @@
}

@media (forced-colors: active) {
:host([disabled]) {
--_disabled-outline-opacity: 1;
}

// Selected button in HCM has an outline.
.selected {
&::before {
border-color: var(--_outline-color);
border-color: CanvasText;
border-width: var(--_outline-width);
}

&:disabled::before {
border-color: var(--_disabled-outline-color);
opacity: var(--_disabled-outline-opacity);
border-color: GrayText;
opacity: 1;
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions iconbutton/internal/_shared.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,10 @@
:host([touch-target='none']) .touch {
display: none;
}

@media (forced-colors: active) {
:host([disabled]) {
--_disabled-icon-opacity: 1;
}
}
}

0 comments on commit 1163315

Please sign in to comment.