Skip to content

Commit 0ddb7af

Browse files
fix: auto adjust SVG icons to pick up text color in WHCM (#2550)
Co-authored-by: Robert Snow <[email protected]>
1 parent f866014 commit 0ddb7af

File tree

1 file changed

+7
-0
lines changed
  • packages/@adobe/spectrum-css-temp/components/icon

1 file changed

+7
-0
lines changed

packages/@adobe/spectrum-css-temp/components/icon/icons.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@ governing permissions and limitations under the License.
2828
/* Don't catch clicks or hover, otherwise they may not escape the SVG */
2929
pointer-events: none;
3030
}
31+
@media (forced-colors: active) {
32+
.spectrum-Icon,
33+
.spectrum-UIIcon {
34+
/* Automatically adjust the SVG to pick up the text color for High Contrast mode */
35+
forced-color-adjust: auto;
36+
}
37+
}

0 commit comments

Comments
 (0)