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

Select: allow setting a z-index of the content popover #507

Closed
wants to merge 1 commit into from

Conversation

hoorayimhelping
Copy link
Collaborator

I have a Select in a sticky header. I need the sticky header's z-index to be > 0. Doing this causes the items in the select list to be under the header:

Screenshot 2024-12-17 at 3 11 47 PM

Here is how it looks when I can set the z-index to be higher than the sticky header (i.e. how it should look):

Screenshot 2024-12-17 at 3 11 56 PM

Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
click-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 8:15pm

@serdec
Copy link
Collaborator

serdec commented Dec 18, 2024

I’m not too much in favour of z-indexes as they will cause the z-index war later on.

What if we try creating a stacking context around the header (e.g isolation: isolate on the parent container)
I would leave the z-index as last resort wdyt?

@vineethasok
Copy link
Collaborator

@hoorayimhelping This is not needed as we can add it in a different way by using flex direction of column reverse and maybe using the container in the radix popover
Perhaps we can have a chat on this

@hoorayimhelping
Copy link
Collaborator Author

What if we try creating a stacking context around the header (e.g isolation: isolate on the parent container)
I would leave the z-index as last resort wdyt?

@serdec I agree this should be a last resort. I tried a few different things to create a new stacking context and couldn't get any of the workarounds to work. I'll try some other combinations of them.

This is not needed as we can add it in a different way by using flex direction of column reverse and maybe using the container in the radix popover

@vineethasok okay, I'll try that first. If I can't get it working, I'll send you a message

@hoorayimhelping
Copy link
Collaborator Author

Vineeth helped me to solve this without needing to resort to setting z-index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants