blob: 522e3e5c6062cceca211171e78c1e1a1d662a850 (
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
|
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, you can obtain one at http://mozilla.org/MPL/2.0/. -->
<!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" />
<!-- Localization is necessary for the table header to display text. -->
<link rel="localization" href="messenger/about3Pane.ftl" />
<style>
:root {
--color-gray-20: gray;
--selected-item-color: rebeccapurple;
--selected-item-text-color: white;
}
/* We want a total visible row area of 630px, but we need to account for the
* height of the header as well. */
#testTree {
height: calc(var(--tree-header-table-height) + 630px);
}
.tree-view-scrollable-container {
scroll-behavior: unset;
}
tr[is="test-row"] td > div {
display: flex;
align-items: center;
box-sizing: border-box;
}
tr[is="test-row"] td div.d1 {
flex: 1;
}
tr[is="test-row"] td div.d1 > div.d2 {
line-height: 1.2;
}
tr[is="test-row"] td div.d1 > div.d3 {
line-height: 1.2;
font-size: 13px;
}
</style>
<script type="module" src="chrome://messenger/content/tree-view.mjs"></script>
<script src="tree-element-test-header.js"></script>
<script src="tree-element-test-common.js"></script>
</head>
<!-- We force layout-table in order to ensure that table header rows are
displayed.-->
<body class="layout-table">
<input id="before" placeholder="something to focus on" />
<tree-view id="testTree" data-select-delay="250"/>
<input id="after" placeholder="something to focus on" />
</body>
</html>
|