-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Stacking issue with navbar and control groups #700
Comments
cc @cmslewis |
Look into |
Also look into:
|
as easy as we-already-have-this-mixin |
how does this help? don't we just have to put the button group example and navbar in separate stacking contexts? edit: yeah gilad has the right idea in #1015 |
Global z-indices are always safe and explicit. The bigger the range, the more elements you can play with in your stack (see control groups). I'm personally not a fan of the hacky |
I'm pretty opposed to this. I think it's a backwards step in the wrong direction. I was always confused / concerned in the bootstrap or foundation CSS world where there was a global z-index scale to follow. Why not scope stacking concerns to local components if we can? |
Well, I'm not sure what's confusing about z-indices since it's a single unified scale across your system, really can't get easier. For instance: let's say we have that control group stack with specific z-indices; we also have a navbar that's conceptually always on top of everything, so we give it a greater z-index; now put your control group in the navbar and they will now be on top of the navbar. Done deal. As I said previously, I'm cool with Gilad's fix, but I'd be curious to hear your take on these two things:
|
Multiple We've experienced a number of problems around the global nature of CSS in building applications which feature multiple versions of Blueprint on the same page; I don't want to add z-indices to that list of concerns. |
@llorca i hate to say it, but this is not a battle you want to fight. the global-ness of stacking context and z-index isolation is our primary defense against the global-ness of it's important to note that by the way, that MDN article linked above is the holy grail for stacking context questions. i re-read it monthly and there's been a link to it in our docs since the very early days. |
I see that this is closed, and I'm probably too late, but I'd like to put in a vote against local stacking contexts, especially in this situation. Since 1.16 was released, I've been trying to hunt down a bug where a react-select dropdown inside a control group was showing up below elements further down the page. Yes, they could attach the dropdown menu to the document body like you do with the Popover, but since creating local stacking contexts isn't standard, I don't think most libraries are likely to do that. On the plus side, I learned about stacking contexts, so at least that's something. |
Bug report
Actual behavior
Expected behavior
The text was updated successfully, but these errors were encountered: