listbox of sl-select renders behind other elements with container-type set on parent #2240
Replies: 3 comments
-
Please try using the |
Beta Was this translation helpful? Give feedback.
-
So the problem you're hitting is the CSS containers create a new "stacking context", as such, its causing the issue you're seeing. The "fix" seems to be adding https://codepen.io/paramagicdev/pen/RwzmOYY Here's like a minimal reproduction of how |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answers. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Having a sl-select in a parent element with
container-type
set to something different thennormal
leads to the listbox of the select no longer rendering over other elements (which are not part of thecontainer-type
parent).This seems to be a problem with the sl-popup. Because this behavior can also be achieved with the popup ( which is also used in the select)
To Reproduce
Screenshots
Browser / OS
Additional information
I'm not sure, if this is even fixable in the component itself, or if it is something, which the user of the sl-select has to be taken care of.
The
container-type
is creating a new stacking context. If addingposition: relative
andz-index:1
(or some higher z-index, that the other elements outside of thecontainer-type
element has), the rendering is done correctly again.Beta Was this translation helpful? Give feedback.
All reactions