forked from mirrors/gecko-dev
Automatic update from web-platform-tests Implement 'rcap' font unit Spec: https://drafts.csswg.org/css-values/#rcap Bug: 1458357 Change-Id: I45b0195bfa92634daa7c8cc83966a014fc09f204 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652203 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1164617} -- wpt-commits: 059c5ec80fede147f6ebecd6ecf4d40c88983181 wpt-pr: 40817
37 lines
1,012 B
HTML
37 lines
1,012 B
HTML
<!DOCTYPE html>
|
|
<title>CSS Values and Units Test: rcap invalidation</title>
|
|
<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
|
|
<link rel="help" href="https://drafts.csswg.org/css-values/#font-relative-lengths">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<meta name="assert" content="test rex invalidation">
|
|
<style>
|
|
@import url("/fonts/ahem.css");
|
|
html {
|
|
font-family: 'Ahem';
|
|
font-size: 40px;
|
|
}
|
|
body {
|
|
font-family: monospace;
|
|
font-size: 20px;
|
|
}
|
|
div {
|
|
height: 10rcap;
|
|
width: 10rcap;
|
|
}
|
|
</style>
|
|
|
|
<html>
|
|
<body>
|
|
<div id="div"></div>
|
|
</body>
|
|
</html>
|
|
|
|
<script>
|
|
setup({ single_test: true });
|
|
let old_width = div.getBoundingClientRect().width;
|
|
document.documentElement.style.fontFamily = "sans-serif";
|
|
let new_width = div.getBoundingClientRect().width;
|
|
assert_not_equals(old_width, new_width, "expect the capital height of Ahem and sans-serif to be different");
|
|
done();
|
|
</script>
|