Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(styles): Display of icons in HCM on Webkit #2638

Merged
merged 6 commits into from
Feb 14, 2024
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
5 changes: 5 additions & 0 deletions .changeset/quiet-pens-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': patch
---

Fixed display of icons in high-contrast mode in webkit.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ span {
width: 100%;
height: 100%;
fill: currentColor;
forced-color-adjust: preserve-parent-color;
background-color: currentColor;
-webkit-mask-position: center center;
mask-position: center center;
Expand Down
2 changes: 2 additions & 0 deletions packages/styles/src/mixins/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
@mixin icon($name) {
mask-image: url('#{icon-fn.get-svg-url($name)}');
background-color: currentColor;
color: currentColor; // Required in this case with usage of forced-color-adjust: preserve-parent-color
forced-color-adjust: preserve-parent-color;
}

@mixin remove-icon() {
Expand Down
Loading