Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-inline/text-box-trim/text-box-on-non-root-inline-box.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>text-box on non-root inline box does not affect layout bounds only the box's size.</title>
<link rel="stylesheet" href="/fonts/baseline-diagnostic/baseline-diagnostic-font.css">
<meta charset="utf-8">
<style>
.test {
font: 100px/1 BaselineDiagnosticAlphabeticZero;
position: relative;
white-space: nowrap;
}
.aqua {
background-color: aqua;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<div class="test">
<span class=aqua style="text-box: ex alphabetic;" data-offset-y=55 data-expected-height=25>█BxIF</span>
<span class=aqua style="text-box: trim-start cap alphabetic;" data-offset-y=25 data-expected-height=75>█BxIF</span>
<span class=aqua style="text-box: trim-end text alphabetic;" data-offset-y=0 data-expected-height=80>█BxIF</span>
</div>
<div class="test aqua" data-expected-height=150>
<span style="font-size: 150px; text-box: ex alphabetic;">█BxIF</span>
</div>
<script>
document.fonts.ready.then(() => checkLayout('.aqua'));
</script>
</body>