summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-values/viewport-units-parsing.html
blob: 4373b2a9f0844456c00904a3d90e159c78362c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Values: parsing width with valid viewport units</title>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#viewport-relative-lengths">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
const prefixes = ["", "s", "l", "d"];
const suffixes = ["vw", "vh", "vi", "vb", "vmin", "vmax"];
const units = [];

for (const prefix of prefixes) {
  for (const suffix of suffixes) {
    units.push(prefix + suffix);
  }
}

for (const unit of units) {
  test_valid_value("width", "1" + unit);
}
</script>
</body>
</html>