A position: fixed box with z-index: auto paints above later positioned siblings
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 47/100
Research direction
Start by reading the painting and stacking-order code, then inspect how fixed descendants with z-index: auto are grouped relative to positioned ancestors. The issue names no source files or tests, so locate the relevant rendering entry points and existing coverage. Done when the reproduction paints the blue box above the red fixed layer, matching the stated browser behavior.
Written by the indexing model from the issue text.
Description
A position: fixed box with z-index: auto inside a positioned ancestor is painted after (above) that ancestor's later positioned descendants. By CSS 2.1 Appendix E, step 8, positioned descendants with z-index: auto paint in tree order, so the fixed box should be painted first, underneath.
<body style="margin:0">
<div style="position:relative; height:200px">
<div style="position:fixed; inset:0; background:rgba(255,0,0,.5)"></div>
<div style="position:relative; margin:20px; height:100px; background:blue"></div>
</div>
</body>
Expected (Chrome, Firefox, WebKit): the blue box is drawn on top of the translucent red layer.
Actual: the red layer is drawn over the blue box.
The fixed box is hoisted to its containing block (the viewport) and painted in the root's positioned layer after the whole relative ancestor. That ancestor paints its own positioned descendants as one unit, so the fixed box ends up above all of them. #1421 fixes the z-indexed case. This is the z-index: auto one, which is common for a full-screen decorative backdrop placed first in an app shell.
Workaround: position: absolute; inset: 0 when the ancestor fills the viewport.
- Dominant language
- Rust
- Stars
- 4.5k
- Forks
- 281
- Avg merge
- 6h 6m
- Merged PRs (30d)
- 184
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DioxusLabs/blitz
-
<input type="number"> misses text-entry leaf sizing in layoutPossibly taken @GoCoder7 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
DioxusLabs/blitz#1675 ·
Maintainers usually reply within 1 day
-
Copy, cut and paste shortcuts don't work with Caps Lock or ShiftPossibly taken @nicoburns claimed this 8 days ago. OpenA-Events C-Bug
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DioxusLabs/blitz#1507 ·
Maintainers usually reply within 1 day
-
Copy and cut work in password inputsPossibly taken @nicoburns claimed this 8 days ago. OpenA-Events A-Forms C-Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DioxusLabs/blitz#1501 ·
Maintainers usually reply within 1 day
-
Panic on live viewport resize when unstyled elements exist in display: none subtreePossibly taken @GoCoder7 claimed this 9 days ago. OpenA-Layout A-Style C-Bug I-Crash
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DioxusLabs/blitz#1488 ·
Maintainers usually reply within 1 day
-
Right-button drag starts a text-selection drag and suppresses `contextmenu`Possibly taken @staging-devin-ai-integration claimed this 24 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
DioxusLabs/blitz#1184 ·
Maintainers usually reply within 1 day
All issues in DioxusLabs/blitz
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pbakaus/impeccable#1601 ·
Maintainers usually reply within 1 day
-
RDF/XML writer: a blank node in two lists is left out of the secondPossibly taken @mrnolte claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
phillord/horned-owl#368 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mongodb/kingfisher#588 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug rust
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days