Skip to content

Commit 46459ad

Browse files
authored
Merge pull request #5307 from relative-ci/fix-z-index
fix(ui): Update layer z-index for tooltip, hovercard and dialog
2 parents d74fd4e + c61ccb1 commit 46459ad

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

packages/ui/src/app/app.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
.header {
5454
position: fixed;
55-
z-index: var(--layer-high);
55+
z-index: calc(var(--layer-xhigh) + 2);
5656
left: 0;
5757
top: 0;
5858
right: 0;
@@ -62,6 +62,6 @@
6262
.tabsContainer {
6363
position: sticky;
6464
top: var(--header-height);
65-
z-index: calc(var(--layer-high) - 1);
65+
z-index: calc(var(--layer-xhigh) + 1);
6666
}
6767
}

packages/ui/src/components/metrics-treemap/metrics-treemap.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@
297297
}
298298

299299
.tooltip {
300-
z-index: var(--layer-xxhigh);
300+
z-index: var(--layer-high);
301301
padding: var(--space-xsmall) var(--space-small);
302302
border-radius: var(--radius-medium);
303303
width: calc(100vw - 2 * var(--space-small));

packages/ui/src/css/variables.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,10 @@
188188
--layer-xlow: 1;
189189
--layer-low: 10;
190190
--layer: 100;
191+
/** for components with overlays (tooltips, hovercards) */
191192
--layer-high: 1000;
192193
--layer-xhigh: 10000;
194+
/** for dialogs/modals */
193195
--layer-xxhigh: 100000;
194196

195197
--shadow-layer: 0 0 var(--space-xxxsmall) var(--color-shadow);

packages/ui/src/ui/dialog/dialog.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
display: flex;
33
align-items: center;
44
justify-content: center;
5-
z-index: 99999 !important;
5+
z-index: var(--layer-xxhigh);
66
}
77

88
.backdrop::before {
@@ -13,7 +13,6 @@
1313
width: 100%;
1414
height: 100%;
1515
background: var(--color-backdrop);
16-
filter:
1716
}
1817

1918
.dialog {
@@ -27,6 +26,7 @@
2726
padding: var(--dialog-padding);
2827
background: var(--color-background);
2928
box-shadow: 0 0 var(--space-medium) var(--color-shadow);
29+
z-index: var(--layer-xxhigh);
3030
}
3131

3232
.header {

packages/ui/src/ui/hover-card/hover-card.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818

1919
.hoverCard {
20-
z-index: var(--layer-xxhigh);
20+
z-index: var(--layer-high);
2121
padding: var(--space-small);
2222
border-radius: var(--radius-medium);
2323
width: calc(100vw - 2 * var(--space-small));

packages/ui/src/ui/tooltip/tooltip.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212

1313
.tooltip {
14-
z-index: var(--layer-xxhigh);
14+
z-index: var(--layer-high);
1515
padding: var(--space-xxxsmall) var(--space-xxsmall);
1616
border-radius: var(--radius-small);
1717
background: var(--color-text);

0 commit comments

Comments
 (0)