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

Positioning Elements Above Popover #1134

Open
quick007 opened this issue Dec 30, 2024 · 4 comments
Open

Positioning Elements Above Popover #1134

quick007 opened this issue Dec 30, 2024 · 4 comments

Comments

@quick007
Copy link

quick007 commented Dec 30, 2024

I've noticed an issue with popovers that hamper what could be an incredible component. I'd be happy to contribute this to the spec via a pr, but I thought the best way to proceed would be to start with an issue.

Issue: Z-Height

There is some content that needs to be above all other content, no matter the situation (i.e. notifications). Traditionally, this was solved by adding a copious amount of 9s to the z-index property (this is a joke), but popovers supersede all other content. This choice makes sense of course, but there should be a CSS property that should allow content to appear above popovers.

@keithamus
Copy link
Collaborator

I think the first issue is solved by css anchor positioning.

The second issue is mostly addressed with popover=hint.

@lukewarlow
Copy link
Collaborator

As Keith says issue 1 is addressed by anchor positioning.

Issue 2 one expample I've seen is a sticky header bar that people want to be on top. I believe this can be addressed by hiding popovers when it's anchor is obscured. Which I believe is already possible, it might need some refining to ensure it does account for this scenario though.

@quick007 quick007 changed the title Popover Improvements Positioning Elements Above Popover Jan 24, 2025
@quick007
Copy link
Author

I was unaware of the anchor style, thanks for letting me know!

In terms of z indexing, hint isn't a real solution as I would like to keep the rest of the popover features that come with auto

@lukewarlow Can you explain a bit more about how that might work? In my case, notifications are wholly unrelated to the current popover and don't know its ID, but must be visible above it.

@lukewarlow
Copy link
Collaborator

hint and auto are relatively similar, they both have light dismiss and close on ESC. The difference is mostly about which other popovers they close.

I'm assuming you don't want a notification to close an open menu popover for example? But you probably do want it to close other notifications? In which case I think hint probably is what you want?

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

No branches or pull requests

3 participants