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

Fix combobox list z-index #1192

Merged
merged 3 commits into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `4.0.1`.
**Bug fixes**

- Fixed z-index issue of `EuiComboBoxOptionsList` especiall inside modals ([#1192](https://github.com/elastic/eui/pull/1192))

## [`4.0.1`](https://github.com/elastic/eui/tree/v4.0.1)

Expand Down
1 change: 0 additions & 1 deletion src/components/combo_box/_combo_box.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.euiComboBox {
@include euiFormControlSize(auto, $includeAlternates: true);
position: relative;
z-index: $euiZComboBox + 1; // Ensures the dropdown's shadow is hidden behind the input on top

/**
* 1. Allow pills to truncate their text with an ellipsis.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

&.euiComboBoxOptionsList--bottom { /* 4 */
@include euiBottomShadowMedium;
z-index: $euiZComboBox + 2; // Ensures the dropdown's is above the combo box's shadow
}
&.euiComboBoxOptionsList--top { /* 4 */
@include euiBottomShadowFlat;
box-shadow:
0 -2px 4px -1px rgba($euiShadowColor, .2),
0 0px 2px 0 rgba($euiShadowColor, .2);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/global_styling/variables/_z_index.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Z-Index

/*
Remember that z-index is relative to parent and based on the stacking context.
Remember that z-index is relative to parent and based on the stacking context.
z-indexs only compete against other z-indexs when they exist as children of
that shared parent.

Expand All @@ -28,8 +28,8 @@ $euiZLevel9: 9000;
$euiZContent: $euiZLevel0;
$euiZHeader: $euiZLevel1;
$euiZContentMenu: $euiZLevel2;
$euiZComboBox: $euiZContentMenu - 1;
$euiZNavigation: $euiZLevel4;
$euiZMask: $euiZLevel6;
$euiZModal: $euiZLevel8;
$euiZComboBox: $euiZModal + 1;
$euiZToastList: $euiZLevel9;