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

[CSS-in-JS] Remove euiCallOutColor Sass mixin #6201

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Sep 1, 2022

Summary

Per #1469

Changes to be made in Kibana:

src/core/public/styles/_ace_overrides.scss
Cannot use EuiCallout because we do not have access to the component.

@@ -104,8 +104,9 @@
     }
 
     .ace_invalid {
-      background-color: euiCallOutColor('danger', 'background');
-      color: euiCallOutColor('danger', 'foreground');
+      $aceInvalidBg: tintOrShade($euiColorDanger, 90%, 70%);
+      background-color: $aceInvalidBg;
+      color: shadeOrTint(makeHighContrastColor($euiColorDanger, $aceInvalidBg), 0, 20%);
     }

x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/_step_progress.scss
Cannot use EuiCallout because it's not actually a callout, just an icon.

@@ -15,10 +15,10 @@
 }
 
 $stepStatusToCallOutColor: (
-  failed: 'danger',
-  complete: 'success',
-  paused: 'warning',
-  cancelled: 'warning',
+  failed: $euiColorDanger,
+  complete: $euiColorSuccess,
+  paused: $euiColorWarning,
+  cancelled: $euiColorWarning,
 );
 
 .upgStepProgress__status--circle {
@@ -28,8 +28,9 @@ $stepStatusToCallOutColor: (
 
   @each $status, $callOutColor in $stepStatusToCallOutColor {
     &-#{$status} {
-      color: euiCallOutColor($callOutColor, 'foreground');
-      background-color: euiCallOutColor($callOutColor, 'background');
+      $statusBg: tintOrShade($callOutColor, 90%, 70%);
+      color: shadeOrTint(makeHighContrastColor($callOutColor, $statusBg), 0, 20%);
+      background-color: $statusBg;
     }
   }
 }

Checklist

  • Checked for breaking changes and labeled appropriately
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6201/

@thompsongl thompsongl marked this pull request as ready for review September 1, 2022 20:36
Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for looking at the Kibana changes that need to be made ahead of time!

@thompsongl thompsongl merged commit 42a0235 into elastic:main Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants