File: text-indent-composition.html

package info (click to toggle)
firefox-esr 115.14.0esr-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,659,200 kB
  • sloc: cpp: 6,676,648; javascript: 5,690,850; ansic: 3,328,545; python: 1,120,605; asm: 397,163; xml: 180,531; java: 178,838; sh: 68,930; makefile: 20,999; perl: 12,595; objc: 12,561; yacc: 4,583; cs: 3,846; pascal: 2,840; lex: 1,720; ruby: 1,079; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10
file content (84 lines) | stat: -rw-r--r-- 2,255 bytes parent folder | download | duplicates (24)
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
<!DOCTYPE html>
<meta charset="UTF-8">
<title>letter-spacing composition</title>
<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-indent-property">
<meta name="test" content="text-indent supports animation by computed value type">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>

<body></body>
<script>
test_composition({
  property: 'text-indent',
  underlying: '100%',
  addFrom: '50px',
  addTo: '150px',
}, [
  {at: -0.3, expect: 'calc(100% + 20px)'},
  {at: 0, expect: 'calc(100% + 50px)'},
  {at: 0.3, expect: 'calc(100% + 80px)'},
  {at: 0.6, expect: 'calc(100% + 110px)'},
  {at: 1, expect: 'calc(100% + 150px)'},
  {at: 1.5, expect: 'calc(100% + 200px)'},
]);

test_composition({
  property: 'text-indent',
  underlying: '250px',
  addFrom: '50px',
  replaceTo: '100px',
}, [
  {at: -0.3, expect: '360px'},
  {at: 0, expect: '300px'},
  {at: 0.3, expect: '240px'},
  {at: 0.6, expect: '180px'},
  {at: 1, expect: '100px'},
  {at: 1.5, expect: '0px'},
]);

test_composition({
  property: 'text-indent',
  underlying: '50%',
  replaceFrom: '-100%',
  addTo: '50%',
}, [
  {at: -0.3, expect: '-160%'},
  {at: 0, expect: '-100%'},
  {at: 0.3, expect: '-40%'},
  {at: 0.5, expect: '0%'},
  {at: 0.6, expect: '20%'},
  {at: 1, expect: '100%'},
  {at: 1.5, expect: '200%'},
]);

test_composition({
  property: 'text-indent',
  underlying: '250px',
  addFrom: '50px each-line hanging',
  replaceTo: '150px hanging each-line',
}, [
  {at: -0.3, expect: '20px hanging each-line'},
  {at: 0, expect: '50px hanging each-line'},
  {at: 0.3, expect: '80px hanging each-line'},
  {at: 0.6, expect: '110px hanging each-line'},
  {at: 1, expect: '150px hanging each-line'},
  {at: 1.5, expect: '200px hanging each-line'},
]);

test_composition({
  property: 'text-indent',
  underlying: '250px each-line',
  addFrom: '50px each-line',
  replaceTo: '150px hanging',
}, [
  {at: -0.3, expect: '300px each-line'},
  {at: 0, expect: '300px each-line'},
  {at: 0.3, expect: '300px each-line'},
  {at: 0.6, expect: '150px hanging'},
  {at: 1, expect: '150px hanging'},
  {at: 1.5, expect: '150px hanging'},
]);
</script>
</body>