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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: parsing grid-template with invalid values</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#propdef-grid-template">
<meta name="assert" content="grid-template supports only the grammar `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?`.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("grid-template", 'auto');
test_invalid_value("grid-template", 'none none');
test_invalid_value("grid-template", 'none []');
test_invalid_value("grid-template", '10px');
test_invalid_value("grid-template", '20%');
test_invalid_value("grid-template", '5fr');
test_invalid_value("grid-template", '[a]');
test_invalid_value("grid-template", '[a] 10px');
test_invalid_value("grid-template", '[a] 10px []');
test_invalid_value("grid-template", '[]');
test_invalid_value("grid-template", '10px "a"');
test_invalid_value("grid-template", '[] 10px "a"');
test_invalid_value("grid-template", '10px [] "a"');
test_invalid_value("grid-template", '[] [] "a"');
test_invalid_value("grid-template", '"a" none');
test_invalid_value("grid-template", '"a" 10px 10px');
test_invalid_value("grid-template", '"a" [a] 10px');
test_invalid_value("grid-template", '"a" [a] 10px [a]');
test_invalid_value("grid-template", '"a" [a] [a] 10px');
test_invalid_value("grid-template", '"a" 10px [a] [a]');
test_invalid_value("grid-template", '"a" [a] [a]');
test_invalid_value("grid-template", '[a] "a" [a] [a]');
test_invalid_value("grid-template", '"a" "a" [a] [a]');
test_invalid_value("grid-template", '"a" [a] [a] / none');
test_invalid_value("grid-template", '"a" "a" [a] [a] / none');
test_invalid_value("grid-template", 'none / "a"');
test_invalid_value("grid-template", '"a" / none');
test_invalid_value("grid-template", 'none / [] "a"');
test_invalid_value("grid-template", 'none / "a" []');
test_invalid_value("grid-template", 'none / "a" [] 10px');
// FIXME: add more values to test full syntax
</script>
</body>
</html>
|