trisquel-icecat/icecat/testing/web-platform/tests/css/css-ruby/ruby-overhang-no-overlap.html
2025-10-06 02:35:48 -06:00

26 lines
711 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<link rel="help" href="https://crbug.com/329776386">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
p {
font-size: 10px;
}
ruby {
font-size: 40px;
}
</style>
<p>
<ruby><rt>ān</rt></ruby><ruby><rt>zhuāng</rt></ruby><ruby><rt>chuāng</rt></ruby><ruby><rt></rt></ruby>
</p>
<script>
test(() => {
const rts = document.querySelectorAll('rt');
const bounds2 = rts[1].getBoundingClientRect();
const bounds3 = rts[2].getBoundingClientRect();
assert_less_than_equal(Math.round(bounds2.right), Math.round(bounds3.left));
}, "Annotations should not be overlapped");
</script>