blob: 1175887e7488a92d71c0c94a0d97d4db08b9ef26 (
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
|
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Test for the tree-view custom element</title>
<link rel="stylesheet" href="chrome://messenger/skin/shared/tree-listbox.css" />
<style>
:root {
--color-gray-20: gray;
--selected-item-color: rebeccapurple;
--selected-item-text-color: white;
}
.tree-view-scrollable-container {
height: 630px;
scroll-behavior: unset;
}
tr[is="test-row"] td > div {
display: flex;
align-items: center;
}
button.threader {
width: 1em;
height: 1em;
}
div.twisty {
width: 1em;
height: 1em;
}
tr[is="test-row"].children button.threader {
display: inline-block;
}
tr[is="test-row"] button.threader {
display: hidden;
}
tr[is="test-row"].children div.twisty {
background-color: green;
}
tr[is="test-row"].children.collapsed div.twisty {
background-color: red;
}
tr[is="test-row"].level1 .d2 {
padding-inline-start: 1em;
}
tr[is="test-row"].level2 .d2 {
padding-inline-start: 2em;
}
</style>
<script type="module" defer="defer" src="chrome://messenger/content/tree-view.mjs"></script>
<script defer="defer" src="chrome://messenger/content/jsTreeView.js"></script>
<script defer="defer" src="tree-element-test-levels.js"></script>
</head>
<body>
<tree-view id="testTree" data-select-delay="250"/>
</body>
</html>
|