summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/parsing/grid-column-shorthand.html
blob: b60db55dc3ec6a7c9383d7492537107cb597b009 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!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="grid-column should set values for grid-column-start and grid-column-end">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
</head>
<body>
<script>
test_shorthand_value("grid-column", "auto / auto", {
    "grid-column-start": "auto",
    "grid-column-end": "auto"
});
test_shorthand_value("grid-column", "auto", {
    "grid-column-start": "auto",
    "grid-column-end": "auto"
});

test_shorthand_value("grid-column", "10 / auto", {
    "grid-column-start": "10",
    "grid-column-end": "auto"
});
test_shorthand_value("grid-column", "10", {
    "grid-column-start": "10",
    "grid-column-end": "auto"
});

test_shorthand_value("grid-column", "-10 / auto", {
    "grid-column-start": "-10",
    "grid-column-end": "auto"
});
test_shorthand_value("grid-column", "-10", {
    "grid-column-start": "-10",
    "grid-column-end": "auto"
});

test_shorthand_value("grid-column", "span 2 / auto", {
    "grid-column-start": "span 2",
    "grid-column-end": "auto"
});
test_shorthand_value("grid-column", "span 2", {
    "grid-column-start": "span 2",
    "grid-column-end": "auto"
});

test_shorthand_value("grid-column", "3 last / auto", {
    "grid-column-start": "3 last",
    "grid-column-end": "auto"
});
test_shorthand_value("grid-column", "3 last", {
    "grid-column-start": "3 last",
    "grid-column-end": "auto"
});

test_shorthand_value("grid-column", "span first / auto", {
    "grid-column-start": "span first",
    "grid-column-end": "auto"
});
test_shorthand_value("grid-column", "span first", {
    "grid-column-start": "span first",
    "grid-column-end": "auto"
});
test_shorthand_value("grid-column", "span 2 first / auto", {
    "grid-column-start": "span 2 first",
    "grid-column-end": "auto"
});
test_shorthand_value("grid-column", "span 2 first", {
    "grid-column-start": "span 2 first",
    "grid-column-end": "auto"
});

test_shorthand_value("grid-column", "last / last", {
    "grid-column-start": "last",
    "grid-column-end": "last"
});
test_shorthand_value("grid-column", "last", {
    "grid-column-start": "last",
    "grid-column-end": "last"
});

</script>
</body>
</html>