Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-fonts/font-size-relative-across-calc-ff-bug-001.html - WPT Dashboard Interop Dashboard
<!doctype html>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<script type="text/javascript" src="/resources/testharness.js"></script>
<script type="text/javascript" src="/resources/testharnessreport.js"></script>
<div style="font-family: something-non-default; font-size: calc(-100em + 1px);"></div>
<div style="font-family: something-non-default; font-size: calc(1em - 100px);"></div>
<script>
test(function() {
for (const element of document.querySelectorAll("div"))
assert_equals(getComputedStyle(element).fontSize, "0px");
}, "font-size computation isn't messed up when mixing positive and negatives when font-family changes and the parent has a keyword font-size");
</script>