Skip to content

Commit f163a3e

Browse files
[6.x] Override z-index of DatePicker inside modals (#13802)
1 parent 7477ee4 commit f163a3e

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

resources/css/elements/base.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,17 @@ code:not(pre *) {
150150
color: hsl(from var(--theme-color-ui-accent-bg) h s 90);
151151
background: hsl(from var(--theme-color-ui-accent-bg) h s 10 / 0.5);
152152
}
153+
}
154+
155+
/**
156+
Override the z-index of Reka's popper content wrapper under certain conditions.
157+
We can't use a direct descendant selector because the DatePicker is inside a Portal.
158+
*/
159+
body:has(
160+
[data-ui-modal-content],
161+
.stack,
162+
.live-preview,
163+
.code-fullscreen
164+
) [data-reka-popper-content-wrapper] {
165+
z-index: var(--z-index-portal)!important;
153166
}

resources/js/components/ui/Combobox/Combobox.vue

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -555,18 +555,6 @@ defineExpose({
555555
</template>
556556
557557
<style scoped>
558-
/* Override the hardcoded z-index of Reka's popper content wrapper under certain conditions. We can't use a direct descendant selector because the combobox is inside a portal, so instead we'll check to see if certain conditions are present. */
559-
body:has(
560-
/* A modal is present */
561-
[data-ui-modal-content],
562-
/* Fullscreen Code Editor fieldtype */
563-
.code-fullscreen,
564-
.stack,
565-
.live-preview
566-
) [data-reka-popper-content-wrapper] {
567-
z-index: var(--z-index-portal)!important;
568-
}
569-
570558
@supports(text-box: ex alphabetic) {
571559
[data-ui-badge] {
572560
padding-block: 0.65rem;

0 commit comments

Comments
 (0)