question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parent stacking context not working?

See original GitHub issue

E.g. https://output.jsbin.com/zovecuzoce/1

<div class="absolute">
    <div class="relative">
        <div class="child">foo</div>
    </div>
</div>
.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

When selecting .relative:

image

Expected parent stacking context: .absolute

When selecting .child:

image

Expected parent stacking context: .relative

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
OliverJAshcommented, Jun 5, 2020

A made a separate Chrome extension for this: https://twitter.com/OliverJAsh/status/1268821858842968065

0reactions
gwwarcommented, Nov 2, 2021

Glad you find a solution! I’ll close this one out, but will document the current feedback in #20.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to deal with stacking context problem [duplicate]
To put the child behind its parent, let its z-index work relative to the document (or some other common ancestor that's further up...
Read more >
4 reasons your z-index isn't working (and how to fix it)
Solution: Move the modal outside of the content parent, and into the main stacking context of the page. The corrected markup would then...
Read more >
The stacking context - CSS: Cascading Style Sheets | MDN
The stacking context is a three-dimensional conceptualization of HTML elements along an imaginary z-axis relative to the user, ...
Read more >
Fixes for CSS z-index not working - Weekend Projects
Check properties that enable stacking context is used, such as opacity, mix-blend-mode, will-change; Verify that the parent element is not restricting the child ......
Read more >
Z-index and stacking contexts - web.dev
In normal flow, if you set a specific value for z-index and it isn't working, you need to set the element's position value...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found