chromium/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-dynamic-002.html

<!DOCTYPE html>
<html class=reftest-wait>
<title>Dynamically adding text-box-edge</title>
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-edge">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-trim">
<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>