mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
Automatic update from web-platform-tests Don't compare px rounded font sizes. Sub-pixel size changes to the root element font-size did not update rem unit lengths if the px rounded root element font-size did not change. Bug: 928371 Change-Id: Id9fab5ac4ab5a126b39a0d2bd7373d01802d29fe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083175 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#746344} -- wpt-commits: 718d3e45fd1c4a91ac3d02c9d61da0315cc55f70 wpt-pr: 22036
21 lines
719 B
HTML
21 lines
719 B
HTML
<!doctype html>
|
|
<html style="font-size:16px">
|
|
<head>
|
|
<title>CSS Values and Units Test: rem subpixel change</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-values/#rem">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
<body>
|
|
<div style="font-size:16px">
|
|
<div id="remElement" style="width: 10rem"></div>
|
|
</div>
|
|
<script>
|
|
test(() => {
|
|
assert_equals(getComputedStyle(remElement).width, "160px");
|
|
document.documentElement.style.fontSize = "16.1px";
|
|
assert_equals(getComputedStyle(remElement).width, "161px");
|
|
}, "Check that a 0.1px change in root font-size affect rem units.");
|
|
</script>
|
|
<body>
|
|
</html>
|