Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

set the correct color for success, warning and errors toasts whenever there is a specific icon

Behrokh Satarnejad3a73b1c91c74
diff --git a/frontend/src/global_styles/content/_toast.sass b/frontend/src/global_styles/content/_toast.sass
index e9f1866a8b1..faa787bfc7e 100644
--- a/frontend/src/global_styles/content/_toast.sass
+++ b/frontend/src/global_styles/content/_toast.sass
@@ -47,6 +47,7 @@ $nm-color-warning-icon: #ef9e56
$nm-color-warning-background: #ffe6c6
$nm-color-info-icon: #155282
+$nm-color-error-icon: var(--content-form-danger-zone-bg-color)
$nm-color-border: #8fc0db
$nm-color-background: #e3f5ff
@@ -66,15 +67,12 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
%nm-icon-error
@include icon-mixin-error
- color: var(--content-form-danger-zone-bg-color)
%nm-icon-success
@include icon-mixin-checkmark
- color: $nm-color-success-icon
%nm-icon-warning
@include icon-mixin-warning
- color: $nm-color-warning-icon
%nm-icon-info
@include icon-mixin-info1
@@ -144,6 +142,9 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
&.-error
@extend %error-placeholder
+ &::before
+ color: $nm-color-error-icon
+
&:not(.toast-icon)::before
@include messages-icon
@extend %nm-icon-error
@@ -151,6 +152,9 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
&.-success
@extend %success-placeholder
+ &::before
+ color: $nm-color-success-icon
+
&:not(.toast-icon)::before
@include messages-icon
@extend %nm-icon-success
@@ -158,6 +162,9 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
&.-warning
@extend %warning-placeholder
+ &::before
+ color: $nm-color-warning-icon
+
&:not(.toast-icon)::before
@include messages-icon
@extend %nm-icon-warning
@@ -378,7 +385,7 @@ $nm-upload-box-padding: rem-calc(15) rem-calc(25)
&::before
@extend %nm-icon-error
- color: var(--content-form-danger-zone-bg-color)
+ color: $nm-color-error-icon
&.info
@extend %info-placeholder