diff --git a/CHANGELOG.md b/CHANGELOG.md
index 50ddae3ec7f..8e69674433e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@
- Fixed `EuiRange` container expansion due to negative margin value ([#4815](https://github.com/elastic/eui/pull/4815))
- Fixed `EuiRange` ticks position to better align with thumbs ([#4815](https://github.com/elastic/eui/pull/4815))
+- Fixed `EuiComboBox` disabled pills and text contrast ([#4901](https://github.com/elastic/eui/issues/4901))
- Fixed `EuiDataGrid` footer and header rows jumps in Firefox ([#4869](https://github.com/elastic/eui/issues/4869))
- Fixed shaded colors of `EuiButtonIcon` ([#4874](https://github.com/elastic/eui/pull/4874))
- Fixed `pageHeader` display in `EuiPageTemplate` when template is `empty` or `default` ([#4905](https://github.com/elastic/eui/pull/4905))
diff --git a/src-docs/src/views/combo_box/colors.js b/src-docs/src/views/combo_box/colors.js
index 24cc0df2c11..5f81ecf52b0 100644
--- a/src-docs/src/views/combo_box/colors.js
+++ b/src-docs/src/views/combo_box/colors.js
@@ -2,6 +2,7 @@ import React, { useState } from 'react';
import { EuiComboBox } from '../../../../src/components';
import { euiPaletteColorBlindBehindText } from '../../../../src/services';
+import { DisplayToggles } from '../form_controls/display_toggles';
const visColorsBehindText = euiPaletteColorBlindBehindText();
const optionsStatic = [
@@ -86,12 +87,16 @@ export default () => {
};
return (
-
+ /* DisplayToggles wrapper for Docs only */
+
+
+
);
};
diff --git a/src-docs/src/views/combo_box/combo_box.js b/src-docs/src/views/combo_box/combo_box.js
index ab31df4436b..8c2b84959ee 100644
--- a/src-docs/src/views/combo_box/combo_box.js
+++ b/src-docs/src/views/combo_box/combo_box.js
@@ -72,7 +72,7 @@ export default () => {
return (
/* DisplayToggles wrapper for Docs only */
-
+
{
canDisabled={false}
canReadOnly={false}
canLoading={false}
- canPrepend
+ canPrepend={false}
+ canIsDisabled
canAppend>
{
options={options}
selectedOptions={selectedOptions}
onChange={onChange}
+ isDisabled
/>
);
diff --git a/src/components/combo_box/_combo_box.scss b/src/components/combo_box/_combo_box.scss
index ae15f22da35..0dcac45c65d 100644
--- a/src/components/combo_box/_combo_box.scss
+++ b/src/components/combo_box/_combo_box.scss
@@ -107,7 +107,19 @@
&.euiComboBox-isDisabled {
.euiComboBox__inputWrap {
+ // sass-lint:disable-block no-vendor-prefixes
@include euiFormControlDisabledStyle;
+ -webkit-text-fill-color: unset; // overrides $euiFormControlDisabledColor because the color doesn't work with multiple background colors
+ }
+
+ .euiComboBoxPlaceholder,
+ .euiComboBoxPill--plainText {
+ @include euiFormControlDisabledTextStyle;
+ }
+
+ // overrides the `cursor: text;` that displays on hover for combo boxes that allow multiple pills
+ .euiComboBox__inputWrap:not(.euiComboBox__inputWrap--noWrap):hover {
+ cursor: not-allowed;
}
}
diff --git a/src/global_styling/mixins/_form.scss b/src/global_styling/mixins/_form.scss
index b46c6cbaf00..69536f33c5f 100644
--- a/src/global_styling/mixins/_form.scss
+++ b/src/global_styling/mixins/_form.scss
@@ -194,11 +194,15 @@
background-size: 100%;
}
-@mixin euiFormControlDisabledStyle {
+@mixin euiFormControlDisabledTextStyle {
// sass-lint:disable-block no-vendor-prefixes
- cursor: not-allowed;
color: $euiFormControlDisabledColor;
-webkit-text-fill-color: $euiFormControlDisabledColor; // Required for Safari
+}
+
+@mixin euiFormControlDisabledStyle {
+ @include euiFormControlDisabledTextStyle;
+ cursor: not-allowed;
background: $euiFormBackgroundDisabledColor;
box-shadow: inset 0 0 0 1px $euiFormBorderDisabledColor;