Files
ladybird/Tests/LibWeb/Text/input/wpt-import/css/css-fonts/font-weight-sign-function.html
Callum Law 3b6d17cd42 LibWeb: Import a bunch of CSS font related tests
Done in distinct commit to see progress over multiple following commits
2025-09-19 10:06:33 +01:00

18 lines
687 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Fonts test: font-weight with CSS sign() function</title>
<link rel="help" href="https://drafts.csswg.org/css-fonts/#font-weight-prop">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../css/support/computed-testcommon.js"></script>
<style>
:root {
font-size: 16px;
}
</style>
<div id="target"></div>
<script>
test_computed_value("font-weight", "calc(sign(1rem - 1px) * 10)", "10");
test_computed_value("font-weight", "calc(sign(1rem - 1px) * -10000)", "1");
test_computed_value("font-weight", "calc(sign(1rem - 1px) * 10000)", "1000");
</script>