summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/container-queries/container-parsing.html
blob: 87b3bdd48cd30cd591cfaccc5cfda34302a05145 (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
<!doctype html>
<meta charset="utf-8">
<title>CSS Containment Test: Parsing of container</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-name">
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-type">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script src="support/cq-testcommon.js"></script>
<div id="target"></div>
<script>
setup(() => assert_implements_container_queries());

test_valid_value('container', 'initial');
test_valid_value('container', 'inherit');
test_valid_value('container', 'unset');
test_valid_value('container', 'revert');
test_valid_value('container', 'none');
test_valid_value('container', 'none / normal', 'none');
test_valid_value('container', 'inline-size');
test_valid_value('container', 'none / inline-size', 'none / inline-size');
test_valid_value('container', 'size');
test_valid_value('container', 'block-size / size');
test_valid_value('container', 'inline-size / inline-size');
test_valid_value('container', 'size / size');
test_valid_value('container', 'foo');
test_valid_value('container', 'foo / normal', 'foo');
test_valid_value('container', 'foo bar / size');
test_valid_value('container', 'foo bar / normal', 'foo bar');
test_valid_value('container', 'FOO / size');
test_valid_value('container', 'FOO/size', 'FOO / size');
test_valid_value('container', '  FOO  /size', 'FOO / size');
test_valid_value('container', 'normal / size');
test_valid_value('container', 'auto / size');

test_invalid_value('container', 'none none');
test_invalid_value('container', 'none inline-size');
test_invalid_value('container', 'none / inline-size none');
test_invalid_value('container', 'none / inline-size normal');
test_invalid_value('container', 'none / inline-size inline-size');
test_invalid_value('container', 'none / inline-size block-size unknown');
test_invalid_value('container', 'none / inline-size block-size');
test_invalid_value('container', 'none / size block-size');
test_invalid_value('container', 'none, none');
test_invalid_value('container', 'none, normal');
test_invalid_value('container', 'none / none');
test_invalid_value('container', 'none / auto');
test_invalid_value('container', 'none / foo');
test_invalid_value('container', 'none / foo, bar');
test_invalid_value('container', '#fff');
test_invalid_value('container', '1px');
test_invalid_value('container', 'default');
test_invalid_value('container', '10px / inline-size');
test_invalid_value('container', '#fefefe / inline-size');
test_invalid_value('container', 'calc(3px) / inline-size');
test_invalid_value('container', 'size 1 / name');
test_invalid_value('container', 'none / block-size');
test_invalid_value('container', 'name / block-size');
test_invalid_value('container', ' NAME  / block-size', 'NAME / block-size');
test_invalid_value('container', 'NAME/block-size','NAME / block-size');
test_invalid_value('container', 'block-size / block-size');
test_invalid_value('container', 'none / size style');
</script>