Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class=reftest-wait>
<title>Dynamically adding text-box-trim</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-edge: ex alphabetic;
}
.trim { text-box-trim: trim-both; }
</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>