blob: b8e336b16f151082a2ab3d43660a77d86e50d299 [file] [edit]
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1924786">
<link rel="help" href="https://drafts.csswg.org/css-position/#original-cb">
<link rel="match" href="grid-position-area-basic-ref.html">
<style>
#grid {
display: grid;
grid: 150px 100px / 200px 300px;
padding: 20px;
position: relative;
border: 1px solid;
}
#positioned {
position: absolute;
background: magenta;
grid-column: 1 / 2;
grid-row: 1 / 2;
position-anchor: --foo;
position-area: top right;
/* FIXME: Shouldn't be needed */
width: fit-content;
height: fit-content;
}
#static {
background: pink;
grid-column: 1 / 2;
grid-row: 1 / 2;
}
#anchor {
background: lime;
grid-column: 2 / 3;
grid-row: 2 / 3;
anchor-name: --foo;
}
.abs-cb {
width: 600px;
height: 600px;
position: relative;
}
</style>
<div id="grid">
<div id="anchor"></div>
<div id="positioned">Anchored</div>
<div id="static"></div>
</div>