Files
sousa-gecko/testing/web-platform/tests/css/css-anchor-position/position-area-inline-container.html
T
Daniel Holbert adb08a5475 Bug 2006558 [wpt PR 56802] - Add line-height to position-area-inline-container.html and its -abs variant, a=testonly
Automatic update from web-platform-tests
Add line-height to position-area-inline-container.html and its -abs variant. (#56802)

This test specified the Ahem font but forgot to include a line-height, which
makes it inadvertently depend on `line-height:normal` behavior (which varies
between browsers).

Tests with Ahem should always specify a line-height, per guidelines at
https://web-platform-tests.org/writing-tests/ahem.html
("An explicit (i.e., not normal) line-height should also always be used")

This commit adds `line-height:1` to align with that guideline.

Fixes https://github.com/web-platform-tests/interop/issues/1237
--

wpt-commits: 18954da801c02004f51ae7f780fbcf4d32bd6a09
wpt-pr: 56802
2025-12-20 14:42:52 +00:00

42 lines
1.2 KiB
HTML

<!DOCTYPE html>
<title>CSS Anchor Positioning: position-area positioning with inline container</title>
<link rel="help" href="https://drafts.csswg.org/css-anchor-position/#position-area">
<link rel="match" href="position-area-inline-container-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style>
#in-flow {
font-family: Ahem;
font-size: 100px;
line-height: 1;
color: orange;
}
#inline-container {
position: relative;
}
#anchor {
position: absolute;
top: 25px;
left: 100px;
width: 200px;
height: 50px;
anchor-name: --anchor;
background-color: cyan;
}
.anchored {
position: absolute;
align-self: stretch;
justify-self: stretch;
position-anchor: --anchor;
background-color: blue;
}
#top-left { position-area: top left; }
#top-right { position-area: top right; }
#bottom-left { position-area: bottom left; }
#bottom-right { position-area: bottom right; }
</style>
<div id="in-flow">
<br>
<br>
&nbsp;&nbsp;<span id="inline-container">XXXX<span id="anchor"></span><div id="top-left" class="anchored"></div><div id="top-right" class="anchored"></div><div id="bottom-left" class="anchored"></div><div id="bottom-right" class="anchored"></div></span>
</div>