Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-anchor-position/anchor-position-inline-007.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Anchor Positioning Test: Resolve anchor() in inline containing block when the inline is IB-split by a block wrapping the anchor</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="match" href="anchor-position-inline-007-ref.html">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
.rel {
position: relative;
background: lightgray;
line-height: 2;
}
.anchor {
anchor-name: --a;
color: red;
}
.target {
position: absolute;
left: anchor(--a left);
right: anchor(--a right);
top: anchor(--a top);
bottom: anchor(--a bottom);
background: green;
}
</style>
<div style="font: 20px/1 Ahem; width: 11em">
<div>
Lorem
<span class="rel">
ipsum <div><span class="anchor">dolor</span></div> sit
<span class="target"></span>
</span>
amet.
</div>
</div>