summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-fonts/font-size-relative-across-calc-ff-bug-001.html
blob: 167de8888725ca55090ac80cda43cddb299b7c7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!doctype html>
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-size-prop">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1572738">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1572451">
<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>