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