Skip to content

Commit

Permalink
fix(styles): Alerts: avoid flash of default icon when using post-icon (
Browse files Browse the repository at this point in the history
…#2244)

Co-authored-by: Alizé Debray <[email protected]>
  • Loading branch information
imagoiq and alizedebray authored Nov 9, 2023
1 parent f8204bf commit 04932ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/plenty-pianos-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-styles': patch
---

Fixed default icon flashing when using a `post-icon` on alerts.
7 changes: 6 additions & 1 deletion packages/styles/src/mixins/_notification.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@
@include icons-mx.icon($icon);
}

// icon override (post-icon)
// Prevent flashing when using post-icon
&:has(> post-icon)::before {
content: none;
}

// icon override (post-icon), needed when :has is not supported
> post-icon {
background-color: $color;
}
Expand Down

0 comments on commit 04932ce

Please sign in to comment.