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-trim-dynamic-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<title>Dynamically adding text-box-edge</title>
<link rel="match" href="text-box-trim-dynamic-001-ref.html">
<style>
@import "support/MetricsTestFont.css";
.spacer {
background: lightgray;
block-size: 100px;
}
.target {
font: 100px/2 MetricsTestFont;
text-box-trim: trim-both;
}
.trim { text-box-edge: ex alphabetic; }
</style>
<div class="spacer"></div>
<div class="target">ApÉx</div>
<div class="spacer"></div>
<script>
document.body.offsetTop;
for (const target of document.getElementsByClassName('target')) {
target.classList.add('trim');
}
document.documentElement.className = "";
</script>