From 2952a397309e477cfb1d53d329801c7e15e90463 Mon Sep 17 00:00:00 2001 From: Guilherme Datilio Ribeiro Date: Mon, 22 May 2023 11:34:46 -0300 Subject: [PATCH] Notification a11y color contrast (#13810) * chore(notification): prettier formatter * chore(A11y): fix a11y color contrast * chore(Icon): fix formatter * fix(Icon): fix icon color * fix(color): added new fill color to icon * fix(color): checking for first path to add color * chore(icon): removed unnecessary block --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../components/notification/_actionable-notification.scss | 5 ++++- .../scss/components/notification/_inline-notification.scss | 5 ++++- .../scss/components/notification/_toast-notification.scss | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/styles/scss/components/notification/_actionable-notification.scss b/packages/styles/scss/components/notification/_actionable-notification.scss index 383f30298cd3..a1d27d11bdbf 100644 --- a/packages/styles/scss/components/notification/_actionable-notification.scss +++ b/packages/styles/scss/components/notification/_actionable-notification.scss @@ -182,7 +182,10 @@ .#{$prefix}--actionable-notification--warning .#{$prefix}--toast-notification__icon - path[opacity='0'] { + path[opacity='0'], + .#{$prefix}--actionable-notification--warning-alt + .#{$prefix}--toast-notification__icon + path:first-of-type { fill: $black-100; opacity: 1; } diff --git a/packages/styles/scss/components/notification/_inline-notification.scss b/packages/styles/scss/components/notification/_inline-notification.scss index 97b17b44a378..9b0674036081 100644 --- a/packages/styles/scss/components/notification/_inline-notification.scss +++ b/packages/styles/scss/components/notification/_inline-notification.scss @@ -171,7 +171,10 @@ .#{$prefix}--inline-notification--warning .#{$prefix}--inline-notification__icon - path[opacity='0'] { + path[opacity='0'], + .#{$prefix}--inline-notification--warning-alt + .#{$prefix}--inline-notification__icon + path:first-of-type { fill: $black-100; opacity: 1; } diff --git a/packages/styles/scss/components/notification/_toast-notification.scss b/packages/styles/scss/components/notification/_toast-notification.scss index afd5115190d8..643ffbee45ea 100644 --- a/packages/styles/scss/components/notification/_toast-notification.scss +++ b/packages/styles/scss/components/notification/_toast-notification.scss @@ -131,7 +131,10 @@ .#{$prefix}--toast-notification--warning .#{$prefix}--toast-notification__icon - path[opacity='0'] { + path[opacity='0'], + .#{$prefix}--toast-notification--warning-alt + .#{$prefix}--toast-notification__icon + path:first-of-type { fill: $black-100; opacity: 1; }