spectrum-web-components
spectrum-web-components copied to clipboard
Overlay: allow changing z-index
Expected Behaviour
Overlay z-index is changeable via a css custom property
Actual Behaviour
It's hard coded to 1000
Could you share a little more about the use case here?
Is the goal to just make it universally different?
Or do you actually have a context where some overlays should be of different z-indexes
? In which case, I'm not sure a CSS Custom Property is the sort of API that would make such an API each to consume...
This is something to investigate as we refactor the overlay API, but without an investigation or a repro, it can't be an actionable item at this point.
We'll be surfacing --swc-overlay-z-index-base
as a custom property to outline the floor of the Overlay stack when AND ONLY WHEN the stack is being delivered in a fallback context. When delivered with the popover
API, the popover stack will place content on the Top Layer of the browser, which manages content via a strict stack.