Replies: 1 comment
-
Hey @adatti, Firstly, if you use the If for whatever reason this isn't good for you and you'd rather explicitly control The Hope this helps 🙂 ✌️ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I don't understand why I'm able to set
z-index
on certain components (likeDialog
) , but not on most others (DropDownMenu
,Select
, etc.).For instance, imagine that I need to make sure the
z-index
on all my Dialogs is set to a specific value (e.g. setting it to 1000 on both the DialogContent and its DialogOverlay to make sure that the Dialog covers the Overlay, while the Overlay covers the fixed navbar at the top, whosez-index
is 999).Now imagine that I have a DropDownMenu (
z-index
not customizable) in which one of the items triggers the appearance of a Dialog. So far, so good: when the Dialog appears, the DropDownMenu is behind the Dialog and Overlay, so things look fine.But now imagine that inside of the DialogContent I also have a Select (
z-index
not customizable). The Select menu won't be visible, because it is hidden behind theDialog
andOverlay
.The only way to override
z-index
on components like Select or DropDownMenu is by selecting with[data-radix-popper-content-wrapper]
in CSS, but that's not workable when you have multiple such components in the DOM and want them to follow a specific visual hierarchy.I suppose there's a technical reason why this isn't easy to do, but I feel like it limits the consumer's ability to style the primitives.
Beta Was this translation helpful? Give feedback.
All reactions