summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/parsing/grid-area-invalid.html
blob: c7d35ebf09380a743bc2a6d002d24b7557e063b4 (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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Layout Test: parsing grid-area with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-area">
<meta name="assert" content="grid-area supports only the grammar '<grid-line> [ / <grid-line> ]{0,3}'.">
<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-area", "'string'");
test_invalid_value("grid-row", "1.0");
test_invalid_value("grid-column", "1 2");
test_invalid_value("grid-row-start", "+-3");
test_invalid_value("grid-column-start", "0");
test_invalid_value("grid-row-end", "span");
test_invalid_value("grid-column-end", "sPaN");
test_invalid_value("grid-column-end", '"1st"');
test_invalid_value("grid-column-end", "1st");
test_invalid_value("grid-column-start", "auto 1");
test_invalid_value("grid-row-start", "1 auto");

test_invalid_value("grid-area", "auto / initial");
test_invalid_value("grid-row", "auto / inherit");
test_invalid_value("grid-column", "auto / unset");

test_invalid_value("grid-area", "auto / auto / auto / auto / auto");
test_invalid_value("grid-row", "1 / 2 / 3")
test_invalid_value("grid-column", "a / b / c");
test_invalid_value("grid-row-end", "span 1 / span 2");
test_invalid_value("grid-area", "auto 2 auto 4");
test_invalid_value("grid-row", "33 -A0 auto");
test_invalid_value("grid-row", "auto i 2 j span 3 k");


// https://github.com/w3c/csswg-drafts/issues/2856
test_invalid_value("grid-row-end", "1 auto");
test_invalid_value("grid-row-end", "span 1 auto");
test_invalid_value("grid-row-end", "span auto 1");
test_invalid_value("grid-row-end", "1 auto span");
</script>
</body>
</html>