summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/parsing/grid-column-invalid.html
blob: d1f4dce1723e598ce5012deb8064e607c4857b0b (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-grid-2/#placement-shorthands">
<meta name="assert" content="Tests invalid values for grid-column"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_invalid_value("grid-column", "4 5");
test_invalid_value("grid-column", "4 /");
test_invalid_value("grid-column", "5 5");
test_invalid_value("grid-column", "5 / /");

test_invalid_value("grid-column", "0 / 5");
test_invalid_value("grid-column", "6 / 0");
test_invalid_value("grid-column", "0");

test_invalid_value("grid-column", "span");
test_invalid_value("grid-column", "span / span");

test_invalid_value("grid-column", "span span / span span");

test_invalid_value("grid-column", "5 5 / span 2");
test_invalid_value("grid-column", "5 first last / span 2");
test_invalid_value("grid-column", "5 / first last 2");
test_invalid_value("grid-column", "first last / span 2");
test_invalid_value("grid-column", "5 / first last");
test_invalid_value("grid-column", "5 5 span / 2", "span 4 4 / 3");
test_invalid_value("grid-column", "span 3 5 / 1", "5 span 4 / 3");
test_invalid_value("grid-column", "span last first / 1", "span first last / 3");
test_invalid_value("grid-column", "2 / span last first", "3 / span first last");
test_invalid_value("grid-column", "span 1 last first / 1", "span first last 7 / 3");
test_invalid_value("grid-column", "2 / span last 3 first", "3 / span first 5 last");
test_invalid_value("grid-column", "1 span 2 first / 1", "1 span last 7 / 3");
test_invalid_value("grid-column", "2 / 3 span 3 first", "3 / 5 span first 5");

test_invalid_value("grid-column", "span -1 / -2");
test_invalid_value("grid-column", "-1 / -2 span");
test_invalid_value("grid-column", "0 span / 0");
test_invalid_value("grid-column", "0 / span 0");
test_invalid_value("grid-column", "span -3 'first' / 3 last");

test_invalid_value("grid-column", "first span 1 / last");
test_invalid_value("grid-column", "3 first / 2 span last");
test_invalid_value("grid-column", "3 / 1 span 2");
</script>
</body>
</html>