mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Previously, absolutely positioned elements jumped directly to their containing block's accumulated visual context, skipping effects (opacity, mix-blend-mode, isolation) from intermediate ancestors. Per CSS spec, these properties create stacking contexts that abspos elements cannot escape — they only escape scroll containers and overflow clips.
37 lines
692 B
HTML
37 lines
692 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<style>
|
|
.relpos {
|
|
position: relative;
|
|
width: 200px;
|
|
height: 200px;
|
|
overflow: hidden;
|
|
}
|
|
.outer-opacity {
|
|
opacity: 0.5;
|
|
}
|
|
.inner-opacity {
|
|
opacity: 0.3;
|
|
}
|
|
.abspos {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100px;
|
|
height: 100px;
|
|
background: black;
|
|
}
|
|
</style>
|
|
<div class="relpos">
|
|
<div class="outer-opacity">
|
|
<div class="inner-opacity">
|
|
<div class="abspos"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
test(() => {
|
|
println(internals.dumpDisplayList());
|
|
});
|
|
</script>
|