Files
sousa-gecko/testing/web-platform/tests/css/css-text/text-fit/shrink-dynamic.html
T
Kent Tamura aff3c96143 Bug 2045702 [wpt PR 60463] - css-text-5: Update specification URL in text-fit tests, a=testonly
Automatic update from web-platform-tests
css-text-5: Update specification URL in text-fit tests

Change-Id: Ie3c1ffa11d0ac25e04a7fe5790ca6f393efb54d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7904980
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1643098}

--

wpt-commits: eca981421a06cb6898eb31878579df4c4c16547a
wpt-pr: 60463
2026-06-09 18:48:25 +00:00

50 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://drafts.csswg.org/css-text-5/#text-fit-property">
<link rel="match" href="shrink-dynamic-ref.html">
<meta name="flags" content="ahem">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
.target {
white-space: pre;
width: 80px;
margin-bottom: 10px;
font: 20px/normal Ahem;
border: 1px solid blue;
}
.scale-c {
text-fit: shrink consistent;
}
.scale-pl {
text-fit: shrink per-line;
}
.scale-pla {
text-fit: shrink per-line-all;
}
</style>
<body>
<!-- none ==> shrink consistent -->
<div class="target">ABCDEFGH
ABCDEF</div>
<!-- shrink consistent ==> shrink per-line -->
<div class="target scale-c">ABCDEFGH
ABCDEF</div>
<!-- shrink per-line ==> shrink per-line-all -->
<div class="target scale-pl">ABCDEFGH
ABCDEF</div>
<script>
document.fonts.ready.then(() => {
const targets = document.querySelectorAll('.target');
targets[0].classList.add('scale-c');
targets[1].classList.replace('scale-c', 'scale-pl');
targets[2].classList.replace('scale-pl', 'scale-pla');
document.documentElement.classList.remove('reftest-wait');
});
</script>
</body>
</html>