File: animation-trigger-shorthand.tentative.html

package info (click to toggle)
firefox-esr 140.3.1esr-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,539,016 kB
  • sloc: cpp: 7,380,478; javascript: 6,388,099; ansic: 3,710,142; python: 1,393,715; xml: 628,165; asm: 426,918; java: 184,025; sh: 65,742; makefile: 19,302; objc: 13,059; perl: 12,912; yacc: 4,583; cs: 3,846; pascal: 3,352; lex: 1,720; ruby: 1,226; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10
file content (147 lines) | stat: -rw-r--r-- 6,093 bytes parent folder | download | duplicates (5)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<title>animation-trigger shorthand</title>
<!-- TODO(crbug.com/390314945): Replace with spec link when the spec lands. -->
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/8942">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target" style="font-size:10px"></div>
<script>
  test_shorthand_value('animation-trigger',
    'view() once contain 0% contain 100% cover 0% cover 100%',
    {
      'animation-trigger-type': 'once',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain',
      'animation-trigger-range-end': 'contain',
      'animation-trigger-exit-range-start': 'cover',
      'animation-trigger-exit-range-end': 'cover',
    });
    test_shorthand_value('animation-trigger',
    'view() once contain 20% contain 80% cover 10% cover 90%',
    {
      'animation-trigger-type': 'once',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain 20%',
      'animation-trigger-range-end': 'contain 80%',
      'animation-trigger-exit-range-start': 'cover 10%',
      'animation-trigger-exit-range-end': 'cover 90%',
    });
  test_shorthand_value('animation-trigger',
    'view() once contain 0% contain 100% cover 0%',
    {
      'animation-trigger-type': 'once',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain',
      'animation-trigger-range-end': 'contain',
      'animation-trigger-exit-range-start': 'cover',
      'animation-trigger-exit-range-end': 'cover',
    });
  test_shorthand_value('animation-trigger',
    'view() once contain 20% contain 80% cover 10%',
    {
      'animation-trigger-type': 'once',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain 20%',
      'animation-trigger-range-end': 'contain 80%',
      'animation-trigger-exit-range-start': 'cover 10%',
      'animation-trigger-exit-range-end': 'cover',
    });
  test_shorthand_value('animation-trigger',
    'view() once contain 0% contain 100% cover',
    {
      'animation-trigger-type': 'once',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain',
      'animation-trigger-range-end': 'contain',
      'animation-trigger-exit-range-start': 'cover',
      'animation-trigger-exit-range-end': 'cover',
    });
  test_shorthand_value('animation-trigger',
    'view() alternate contain 0% contain 100%',
    {
      'animation-trigger-type': 'alternate',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain',
      'animation-trigger-range-end': 'contain',
      'animation-trigger-exit-range-start': 'auto',
      'animation-trigger-exit-range-end': 'auto',
    });
  test_shorthand_value('animation-trigger',
    'view() alternate contain 20% contain 80%',
    {
      'animation-trigger-type': 'alternate',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain 20%',
      'animation-trigger-range-end': 'contain 80%',
      'animation-trigger-exit-range-start': 'auto',
      'animation-trigger-exit-range-end': 'auto',
    });
  test_shorthand_value('animation-trigger',
    'view() alternate contain 0%',
    {
      'animation-trigger-type': 'alternate',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain',
      'animation-trigger-range-end': 'contain',
      'animation-trigger-exit-range-start': 'auto',
      'animation-trigger-exit-range-end': 'auto',
    });
  test_shorthand_value('animation-trigger',
    'view() alternate contain 10%',
    {
      'animation-trigger-type': 'alternate',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain 10%',
      'animation-trigger-range-end': 'contain',
      'animation-trigger-exit-range-start': 'auto',
      'animation-trigger-exit-range-end': 'auto',
    });
  test_shorthand_value('animation-trigger',
    'view() alternate contain',
    {
      'animation-trigger-type': 'alternate',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'contain',
      'animation-trigger-range-end': 'contain',
      'animation-trigger-exit-range-start': 'auto',
      'animation-trigger-exit-range-end': 'auto',
    });
  test_shorthand_value('animation-trigger', 'view() alternate',
    {
      'animation-trigger-type': 'alternate',
      'animation-trigger-timeline': 'view()',
      'animation-trigger-range-start': 'normal',
      'animation-trigger-range-end': 'normal',
      'animation-trigger-exit-range-start': 'auto',
      'animation-trigger-exit-range-end': 'auto',
    });
  test_shorthand_value('animation-trigger', 'repeat',
    {
      'animation-trigger-type': 'repeat',
      'animation-trigger-timeline': 'auto',
      'animation-trigger-range-start': 'normal',
      'animation-trigger-range-end': 'normal',
      'animation-trigger-exit-range-start': 'auto',
      'animation-trigger-exit-range-end': 'auto',
    });
  test_computed_value('animation-trigger',
    'view() once contain 0% contain 100% cover 0% cover 100%',
    'view() once contain contain cover cover');
  test_computed_value('animation-trigger',
    'view() once contain 20% contain 80% cover 10% cover 90%');
  test_computed_value('animation-trigger',
    'view() once contain 20% contain 80% cover 0%',
    'view() once contain 20% contain 80% cover cover');
  test_computed_value('animation-trigger',
    'view() once contain 20% contain 80% cover 10%',
    'view() once contain 20% contain 80% cover 10% cover');
  test_computed_value('animation-trigger',
      'view() once contain 0% contain 100%',
      'view() once contain contain auto auto');
  test_computed_value('animation-trigger',
      'view() once',
      'view() once normal normal auto auto');
</script>