Has anyone been able to solve Stacking Context issues between container queries and z-index?

The screen shot shows the issue Container Queries has with z-index. If I turn off container queries, the select dropdown is above. I suppose I could use the native select, but..... 😦 I've been able to use RGBA to handle opacity stacking context issue, but I can't find a work around with z-index.
No description
10 Replies
dlongodev
dlongodevOP4mo ago
here's the same without container queries
No description
dlongodev
dlongodevOP4mo ago
By the way, for some context, I'm using bootstrap in Svelte as well as Svelecte library for the styled dropdown
Lamer of Sweden
Lamer of Sweden4mo ago
Not sure but someone, somewhere mentioned isolation. Could that work? https://developer.mozilla.org/en-US/docs/Web/CSS/isolation
MDN Web Docs
isolation - CSS: Cascading Style Sheets | MDN
The isolation CSS property determines whether an element must create a new stacking context.
ἔρως
ἔρως4mo ago
where can we see this in action?
dlongodev
dlongodevOP4mo ago
I'll try to create a codepen to show you guys how z-index and opacity misbehaves with container queries Here it is friends, this is so sad! https://codepen.io/Daniele-Longo/pen/ExBZdYp
ἔρως
ἔρως4mo ago
you sure this is complete?
No description
dlongodev
dlongodevOP4mo ago
Yea, I missed some closing divs but it's there now Seems I found a hack in case anyone wants to know
dlongodev
dlongodevOP4mo ago
No description
dlongodev
dlongodevOP4mo ago
You have to add the position relative and stack the z-index the CQ at the bottom has to have the lowest z-index Not very dynamic @Kevin would you be so kind to explain this, or have you encountered this before?
Jochem
Jochem4mo ago
@dlongodev please don't ping people to draw them into your posts, even if they've helped you before
Want results from more Discord servers?
Add your server